X-Git-Url: https://git.yukkurigames.com/?p=enjoyable.git;a=blobdiff_plain;f=TargetController.m;h=074c4876ff8717ffac5ed1f3f8b7966314f7d850;hp=82eec039b08b9ad1a4715a60266e8bb1ec98e4d3;hb=25dd74a4a34f4ba7ec797360bd8f92cbd7bc758e;hpb=561317beecbe4dd445b0c3cb067326828ea5566a diff --git a/TargetController.m b/TargetController.m index 82eec03..074c487 100644 --- a/TargetController.m +++ b/TargetController.m @@ -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];