project_files/HedgewarsMobile/Classes/GameConfigViewController.m
branchios-revival
changeset 11120 83c0d96f86ea
parent 11116 102684240fe8
child 11121 182a42b79610
equal deleted inserted replaced
11119:f08d5bb1d2b0 11120:83c0d96f86ea
    20 #import "GameConfigViewController.h"
    20 #import "GameConfigViewController.h"
    21 #import "MapConfigViewController.h"
    21 #import "MapConfigViewController.h"
    22 #import "TeamConfigViewController.h"
    22 #import "TeamConfigViewController.h"
    23 #import "SchemeWeaponConfigViewController.h"
    23 #import "SchemeWeaponConfigViewController.h"
    24 #import "GameInterfaceBridge.h"
    24 #import "GameInterfaceBridge.h"
    25 
    25 #import "HelpPageLobbyViewController.h"
    26 
    26 
    27 @implementation GameConfigViewController
    27 @implementation GameConfigViewController
    28 @synthesize imgContainer, titleImage, sliderBackground, //helpPage,
    28 @synthesize imgContainer, titleImage, sliderBackground, helpPage,
    29             mapConfigViewController, teamConfigViewController, schemeWeaponConfigViewController;
    29             mapConfigViewController, teamConfigViewController, schemeWeaponConfigViewController;
    30 
    30 
    31 -(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    31 -(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    32     return rotationManager(interfaceOrientation);
    32     return rotationManager(interfaceOrientation);
    33 }
    33 }
    64             [self startGame:theButton];
    64             [self startGame:theButton];
    65 
    65 
    66             break;
    66             break;
    67         case 2:
    67         case 2:
    68             [[AudioManagerController mainManager] playClickSound];
    68             [[AudioManagerController mainManager] playClickSound];
    69             /*
       
    70             if (self.helpPage == nil)
    69             if (self.helpPage == nil)
    71                 self.helpPage = [[HelpPageLobbyViewController alloc] initWithNibName:@"HelpPageLobbyViewController-iPad" bundle:nil];
    70                 self.helpPage = [[HelpPageLobbyViewController alloc] initWithNibName:@"HelpPageLobbyViewController-iPad" bundle:nil];
    72             self.helpPage.view.alpha = 0;
    71             self.helpPage.view.alpha = 0;
    73             [self.view addSubview:self.helpPage.view];
    72             [self.view addSubview:self.helpPage.view];
    74             [UIView beginAnimations:@"helplobby" context:NULL];
    73             [UIView beginAnimations:@"helplobby" context:NULL];
    75             self.helpPage.view.alpha = 1;
    74             self.helpPage.view.alpha = 1;
    76             [UIView commitAnimations];
    75             [UIView commitAnimations];
    77             */
       
    78             break;
    76             break;
    79         default:
    77         default:
    80             DLog(@"Nope");
    78             DLog(@"Nope");
    81             break;
    79             break;
    82     }
    80     }
   102             // this message is compulsory otherwise the table won't be loaded at all
   100             // this message is compulsory otherwise the table won't be loaded at all
   103             [schemeWeaponConfigViewController viewWillAppear:NO];
   101             [schemeWeaponConfigViewController viewWillAppear:NO];
   104             [self.view bringSubviewToFront:schemeWeaponConfigViewController.view];
   102             [self.view bringSubviewToFront:schemeWeaponConfigViewController.view];
   105             break;
   103             break;
   106         case 3:
   104         case 3:
   107             /*
       
   108             if (helpPage == nil) {
   105             if (helpPage == nil) {
   109                 helpPage = [[HelpPageLobbyViewController alloc] initWithNibName:@"HelpPageLobbyViewController-iPhone" bundle:nil];
   106                 helpPage = [[HelpPageLobbyViewController alloc] initWithNibName:@"HelpPageLobbyViewController-iPhone" bundle:nil];
   110                 [self.view addSubview:helpPage.view];
   107                 [self.view addSubview:helpPage.view];
   111             }
   108             }
   112             // this message is compulsory otherwise the table won't be loaded at all
   109             // this message is compulsory otherwise the table won't be loaded at all
   113             [helpPage viewWillAppear:NO];
   110             [helpPage viewWillAppear:NO];
   114             [self.view bringSubviewToFront:helpPage.view];
   111             [self.view bringSubviewToFront:helpPage.view];
   115             */
       
   116             break;
   112             break;
   117         default:
   113         default:
   118             DLog(@"Nope");
   114             DLog(@"Nope");
   119             break;
   115             break;
   120     }
   116     }
   395         self.mapConfigViewController = nil;
   391         self.mapConfigViewController = nil;
   396     if (self.teamConfigViewController.view.superview == nil)
   392     if (self.teamConfigViewController.view.superview == nil)
   397         self.teamConfigViewController = nil;
   393         self.teamConfigViewController = nil;
   398     if (self.schemeWeaponConfigViewController.view.superview == nil)
   394     if (self.schemeWeaponConfigViewController.view.superview == nil)
   399         self.schemeWeaponConfigViewController = nil;
   395         self.schemeWeaponConfigViewController = nil;
   400     //if (self.helpPage.view.superview == nil)
   396     if (self.helpPage.view.superview == nil)
   401     //    self.helpPage = nil;
   397         self.helpPage = nil;
   402     MSG_MEMCLEAN();
   398     MSG_MEMCLEAN();
   403     [super didReceiveMemoryWarning];
   399     [super didReceiveMemoryWarning];
   404 }
   400 }
   405 
   401 
   406 -(void) viewDidUnload {
   402 -(void) viewDidUnload {
   408     self.titleImage = nil;
   404     self.titleImage = nil;
   409     self.sliderBackground = nil;
   405     self.sliderBackground = nil;
   410     self.schemeWeaponConfigViewController = nil;
   406     self.schemeWeaponConfigViewController = nil;
   411     self.teamConfigViewController = nil;
   407     self.teamConfigViewController = nil;
   412     self.mapConfigViewController = nil;
   408     self.mapConfigViewController = nil;
   413     //self.helpPage = nil;
   409     self.helpPage = nil;
   414     MSG_DIDUNLOAD();
   410     MSG_DIDUNLOAD();
   415     [super viewDidUnload];
   411     [super viewDidUnload];
   416 }
   412 }
   417 
   413 
   418 -(void) dealloc {
   414 -(void) dealloc {
   420     releaseAndNil(titleImage);
   416     releaseAndNil(titleImage);
   421     releaseAndNil(sliderBackground);
   417     releaseAndNil(sliderBackground);
   422     releaseAndNil(schemeWeaponConfigViewController);
   418     releaseAndNil(schemeWeaponConfigViewController);
   423     releaseAndNil(teamConfigViewController);
   419     releaseAndNil(teamConfigViewController);
   424     releaseAndNil(mapConfigViewController);
   420     releaseAndNil(mapConfigViewController);
   425     //releaseAndNil(helpPage);
   421     releaseAndNil(helpPage);
   426     [super dealloc];
   422     [super dealloc];
   427 }
   423 }
   428 
   424 
   429 @end
   425 @end