project_files/HedgewarsMobile/Classes/RestoreViewController.m
branchios-revival
changeset 11116 102684240fe8
parent 10108 c68cf030eded
child 11205 9fd7b8d3cf4d
equal deleted inserted replaced
11115:3729ac42189b 11116:102684240fe8
    30     UIButton *theButton = (UIButton *)sender;
    30     UIButton *theButton = (UIButton *)sender;
    31     NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
    31     NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
    32 
    32 
    33     if (theButton.tag != 0) {
    33     if (theButton.tag != 0) {
    34         [[AudioManagerController mainManager] playClickSound];
    34         [[AudioManagerController mainManager] playClickSound];
    35         [GameInterfaceBridge registerCallingController:self.parentViewController];
    35         [GameInterfaceBridge registerCallingController:self.presentingViewController];
    36         [GameInterfaceBridge startSaveGame:[[NSUserDefaults standardUserDefaults] objectForKey:@"savedGamePath"]];
    36         [GameInterfaceBridge startSaveGame:[[NSUserDefaults standardUserDefaults] objectForKey:@"savedGamePath"]];
    37     } else {
    37     } else {
    38         [[AudioManagerController mainManager] playBackSound];
    38         [[AudioManagerController mainManager] playBackSound];
    39         [defaults setObject:@"" forKey:@"savedGamePath"];
    39         [defaults setObject:@"" forKey:@"savedGamePath"];
    40         [defaults synchronize];
    40         [defaults synchronize];
    41     }
    41     }
    42     [self.parentViewController dismissModalViewControllerAnimated:YES];
    42     [self.presentingViewController dismissViewControllerAnimated:YES completion:nil];
    43 }
    43 }
    44 
    44 
    45 -(void) viewDidLoad {
    45 -(void) viewDidLoad {
    46     [super viewDidLoad];
    46     [super viewDidLoad];
    47 }
    47 }