@@ -195,13 +195,17 @@ int MainMenuGUI::Create(Controller *pController)
195
195
m_apScreenBox[QUITSCREEN] = dynamic_cast <GUICollectionBox *>(m_pGUIController->GetControl (" QuitConfirmBox" ));
196
196
m_apScreenBox[MODMANAGERSCREEN] = dynamic_cast <GUICollectionBox *>(m_pGUIController->GetControl (" ModManagerScreen" ));
197
197
198
- GUICollectionBox *pRootBox = m_apScreenBox[ROOT];
199
- pRootBox->SetPositionAbs ((g_FrameMan.GetResX () - pRootBox->GetWidth ()) / 2 , 0 );// (g_FrameMan.GetResY() - pRootBox->GetHeight()) / 2);
200
- // NO, this screws up the menu positioning!
201
- // pRootBox->Resize(pRootBox->GetWidth(), g_FrameMan.GetResY());
202
-
203
- // Set up screens' initial positions and visibility
198
+ // m_apScreenBox[ROOT]->Resize(g_FrameMan.GetResX(), g_FrameMan.GetResY());
199
+ m_apScreenBox[ROOT]->SetPositionAbs ((g_FrameMan.GetResX () - m_apScreenBox[ROOT]->GetWidth ()) / 2 , 0 );// (g_FrameMan.GetResY() - pRootBox->GetHeight()) / 2);
200
+
201
+ // for (int iscreen = MAINSCREEN; iscreen < SCREENCOUNT; ++iscreen)
202
+ // {
203
+ // if (m_apScreenBox[iscreen]) {
204
+ // m_apScreenBox[iscreen]->CenterInParent(true, true);
205
+ // }
206
+ // }
204
207
m_apScreenBox[QUITSCREEN]->CenterInParent (true , true );
208
+
205
209
// Hide all screens, the appropriate screen will reappear on next update
206
210
HideAllScreens ();
207
211
@@ -706,17 +710,17 @@ void MainMenuGUI::Update()
706
710
// ////////////////////////////////////
707
711
// PLAYERS MENU SCREEN
708
712
709
- else if (m_MenuScreen == PLAYERSSCREEN)
710
- {
711
- if (m_ScreenChange)
712
- {
713
- m_apScreenBox[PLAYERSSCREEN]->SetVisible (true );
714
- m_aMainMenuButton[BACKTOMAIN]->SetVisible (true );
715
- m_ScreenChange = false ;
716
- }
717
-
718
- // m_aMainMenuButton[BACKTOMAIN]->SetFocus();
719
- }
713
+ // else if (m_MenuScreen == PLAYERSSCREEN)
714
+ // {
715
+ // if (m_ScreenChange)
716
+ // {
717
+ // m_apScreenBox[PLAYERSSCREEN]->SetVisible(true);
718
+ // m_aMainMenuButton[BACKTOMAIN]->SetVisible(true);
719
+ // m_ScreenChange = false;
720
+ // }
721
+ //
722
+ // // m_aMainMenuButton[BACKTOMAIN]->SetFocus();
723
+ // }
720
724
721
725
// ////////////////////////////////////
722
726
// SKIRMISH SETUP MENU SCREEN
@@ -1171,31 +1175,31 @@ void MainMenuGUI::Update()
1171
1175
// PLAYER SCREEN BUTTONS
1172
1176
// Player count setting button pressed
1173
1177
1174
- if (m_MenuScreen == PLAYERSSCREEN &&
1175
- (anEvent.GetControl ()->GetName () == " ButtonOnePlayer" ||
1176
- anEvent.GetControl ()->GetName () == " ButtonTwoPlayers" ||
1177
- anEvent.GetControl ()->GetName () == " ButtonThreePlayers" ||
1178
- anEvent.GetControl ()->GetName () == " ButtonFourPlayers" ))
1179
- {
1180
- // Hide all screens, the appropriate screen will reappear on next update
1181
- HideAllScreens ();
1182
- m_MenuScreen = SKIRMISHSCREEN;
1183
- m_ScreenChange = true ;
1184
-
1185
- // Set desired player count
1186
- if (anEvent.GetControl ()->GetName () == " ButtonOnePlayer" )
1187
- m_StartPlayers = 1 ;
1188
- else if (anEvent.GetControl ()->GetName () == " ButtonTwoPlayers" )
1189
- m_StartPlayers = 2 ;
1190
- else if (anEvent.GetControl ()->GetName () == " ButtonThreePlayers" )
1191
- m_StartPlayers = 3 ;
1192
- else if (anEvent.GetControl ()->GetName () == " ButtonFourPlayers" )
1193
- m_StartPlayers = 4 ;
1194
- else
1195
- m_StartPlayers = 0 ;
1196
-
1197
- g_GUISound.ButtonPressSound ()->Play ();
1198
- }
1178
+ // if (m_MenuScreen == PLAYERSSCREEN &&
1179
+ // (anEvent.GetControl()->GetName() == "ButtonOnePlayer" ||
1180
+ // anEvent.GetControl()->GetName() == "ButtonTwoPlayers" ||
1181
+ // anEvent.GetControl()->GetName() == "ButtonThreePlayers" ||
1182
+ // anEvent.GetControl()->GetName() == "ButtonFourPlayers"))
1183
+ // {
1184
+ // // Hide all screens, the appropriate screen will reappear on next update
1185
+ // HideAllScreens();
1186
+ // m_MenuScreen = SKIRMISHSCREEN;
1187
+ // m_ScreenChange = true;
1188
+
1189
+ // // Set desired player count
1190
+ // if (anEvent.GetControl()->GetName() == "ButtonOnePlayer")
1191
+ // m_StartPlayers = 1;
1192
+ // else if (anEvent.GetControl()->GetName() == "ButtonTwoPlayers")
1193
+ // m_StartPlayers = 2;
1194
+ // else if (anEvent.GetControl()->GetName() == "ButtonThreePlayers")
1195
+ // m_StartPlayers = 3;
1196
+ // else if (anEvent.GetControl()->GetName() == "ButtonFourPlayers")
1197
+ // m_StartPlayers = 4;
1198
+ // else
1199
+ // m_StartPlayers = 0;
1200
+
1201
+ // g_GUISound.ButtonPressSound()->Play();
1202
+ // }
1199
1203
1200
1204
// ///////////////////////////////////////////
1201
1205
// SKIRMISH SETUP SCREEN BUTTONS
0 commit comments