X-Git-Url: https://git.yukkurigames.com/?p=enjoyable.git;a=blobdiff_plain;f=Classes%2FNJOutputMouseButton.m;h=0b039d108d2eaef2821eb6e2ba94b9cff6e28cb0;hp=c9fe0eb13e64de6320b6713b0169ba89331889a9;hb=24bdb92798b9abe86c7954042a47523791736b7c;hpb=4dabc5c754efa54adb2dc57063c7294b1c2e4654 diff --git a/Classes/NJOutputMouseButton.m b/Classes/NJOutputMouseButton.m index c9fe0eb..0b039d1 100644 --- a/Classes/NJOutputMouseButton.m +++ b/Classes/NJOutputMouseButton.m @@ -36,8 +36,7 @@ return @{ @"type": self.class.serializationCode, @"button": @(_button) }; } -+ (NJOutput *)outputDeserialize:(NSDictionary *)serialization - withMappings:(NSArray *)mappings { ++ (NJOutput *)outputDeserialize:(NSDictionary *)serialization { NJOutputMouseButton *output = [[NJOutputMouseButton alloc] init]; output.button = [serialization[@"button"] intValue]; return output; @@ -81,22 +80,4 @@ CFRelease(click); } -- (int)humanIndexedButton { - switch (_button) { - case kCGMouseButtonLeft: return 0; - case kCGMouseButtonCenter: return 1; - case kCGMouseButtonRight: return 2; - default: return 0; - } -} - -- (void)setHumanIndexedButton:(int)humanIndexedButton { - switch (humanIndexedButton) { - case 0: _button = kCGMouseButtonLeft; break; - case 1: _button = kCGMouseButtonCenter; break; - case 2: _button = kCGMouseButtonRight; break; - default: _button = kCGMouseButtonLeft; - } -} - @end