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(gameclient): a taller step holds the worker key clear of the edge

Olcay Seyganda31f95b1083
diff --git a/GeneralsMD/Code/Data/Window/Html/ControlBar.html b/GeneralsMD/Code/Data/Window/Html/ControlBar.html
index 0728d4929..ae2d19c0f 100644
--- a/GeneralsMD/Code/Data/Window/Html/ControlBar.html
+++ b/GeneralsMD/Code/Data/Window/Html/ControlBar.html
@@ -201,9 +201,8 @@
.worker { border-left: 1px solid #b3bbc4; }
.china .worker { border-left-color: #d58a70; }
.gla .worker { border-left-color: #cabe86; }
- /* the step's lit top edge pushes what it holds down a pixel, and at 3 the key's bottom edge fell
- off the screen */
- .worker .key { left: 3px; top: 1px; }
+ /* the step is 30 tall and the key 20 with its rim, so it stands clear of the screen's bottom edge */
+ .worker .key { left: 3px; top: 3px; }
.worker .icon { background-image: url(Icons/IdleWorker.svg); }
.watching .worker { display: none; }
diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp
index 2109a5bdb..72b1d0ed5 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp
@@ -10311,7 +10311,8 @@ enum
SKILL_GRID_COLUMNS = 3,
SKILLS_BUTTON_WIDTH = 58, ///< wide enough for its name in either language
ALERT_TAB_WIDTH = 54, ///< the under-attack light, a lamp on the radar panel's border
- WORKER_TAB_WIDTH = 39 ///< the idle worker's step, against the command grid panel's border, as wide as the signals' column
+ WORKER_TAB_WIDTH = 39, ///< the idle worker's step, against the command grid panel's border, as wide as the signals' column
+ WORKER_STEP_HEIGHT = 30 ///< and its height, its key held clear of the screen's bottom edge
};
static const char *const SKILLS_FOLDED = "skills"; ///< the flip the skills button toggles; flipped is folded away
static const UnsignedInt SIGNAL_RISE_MS = 360; ///< each smoke signal button's climb out of the screen's bottom edge
@@ -10652,7 +10653,7 @@ Bool InGameUI::drawControlBarPage( const IRegion2D *panels, const Bool *shown, I
workerStep.hi.x = centreBox.lo.x;
workerStep.lo.x = workerStep.hi.x - REAL_TO_INT( WORKER_TAB_WIDTH * scale );
workerStep.hi.y = TheDisplay->getHeight();
- workerStep.lo.y = workerStep.hi.y - REAL_TO_INT( SIGNAL_BUTTON_SIZE * scale );
+ workerStep.lo.y = workerStep.hi.y - REAL_TO_INT( WORKER_STEP_HEIGHT * scale );
putPageRect( values, "workertab", workerStep, panelCount > 1 && shown[ 1 ] );
HtmlLists lists;
putPowerBar( values, lists[ "powercells" ] ); // after the stack, whose frame it divides into cells