Rename event.type_() to .kind()

This commit is contained in:
Sijmen 2020-05-22 22:41:39 +02:00
parent ecd398d685
commit d7b69fafdd
Signed by: vijfhoek
GPG key ID: DAF7821E067D9C48

View file

@ -323,12 +323,12 @@ pub const Event = struct {
return Event{ .event = event }; return Event{ .event = event };
} }
pub fn type_(self: Event) EventType { pub fn kind(self: Event) EventType {
return @intToEnum(EventType, self.event.type); return @intToEnum(EventType, self.event.type);
} }
pub fn mouseMotion(self: Event) ?MouseMotionEvent { pub fn mouseMotion(self: Event) ?MouseMotionEvent {
if (self.type_() != .MouseMotion) { if (self.kind() != .MouseMotion) {
return null; return null;
} }