This repository was archived by the owner on Jan 5, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -195,13 +195,15 @@ 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());
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
+ }
202
206
203
- // Set up screens' initial positions and visibility
204
- m_apScreenBox[QUITSCREEN]->CenterInParent (true , true );
205
207
// Hide all screens, the appropriate screen will reappear on next update
206
208
HideAllScreens ();
207
209
You can’t perform that action at this time.
0 commit comments