X-Git-Url: https://git.yukkurigames.com/?p=enjoyable.git;a=blobdiff_plain;f=TargetController.m;h=074c4876ff8717ffac5ed1f3f8b7966314f7d850;hp=9f85fd989913d0ec25db1974fdbf8d4854eb5352;hb=25dd74a4a34f4ba7ec797360bd8f92cbd7bc758e;hpb=51ca12b552a9c17c4d4029b0340e193b273044a8 diff --git a/TargetController.m b/TargetController.m index 9f85fd9..074c487 100644 --- a/TargetController.m +++ b/TargetController.m @@ -37,7 +37,7 @@ case 0: // none return NULL; case 1: // key - if([keyInput hasKey]) { + if(keyInput.hasKey) { TargetKeyboard* k = [[TargetKeyboard alloc] init]; [k setVk: [keyInput vk]]; [k setDescr: [keyInput descr]]; @@ -93,10 +93,9 @@ } -(void) commit { - id action = [joystickController selectedAction]; - if(action) { - Target* target = [self state]; - [[configsController currentConfig] setTarget: target forAction: action]; + JSAction *action = [joystickController selectedAction]; + if (action) { + configsController.currentConfig[action] = self.state; } } @@ -131,7 +130,7 @@ } else { [self setEnabled: YES]; } - Target* target = [[configsController currentConfig] getTargetForAction: jsaction]; + Target* target = configsController.currentConfig[jsaction]; id act = jsaction; NSString* actFullName = [act name];