X-Git-Url: https://git.yukkurigames.com/?p=enjoyable.git;a=blobdiff_plain;f=TargetToggleMouseScope.m;h=0413b731d937a0b237d75c782dca1b6b359ddd06;hp=2f03c2fb74cfda407c851f7e7166173817e73e18;hb=e2a4d830dd9817f6a515a3b1b6aa152d3bb98c2b;hpb=e24d2ce8323c713180d44933ca72cdb96ac356cd diff --git a/TargetToggleMouseScope.m b/TargetToggleMouseScope.m index 2f03c2f..0413b73 100644 --- a/TargetToggleMouseScope.m +++ b/TargetToggleMouseScope.m @@ -8,7 +8,7 @@ #import "TargetToggleMouseScope.h" #import "ApplicationController.h" -#import "JoystickController.h" +#import "NJInputController.h" @implementation TargetToggleMouseScope @@ -21,16 +21,16 @@ } + (Target *)targetDeserialize:(NSDictionary *)serialization - withConfigs:(NSArray *)configs { + 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; - JoystickController *jc = ac.jsController; - [jc setFrontWindowOnly: ![jc frontWindowOnly]]; + ApplicationController *ac = NSApplication.sharedApplication.delegate; + NJInputController *jc = ac.inputController; + jc.frontWindowOnly = !jc.frontWindowOnly; } @end