project_files/HedgewarsMobile/Classes/GameConfigViewController.m
changeset 6000 dbcebcd3d79f
parent 5700 f0960a88ab0e
child 6078 8c0cc07731e5
equal deleted inserted replaced
5998:e8f44e9433f0 6000:dbcebcd3d79f
    49                                                       cancelButtonTitle:NSLocalizedString(@"Ok, got it",@"")
    49                                                       cancelButtonTitle:NSLocalizedString(@"Ok, got it",@"")
    50                                                       otherButtonTitles:nil];
    50                                                       otherButtonTitles:nil];
    51                 [alert show];
    51                 [alert show];
    52                 [alert release];
    52                 [alert release];
    53             } else {
    53             } else {
    54                 playSound(@"backSound");
    54                 [AudioManagerController playBackSound];
    55                 [[self parentViewController] dismissModalViewControllerAnimated:YES];
    55                 [[self parentViewController] dismissModalViewControllerAnimated:YES];
    56             }
    56             }
    57             break;
    57             break;
    58         case 1:
    58         case 1:
    59             playSound(@"clickSound");
    59             [AudioManagerController playClickSound];
    60             theButton.enabled = NO;
    60             theButton.enabled = NO;
    61             [self startGame:theButton];
    61             [self startGame:theButton];
    62             break;
    62             break;
    63         case 2:
    63         case 2:
    64             playSound(@"clickSound");
    64             [AudioManagerController playClickSound];
    65             if (self.helpPage == nil)
    65             if (self.helpPage == nil)
    66                 self.helpPage = [[HelpPageViewController alloc] initWithNibName:@"HelpPageLobbyViewController-iPad" bundle:nil];
    66                 self.helpPage = [[HelpPageViewController alloc] initWithNibName:@"HelpPageLobbyViewController-iPad" bundle:nil];
    67             self.helpPage.view.alpha = 0;
    67             self.helpPage.view.alpha = 0;
    68             [self.view addSubview:helpPage.view];
    68             [self.view addSubview:helpPage.view];
    69             [UIView beginAnimations:@"helplobby" context:NULL];
    69             [UIView beginAnimations:@"helplobby" context:NULL];
    77 }
    77 }
    78 
    78 
    79 -(IBAction) segmentPressed:(id) sender {
    79 -(IBAction) segmentPressed:(id) sender {
    80     UISegmentedControl *theSegment = (UISegmentedControl *)sender;
    80     UISegmentedControl *theSegment = (UISegmentedControl *)sender;
    81 
    81 
    82     playSound(@"selSound");
    82     [AudioManagerController playSelectSound];
    83     switch (theSegment.selectedSegmentIndex) {
    83     switch (theSegment.selectedSegmentIndex) {
    84         case 0:
    84         case 0:
    85             // this init here is just aestetic as this controller was already set up in viewDidLoad
    85             // this init here is just aestetic as this controller was already set up in viewDidLoad
    86             if (mapConfigViewController == nil) {
    86             if (mapConfigViewController == nil) {
    87                 mapConfigViewController = [[MapConfigViewController alloc] initWithNibName:@"MapConfigViewController-iPhone" bundle:nil];
    87                 mapConfigViewController = [[MapConfigViewController alloc] initWithNibName:@"MapConfigViewController-iPhone" bundle:nil];