Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit dcbaca1

Browse files
committed
Revert "Root screen covers the whole screen and all screens are centered"
This reverts commit 708c783.
1 parent 708c783 commit dcbaca1

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

Menus/MainMenuGUI.cpp

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -195,15 +195,13 @@ int MainMenuGUI::Create(Controller *pController)
195195
m_apScreenBox[QUITSCREEN] = dynamic_cast<GUICollectionBox *>(m_pGUIController->GetControl("QuitConfirmBox"));
196196
m_apScreenBox[MODMANAGERSCREEN] = dynamic_cast<GUICollectionBox *>(m_pGUIController->GetControl("ModManagerScreen"));
197197

198-
m_apScreenBox[ROOT]->Resize(g_FrameMan.GetResX(), g_FrameMan.GetResY());
199-
200-
for (int iscreen = MAINSCREEN; iscreen < SCREENCOUNT; ++iscreen)
201-
{
202-
if (m_apScreenBox[iscreen]) {
203-
m_apScreenBox[iscreen]->CenterInParent(true, true);
204-
}
205-
}
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());
206202

203+
// Set up screens' initial positions and visibility
204+
m_apScreenBox[QUITSCREEN]->CenterInParent(true, true);
207205
// Hide all screens, the appropriate screen will reappear on next update
208206
HideAllScreens();
209207

0 commit comments

Comments
 (0)