X-Git-Url: https://git.yukkurigames.com/?p=enjoyable.git;a=blobdiff_plain;f=NJOutputSwitchMouseMode.m;h=130a2a0eebed86f617458df2f470ebaace3517b8;hp=3332a91118c0a81bb00c39a73819065e9fdc0744;hb=3eb4949fe4554cb4a32e1237571da4a96d26978c;hpb=dcedf147ddcb6c21768cea94a2f06b93007d2a82 diff --git a/NJOutputSwitchMouseMode.m b/NJOutputSwitchMouseMode.m index 3332a91..130a2a0 100644 --- a/NJOutputSwitchMouseMode.m +++ b/NJOutputSwitchMouseMode.m @@ -7,8 +7,8 @@ #import "NJOutputSwitchMouseMode.h" -#import "ApplicationController.h" -#import "NJInputController.h" +#import "EnjoyableApplicationDelegate.h" +#import "NJDeviceController.h" @implementation NJOutputSwitchMouseMode @@ -17,7 +17,7 @@ } - (NSDictionary *)serialize { - return @{ @"type": @"switch mouse mode" }; + return @{ @"type": self.class.serializationCode }; } + (NJOutput *)outputDeserialize:(NSDictionary *)serialization @@ -27,8 +27,8 @@ - (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; + EnjoyableApplicationDelegate *ac = NSApplication.sharedApplication.delegate; + NJDeviceController *jc = ac.inputController; jc.frontWindowOnly = !jc.frontWindowOnly; }