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.
C++ cmakecnccommand-and-conquercppdirectx11game-enginegame-preservationgeneralsrtssage-enginex64zero-hour
fix(gameclient): let the plate's painted minimise tab be the picture
Olcay Seygan4d6c5ca2fd61
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 54f095168..8cfb7440d 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -449,7 +449,7 @@ found and fixed — EA's own, not port damage.**- The rest of the interface is drawn at the command bar's size, not the screen's width. The queue strip, the superweapon countdowns, the generals' powers bar down the right edge and the rank screen were each measured against how wide your monitor is, and the bar they sit beside is measured against the smaller of the two dimensions - so on a 16:9 screen a queue picture came out a third bigger than the build button it is a picture of, and the power slots were oblong where they were drawn square. One size for all of it now, and it is the bar's own.- The writing on a build button keeps its size against the button. The hotkey letter, the price, the build time and the queue count were sized off how wide your monitor is while the bar they sit on is sized off the smaller of its width and its height, so the wider the screen the further the lettering grew away from the cameo underneath it. One size for both now, and it is the bar's.- Every key the game answers to is in the options screen, and you can move any of them. The keyboard screen has been in the game since 2003 - the code for it, anyway; the layout it needed was never shipped in any data file, which is why the button that opens it was authored hidden and parked off the right edge, and why its Assign button had an empty body with a comment where the work should be. It is built now: every command in one list with the key it answers to beside it, click a row and press the key you want. A key can only mean one thing, so whatever was on it gives it up. Your changes go in `Keybinds.ini` next to `Options.ini` and hold only what you moved, so a patch that adds commands does not wipe them - and none of it is in the multiplayer checksum, so two players in one match can hold completely different keyboards. It opens over a running match and closes back onto the options screen you opened it from: it used to be filed with the menus the shell keeps, so opening it mid-match put the skirmish lobby back on screen and cancel left the lobby, the pause menu and the options panel stacked on top of the battlefield. Its button on the options screen wears the game's own lettering instead of the one face in that layout that was still Times New Roman.-- Minimising the command bar sends all three panels down, and they slide back up when you bring them back. The old minimise dropped the bar a tenth of the screen and left a strip of metal, a readable money box and the top of the radar dish lying along the bottom edge, which is neither the bar nor out of the way. The radar and the middle go off the screen entirely; the selection panel stops with the row its minimise tab is in standing on the bottom corner, so what you click to bring the bar back is that tab with its own artwork behind it, not a button floating over the battlefield. That tab sits where the painting puts it now: every faction's panel paints its own minimise tab, arrow and all, and none of them paints it where the 2003 layout put the button, so the button was drawing a second tab beside the painted one - two arrows, up to nineteen pixels apart.+- Minimising the command bar sends all three panels down, and they slide back up when you bring them back. The old minimise dropped the bar a tenth of the screen and left a strip of metal, a readable money box and the top of the radar dish lying along the bottom edge, which is neither the bar nor out of the way. The radar and the middle go off the screen entirely; the selection panel stops with the row its minimise tab is in standing on the bottom corner, so what you click to bring the bar back is that tab with its own artwork behind it, not a button floating over the battlefield. That tab sits where the painting puts it now: every faction's panel paints its own minimise tab, arrow and all, and none of them paints it where the 2003 layout put the button, so the button was drawing a second tab beside the painted one - two arrows, up to nineteen pixels apart. The painted tab is the one you see: the button stopped drawing a tab of its own over it, having no artwork the right shape for the space, and is now just the place you click. Minimised it draws again, because then the arrow has to point the other way.- Two stray letters, an "S" and an "M", no longer appear over the battlefield beside the selection panel the first time you minimise the bar and bring it back. They are the labels on the two unused minimise buttons the 2003 layout ships hidden; minimising hid them a second time and un-hid them on the way back.- The markings on a build button - the shortcut letters, the price, the build time, the queue count - are set bold. At seven points against a busy cameo the light weight read as part of the picture.- Menu panels slide in at the same speed whatever your monitor is. They travel the width of thediff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cppindex 46cd44c23..3c511e5d9 100644--- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp@@ -5205,6 +5205,7 @@ void ControlBar::setUpDownImages( void )GameWindow *win= TheWindowManager->winGetWindowFromId( NULL, TheNameKeyGenerator->nameToKey( "ControlBar.wnd:ButtonLarge" ) );if(!win)return;+// we only care if it's in it's low state, else we put the default images upif(m_currentControlBarStage == CONTROL_BAR_STAGE_LOW){@@ -5214,6 +5215,28 @@ void ControlBar::setUpDownImages( void )return;}+ //+ // A plate that paints its own minimise tab is the picture. The button sits exactly on that tab+ // now (see placeInPanel), so drawing the down arrow's art there lays a second copy of the tab+ // over the painted one, stretched to a rectangle the art was not drawn for - a wide arrow on a+ // slab covering the painted bezel. Leave the button as the place you click and let the painting+ // be what you see. It costs the hover and pushed states, which nothing else paints.+ //+ // Only in this stage. Minimised, the painted arrow points the wrong way - the tab is then the+ // only piece of the bar on screen and it has to say "up" - so the up art is drawn there as it+ // always was.+ //+ const ControlBarPlate *minTabPlate = m_controlBarSchemeManager+ ? ControlBarPlateForSide( m_controlBarSchemeManager->getCurrentSide(), CB_PANEL_RIGHT )+ : NULL;+ if( minTabPlate && minTabPlate->minTab.width() > 0 )+ {+ GadgetButtonSetEnabledImage( win, NULL );+ GadgetButtonSetHiliteImage( win, NULL );+ GadgetButtonSetHiliteSelectedImage( win, NULL );+ return;+ }+GadgetButtonSetEnabledImage(win, m_toggleButtonDownOn);GadgetButtonSetHiliteImage(win, m_toggleButtonDownIn);GadgetButtonSetHiliteSelectedImage(win, m_toggleButtonDownPushed);