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(ui): taken start spots keep their ring, team colour fills the middle

Olcay Seygan947a610ecbee
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d7dad1efe..e746859a6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -44,7 +44,7 @@ found and fixed — EA's own, not port damage.**
## A lobby built for your screen
- The skirmish, LAN and online rooms are laid out again from scratch, the same way in all three. Each seat is one row: a bar in that player's colour, the player or the computer's level with its personality beside it, the army, the colour and the team, with the colour swatches framed and sized like the check boxes under the map. In LAN and online games a player who is ready turns his whole row green and the host's row wears a gold edge, so you see who you are waiting for without hunting for a little light.
-- Teams have colours of their own: white, black, brown and teal for teams 1 to 4, none of them a colour a player can pick, and four different greys even to an eye that sees no colour at all. A swatch beside the team box shows it, and on the map preview a taken start spot is a solid disc in its team's colour, or the player's when he has no team, so you see who starts beside whom before the match. The seat's number stays on it, in black or white, whichever reads better on that colour.
+- Teams have colours of their own: white, black, brown and teal for teams 1 to 4, none of them a colour a player can pick, and four different greys even to an eye that sees no colour at all. A swatch beside the team box shows it, and on the map preview a taken start spot keeps its blue ring and has its dark middle filled with its team's colour, or the player's when he has no team, so you see who starts beside whom before the match. The seat's number stays on it, in black or white, whichever reads better on that colour.
- The map preview is square at last, 482 pixels a side in the skirmish room at 1080p where it was a 422 by 266 oblong of a square map, and the match rules sit under it the whole time. The Info, Chat and Lobby Settings tabs are gone: the match rules never hide behind a click. In the skirmish room the seats get the whole height and your medals and career record open from the Record button beside Back, over the room dimmed behind them; Escape, Close or a click beside them puts them away. The network rooms keep their chat under the seats.
- The rooms used to be a 4:3 screen pulled out to fit a wide monitor, so every emblem, start spot and the map itself came out a third wider than tall. They are drawn for 16:9 now and keep their shape on any screen: exact at 1080p, twice that at 4K, and centred between bands on a 4:3 or 16:10 monitor instead of squashed.
- The personality list opens eight lines tall with a scroll bar. Opened from a lower seat, its sixteen lines used to run off the bottom of the screen.
diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/SkirmishGameOptionsMenu.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/SkirmishGameOptionsMenu.cpp
index 318e1e767..0c9637039 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/SkirmishGameOptionsMenu.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/SkirmishGameOptionsMenu.cpp
@@ -868,8 +868,9 @@ void positionStartSpots( GameInfo *myGame, GameWindow *buttonMapStartPositions[]
positionStartSpots(localMapFname, buttonMapStartPositions, mapWindow);
}
-// An open start spot draws as the button it is; a taken one is a solid disc in its team's colour with
-// the seat's number on it in black or white, whichever reads better on that colour. The colour is
+// A start spot draws as the button it is; a taken one then has its dark middle filled with its team's
+// colour, the blue ring left as it was, and the seat's number on it in black or white, whichever reads
+// better on that colour. The colour is
// kept here by window, not in the button's user data, which the push button's own draw reads as its
// PushButtonData. The skirmish, LAN or online room and the load screen each own one set of spots,
// so two sets cover every screen that shows them.
@@ -904,17 +905,18 @@ static StartSpotFill *startSpotFill( GameWindow *spot )
static void drawStartSpot( GameWindow *window, WinInstanceData *instData )
{
+ theStartSpotButtonDraw( window, instData );
const Color fill = startSpotFill( window )->fill;
if ( fill == 0 )
- {
- theStartSpotButtonDraw( window, instData );
return;
- }
Int x, y, width, height;
window->winGetScreenPosition( &x, &y );
window->winGetSize( &width, &height );
+ // the stock spot's dark middle is about 62% of the button, inside its blue ring: colour only that
+ const Int insetX = width * 19 / 100;
+ const Int insetY = height * 19 / 100;
TheDisplay->drawImage( TheMappedImageCollection->findImageByName( "ReforgedLobbySpot" ),
- x, y, x + width, y + height, fill );
+ x + insetX, y + insetY, x + width - insetX, y + height - insetY, fill );
DisplayString *number = instData->getTextDisplayString();
// the number in the bold of the button's own face, so it holds up on a bright disc
GameFont *font = number->getFont();