project_files/HedgewarsMobile/Classes/RestoreViewController.m
changeset 6321 5a0416e5a6de
parent 6020 c792d4b3e080
child 6353 d8f62c805619
equal deleted inserted replaced
6320:238a6dc0e7ad 6321:5a0416e5a6de
    34     UIButton *theButton = (UIButton *)sender;
    34     UIButton *theButton = (UIButton *)sender;
    35     NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
    35     NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
    36 
    36 
    37     if (theButton.tag != 0) {
    37     if (theButton.tag != 0) {
    38         [AudioManagerController playClickSound];
    38         [AudioManagerController playClickSound];
    39         [self.parentViewController dismissModalViewControllerAnimated:NO];
       
    40         [[NSNotificationCenter defaultCenter] postNotificationName:@"launchRestoredGame" object:nil];
    39         [[NSNotificationCenter defaultCenter] postNotificationName:@"launchRestoredGame" object:nil];
    41     } else {
    40     } else {
    42         [AudioManagerController playBackSound];
    41         [AudioManagerController playBackSound];
    43         [defaults setObject:@"" forKey:@"savedGamePath"];
    42         [defaults setObject:@"" forKey:@"savedGamePath"];
    44         [defaults synchronize];
    43         [defaults synchronize];
    45         [self.parentViewController dismissModalViewControllerAnimated:YES];
       
    46     }
    44     }
       
    45     [self.parentViewController dismissModalViewControllerAnimated:YES];
    47 }
    46 }
    48 
    47 
    49 -(void) viewDidLoad {
    48 -(void) viewDidLoad {
    50     NSString *imgName;
    49     NSString *imgName;
    51     if (IS_IPAD())
    50     if (IS_IPAD())