X-Git-Url: https://git.yukkurigames.com/?p=enjoyable.git;a=blobdiff_plain;f=Classes%2FNJOutputMouseButton.m;h=068a5ddd2949e8fa86fb8751280ce2fa539f8c9a;hp=c9fe0eb13e64de6320b6713b0169ba89331889a9;hb=HEAD;hpb=4dabc5c754efa54adb2dc57063c7294b1c2e4654 diff --git a/Classes/NJOutputMouseButton.m b/Classes/NJOutputMouseButton.m index c9fe0eb..068a5dd 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 *)outputWithSerialization:(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