X-Git-Url: https://git.yukkurigames.com/?p=enjoyable.git;a=blobdiff_plain;f=TargetToggleMouseScope.m;fp=TargetToggleMouseScope.m;h=0000000000000000000000000000000000000000;hp=0413b731d937a0b237d75c782dca1b6b359ddd06;hb=dcedf147ddcb6c21768cea94a2f06b93007d2a82;hpb=e2a4d830dd9817f6a515a3b1b6aa152d3bb98c2b diff --git a/TargetToggleMouseScope.m b/TargetToggleMouseScope.m deleted file mode 100644 index 0413b73..0000000 --- a/TargetToggleMouseScope.m +++ /dev/null @@ -1,36 +0,0 @@ -// -// TargetToggleMouseScope.m -// Enjoy -// -// Created by Yifeng Huang on 7/28/12. -// - -#import "TargetToggleMouseScope.h" - -#import "ApplicationController.h" -#import "NJInputController.h" - -@implementation TargetToggleMouseScope - -+ (NSString *)serializationCode { - return @"mtoggle"; -} - -- (NSDictionary *)serialize { - return @{ @"type": @"mtoggle" }; -} - -+ (Target *)targetDeserialize:(NSDictionary *)serialization - withMappings:(NSArray *)mappings { - TargetToggleMouseScope *target = [[TargetToggleMouseScope alloc] init]; - return target; -} -- (void)trigger { - // FIXME: It's hacky to get at the controller this way, but it's - // also hacky to pass it. Shouldn't need to do either. - ApplicationController *ac = NSApplication.sharedApplication.delegate; - NJInputController *jc = ac.inputController; - jc.frontWindowOnly = !jc.frontWindowOnly; -} - -@end