Skip to content

Zero Hour rebuilt from EA's source: x64, Direct3D 11, VS2022/CMake, ~60 original bugs fixed, an AI that builds a base. Bring your own game.

fix(gameengine): open the keep-resolution box in the middle of the screen

Olcay Seygan5c93c12d066f
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 761446d89..29cc3637c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -716,7 +716,7 @@ The whole HUD is on the hardware. Four colours carry it, and they mean the same
- Effects is a page of its own, with seven settings that used to be command line switches or were fixed in the game's data: shadows for infantry, for missiles and bombs, for scenery and for smoke clouds, thicker smoke in two strengths, particles that land on the ground instead of falling through it, and swaying trees split away from extra animations, so the scaffolding can stay while the forest holds still. The shadows take effect on the next map, smoke and particles the next time the game starts.
- Every slider shows its value beside it: brightness, the three volumes, scroll speed, texture resolution, particles and anisotropic samples. Every label now starts on the same edge as the box under it; the original drew each one a few pixels to the right.
- The tab you are on is lit in the same green as the group headings. The original drew it in dark grey on the black panel, which read as a button you could not press rather than the page you were looking at.
-- Accept sits in the bottom right corner with Cancel beside it, and Defaults stands alone on the far left, out of reach of a slip off Accept. The window is as tall as its busiest page and centred on the screen, instead of reaching from the top of the screen to the bottom with half of every page empty.
+- Accept sits in the bottom right corner with Cancel beside it, and Defaults stands alone on the far left, out of reach of a slip off Accept. The window is as tall as its busiest page and centred on the screen, instead of reaching from the top of the screen to the bottom with half of every page empty. The box that asks whether to keep a new resolution opens in the middle of the screen too, where it used to sit jammed in the top left corner.
- Eight settings that used to need a text editor have a control now: window mode on display, antialiasing, the two glow settings, texture filtering and anisotropic samples on graphics, and who wears a health bar and which colours the players wear on gameplay.
- Twelve more are decided for you instead of asked about. Grid placement, nudging a blocked building, 45 degree building rotation, the placement range ring, workers going back to supply, detailed build tooltips, the HUD overlay and archived replays are simply on - every one of them is the version of the game people were choosing anyway, and a page of eight checkboxes nobody unticks is a page of eight decisions nobody wanted to make. Middle-mouse panning left the screen too, and edge scrolling in a window and 45 degree camera steps are still yours by name in `Options.ini` if the defaults are wrong for your setup.
- A page no longer says its own name twice. Every tab used to open onto a heading repeating the word already written on the button you just pressed, with a rule under it dividing nothing from nothing.
diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/MainMenu.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/MainMenu.cpp
index 46699e98e..cc994f7fe 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/MainMenu.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/MainMenu.cpp
@@ -219,7 +219,6 @@ static Bool launchChallengeMenu = FALSE;
static Bool dontAllowTransitions = FALSE;
//Added by Saad
-const Int /*TIME_OUT = 15,*/ CORNER = 10;
void AcceptResolution();
void DeclineResolution();
GameWindow *resAcceptMenu = NULL;
@@ -829,7 +828,8 @@ void DoResolutionDialog()
resTimerString.concat(resolutionNew);
- resAcceptMenu = TheWindowManager->gogoMessageBox( CORNER, CORNER, -1, -1,MSG_BOX_OK | MSG_BOX_CANCEL ,
+ // -1 keeps the layout's own place, the middle of the screen, where every other message box opens
+ resAcceptMenu = TheWindowManager->gogoMessageBox( -1, -1, -1, -1,MSG_BOX_OK | MSG_BOX_CANCEL ,
TheGameText->fetch("GUI:Resolution"),
resTimerString, NULL, NULL, AcceptResolution,
DeclineResolution);