@@ -182,7 +182,7 @@ int MainMenuGUI::Create(Controller *pController)
182
182
m_pGUIController->Load (" Base.rte/GUIs/MainMenuGUI.ini" );
183
183
184
184
// Make sure we have convenient points to the containing GUI colleciton boxes that we will manipulate the positions of
185
- GUICollectionBox *pRootBox = dynamic_cast <GUICollectionBox *>(m_pGUIController->GetControl (" root" ));
185
+ m_apScreenBox[ROOT] = dynamic_cast <GUICollectionBox *>(m_pGUIController->GetControl (" root" ));
186
186
m_apScreenBox[MAINSCREEN] = dynamic_cast <GUICollectionBox *>(m_pGUIController->GetControl (" MainScreen" ));
187
187
m_apScreenBox[PLAYERSSCREEN] = dynamic_cast <GUICollectionBox *>(m_pGUIController->GetControl (" PlayersScreen" ));
188
188
m_apScreenBox[SKIRMISHSCREEN] = dynamic_cast <GUICollectionBox *>(m_pGUIController->GetControl (" SkirmishScreen" ));
@@ -195,6 +195,7 @@ 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];
198
199
pRootBox->SetPositionAbs ((g_FrameMan.GetResX () - pRootBox->GetWidth ()) / 2 , 0 );// (g_FrameMan.GetResY() - pRootBox->GetHeight()) / 2);
199
200
// NO, this screws up the menu positioning!
200
201
// pRootBox->Resize(pRootBox->GetWidth(), g_FrameMan.GetResY());
@@ -1848,7 +1849,7 @@ void MainMenuGUI::Draw(BITMAP *drawBitmap) const
1848
1849
1849
1850
void MainMenuGUI::HideAllScreens ()
1850
1851
{
1851
- for (int iscreen = 0 ; iscreen < SCREENCOUNT; ++iscreen)
1852
+ for (int iscreen = MAINSCREEN ; iscreen < SCREENCOUNT; ++iscreen)
1852
1853
{
1853
1854
if (m_apScreenBox[iscreen])
1854
1855
m_apScreenBox[iscreen]->SetVisible (false );
0 commit comments