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
feat(gameclient): no personality heading, player box spans the column
Olcay Seyganb63bc143a084
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex fe10dfe07..e9205e6d7 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -66,6 +66,7 @@ found and fixed — EA's own, not port damage.**- The map preview is square at last, 410 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.+- The personality column lost its heading. A computer's row shows its level and its personality side by side; a player's row, and an open or closed seat, gives the name box the personality's room as well, so long names fit and no empty gap sits in the middle of the row.- The three rooms wear the same frame as the loading and score screens that follow them: the score screen's blue ruler and grid around the edge of the screen, with the panel sitting on its bright line. The LAN and online panels get the blue edge the skirmish one had, under the same blue rule; the seat rows sit on the panel's black in that blue; the colour bar is a little wider. Record and Close are in capitals like every other button, the record's heading is lettered green, and the darker names in the colour list are lifted toward white so they read on black, the way the score screen lifts them.- The menus no longer make you sit through their animations. A click or a key while buttons are still sliding or flashing in puts them where they were going, and the click counts: Solo Play pressed while the main menu is still coming up opens its list straight away, where it used to be ignored. A screen on its way out goes the moment you press anything, so Skirmish then a click reaches the skirmish room in about 100ms instead of half a second, and Back to the main menu in 10ms instead of 380.diff --git a/GeneralsMD/Code/Data/Window/Menus/GameSpyGameOptionsMenu.wnd b/GeneralsMD/Code/Data/Window/Menus/GameSpyGameOptionsMenu.wndindex 2df9ba0c9..4dd9a9a8c 100644--- a/GeneralsMD/Code/Data/Window/Menus/GameSpyGameOptionsMenu.wnd+++ b/GeneralsMD/Code/Data/Window/Menus/GameSpyGameOptionsMenu.wnd@@ -2959,53 +2959,6 @@ WINDOWSTATICTEXTDATA = CENTERED: 0;ENDCHILD- WINDOW- WINDOWTYPE = STATICTEXT;- SCREENRECT = UPPERLEFT: 368 158, BOTTOMRIGHT: 578 190, CREATIONRESOLUTION: 1920 1080;- NAME = "GameSpyGameOptionsMenu.wnd:StaticTextAIPersona";- STATUS = ENABLED+NOINPUT+NOFOCUS;- STYLE = STATICTEXT+MOUSETRACK;- SYSTEMCALLBACK = "[None]";- INPUTCALLBACK = "[None]";- TOOLTIPCALLBACK = "[None]";- DRAWCALLBACK = "[None]";- FONT = NAME: "Arial", SIZE: 14, BOLD: 0;- HEADERTEMPLATE = "MinorTitle";- TOOLTIPDELAY = -1;- TEXT = "GUI:AIPersona";- TEXTCOLOR = ENABLED: 255 255 255 255, ENABLEDBORDER: 0 0 0 255,- DISABLED: 192 192 192 255, DISABLEDBORDER: 64 64 64 255,- HILITE: 128 128 255 255, HILITEBORDER: 0 0 128 255;- ENABLEDDRAWDATA = IMAGE: NoImage, COLOR: 0 0 0 0, BORDERCOLOR: 0 0 0 0,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255;- DISABLEDDRAWDATA = IMAGE: NoImage, COLOR: 64 64 64 255, BORDERCOLOR: 192 192 192 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255;- HILITEDRAWDATA = IMAGE: NoImage, COLOR: 0 128 0 255, BORDERCOLOR: 128 255 128 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255;- STATICTEXTDATA = CENTERED: 0;- END- CHILDWINDOWWINDOWTYPE = COMBOBOX;SCREENRECT = UPPERLEFT: 378 563, BOTTOMRIGHT: 588 603, CREATIONRESOLUTION: 1920 1080;diff --git a/GeneralsMD/Code/Data/Window/Menus/LanGameOptionsMenu.wnd b/GeneralsMD/Code/Data/Window/Menus/LanGameOptionsMenu.wndindex ed8c3201c..75963f5f0 100644--- a/GeneralsMD/Code/Data/Window/Menus/LanGameOptionsMenu.wnd+++ b/GeneralsMD/Code/Data/Window/Menus/LanGameOptionsMenu.wnd@@ -1786,53 +1786,6 @@ WINDOWSTATICTEXTDATA = CENTERED: 0;ENDCHILD- WINDOW- WINDOWTYPE = STATICTEXT;- SCREENRECT = UPPERLEFT: 336 158, BOTTOMRIGHT: 546 190, CREATIONRESOLUTION: 1920 1080;- NAME = "LanGameOptionsMenu.wnd:StaticTextAIPersona";- STATUS = ENABLED+NOINPUT+NOFOCUS;- STYLE = STATICTEXT+MOUSETRACK;- SYSTEMCALLBACK = "[None]";- INPUTCALLBACK = "[None]";- TOOLTIPCALLBACK = "[None]";- DRAWCALLBACK = "[None]";- FONT = NAME: "Arial", SIZE: 14, BOLD: 0;- HEADERTEMPLATE = "MinorTitle";- TOOLTIPDELAY = -1;- TEXT = "GUI:AIPersona";- TEXTCOLOR = ENABLED: 255 255 255 255, ENABLEDBORDER: 0 0 0 255,- DISABLED: 192 192 192 255, DISABLEDBORDER: 64 64 64 255,- HILITE: 128 128 255 255, HILITEBORDER: 0 0 128 255;- ENABLEDDRAWDATA = IMAGE: NoImage, COLOR: 0 0 0 0, BORDERCOLOR: 0 0 0 0,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255;- DISABLEDDRAWDATA = IMAGE: NoImage, COLOR: 64 64 64 255, BORDERCOLOR: 192 192 192 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255;- HILITEDRAWDATA = IMAGE: NoImage, COLOR: 0 128 0 255, BORDERCOLOR: 128 255 128 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255;- STATICTEXTDATA = CENTERED: 0;- END- CHILDWINDOWWINDOWTYPE = COMBOBOX;SCREENRECT = UPPERLEFT: 346 563, BOTTOMRIGHT: 556 603, CREATIONRESOLUTION: 1920 1080;diff --git a/GeneralsMD/Code/Data/Window/Menus/SkirmishGameOptionsMenu.wnd b/GeneralsMD/Code/Data/Window/Menus/SkirmishGameOptionsMenu.wndindex 3d6af3634..01f4a4dbf 100644--- a/GeneralsMD/Code/Data/Window/Menus/SkirmishGameOptionsMenu.wnd+++ b/GeneralsMD/Code/Data/Window/Menus/SkirmishGameOptionsMenu.wnd@@ -2027,53 +2027,6 @@ WINDOWSTATICTEXTDATA = CENTERED: 0;ENDCHILD- WINDOW- WINDOWTYPE = STATICTEXT;- SCREENRECT = UPPERLEFT: 336 158, BOTTOMRIGHT: 546 190, CREATIONRESOLUTION: 1920 1080;- NAME = "SkirmishGameOptionsMenu.wnd:StaticTextAIPersona";- STATUS = ENABLED+NOINPUT+NOFOCUS;- STYLE = STATICTEXT+MOUSETRACK;- SYSTEMCALLBACK = "[None]";- INPUTCALLBACK = "[None]";- TOOLTIPCALLBACK = "[None]";- DRAWCALLBACK = "[None]";- FONT = NAME: "Arial", SIZE: 14, BOLD: 0;- HEADERTEMPLATE = "MinorTitle";- TOOLTIPDELAY = -1;- TEXT = "GUI:AIPersona";- TEXTCOLOR = ENABLED: 255 255 255 255, ENABLEDBORDER: 0 0 0 255,- DISABLED: 192 192 192 255, DISABLEDBORDER: 64 64 64 255,- HILITE: 128 128 255 255, HILITEBORDER: 0 0 128 255;- ENABLEDDRAWDATA = IMAGE: NoImage, COLOR: 0 0 0 0, BORDERCOLOR: 0 0 0 0,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255;- DISABLEDDRAWDATA = IMAGE: NoImage, COLOR: 64 64 64 255, BORDERCOLOR: 192 192 192 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255;- HILITEDRAWDATA = IMAGE: NoImage, COLOR: 0 128 0 255, BORDERCOLOR: 128 255 128 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255,- IMAGE: NoImage, COLOR: 255 255 255 255, BORDERCOLOR: 255 255 255 255;- STATICTEXTDATA = CENTERED: 0;- END- CHILDWINDOWWINDOWTYPE = COMBOBOX;SCREENRECT = UPPERLEFT: 346 563, BOTTOMRIGHT: 556 603, CREATIONRESOLUTION: 1920 1080;diff --git a/GeneralsMD/Code/GameEngine/Include/GameNetwork/GUIUtil.h b/GeneralsMD/Code/GameEngine/Include/GameNetwork/GUIUtil.hindex 7cbf0250f..15a3d7b64 100644--- a/GeneralsMD/Code/GameEngine/Include/GameNetwork/GUIUtil.h+++ b/GeneralsMD/Code/GameEngine/Include/GameNetwork/GUIUtil.h@@ -115,7 +115,8 @@ Bool LobbyTabClicked(NameKeyType controlID);void ShutdownLobbyTabs(void);// The personality column: one combo box a seat, one entry per AIPersonality in enum order with the-// value as item data, shown only on a computer player's seat and changed only by the host. The+// value as item data, shown only on a computer player's seat and changed only by the host; on any+// other seat UpdateAIPersonaComboBoxes widens the player box over the empty column. The// layout in a stale Run/Window may not have the column, so a box that is not there stays NULL and// its seat plays Normal. HandleAIPersonaSelection answers TRUE when the click was one of the boxes// and changed its slot, so a network lobby knows to send the options round.diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/EstablishConnectionsWindow.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/EstablishConnectionsWindow.cppindex 9521c59ee..b6320bff8 100644--- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/EstablishConnectionsWindow.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/EstablishConnectionsWindow.cpp@@ -78,7 +78,6 @@ static const char *gadgetsToHide[] ="StaticTextFaction","StaticTextColor","StaticTextPlayers",- "StaticTextAIPersona","TextEntryMapDisplay","ButtonSelectMap","ButtonStart",diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/LanMapSelectMenu.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/LanMapSelectMenu.cppindex 6406d2e56..d10814bad 100644--- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/LanMapSelectMenu.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/LanMapSelectMenu.cpp@@ -80,7 +80,6 @@ static const char *gadgetsToHide[] ="StaticTextTeam","StaticTextFaction","StaticTextColor",- "StaticTextAIPersona","TextEntryMapDisplay","ButtonSelectMap","ButtonStart",diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/SkirmishGameOptionsMenu.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/SkirmishGameOptionsMenu.cppindex 13308781d..91acb754b 100644--- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/SkirmishGameOptionsMenu.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/SkirmishGameOptionsMenu.cpp@@ -1383,7 +1383,6 @@ static const char *gadgetsToHide[] ="StaticTextColor","StaticTextTeam","StaticTextFaction",- "StaticTextAIPersona",NULL // keep this last};static const char *perPlayerGadgetsToHide[] =diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLMapSelectMenu.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLMapSelectMenu.cppindex 159a8a679..c7b13d10a 100644--- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLMapSelectMenu.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLMapSelectMenu.cpp@@ -94,7 +94,6 @@ static const char *gadgetsToHide[] ="StaticTextTeam","StaticTextFaction","StaticTextColor",- "StaticTextAIPersona","TextEntryMapDisplay","ButtonSelectMap","ButtonStart",diff --git a/GeneralsMD/Code/GameEngine/Source/GameNetwork/GUIUtil.cpp b/GeneralsMD/Code/GameEngine/Source/GameNetwork/GUIUtil.cppindex 7dc232d0b..a4c53c539 100644--- a/GeneralsMD/Code/GameEngine/Source/GameNetwork/GUIUtil.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameNetwork/GUIUtil.cpp@@ -815,6 +815,56 @@ void ShutdownLobbyTabs(void)// -----------------------------------------------------------------------------+// The personality column has no heading and only a computer's seat fills it; on any other seat the+// player box (and the online room's name over it) reaches across it. The two widths are taken from+// the persona box and the army box after it, which never move, so a second init of a layout whose+// boxes are already wide measures the same.+static GameWindow *thePersonaSeatPlayer[MAX_SLOTS];+static GameWindow *thePersonaSeatName[MAX_SLOTS];+static Int thePersonaSeatNarrow[MAX_SLOTS];+static Int thePersonaSeatWide[MAX_SLOTS];++static GameWindow *findSeatWindow(GameWindow *parent, const char *layoutFilename, const char *name, Int seat)+{+ AsciiString full;+ full.format("%s:%s%d", layoutFilename, name, seat);+ return TheWindowManager->winGetWindowFromId(parent, NAMEKEY(full));+}++static void measurePersonaSeat(GameWindow *parent, const char *layoutFilename, GameWindow *persona, Int seat)+{+ GameWindow *player = findSeatWindow(parent, layoutFilename, "ComboBoxPlayer", seat);+ if (!player)+ {+ // the skirmish room's own seat is a text entry+ AsciiString full;+ full.format("%s:TextEntryPlayerName", layoutFilename);+ player = TheWindowManager->winGetWindowFromId(parent, NAMEKEY(full));+ }+ thePersonaSeatPlayer[seat] = player;+ thePersonaSeatName[seat] = findSeatWindow(parent, layoutFilename, "StaticTextPlayer", seat);+ GameWindow *army = findSeatWindow(parent, layoutFilename, "ComboBoxPlayerTemplate", seat);++ Int playerX, personaX, armyX, y, personaWidth, height;+ player->winGetScreenPosition(&playerX, &y);+ persona->winGetScreenPosition(&personaX, &y);+ persona->winGetSize(&personaWidth, &height);+ army->winGetScreenPosition(&armyX, &y);+ const Int gap = armyX - (personaX + personaWidth);+ thePersonaSeatNarrow[seat] = personaX - gap - playerX;+ thePersonaSeatWide[seat] = personaX + personaWidth - playerX;+}++static void setSeatPlayerWidth(GameWindow *window, Int width)+{+ if (!window)+ return; // only the online room has a name over the box+ Int oldWidth, height;+ window->winGetSize(&oldWidth, &height);+ if (oldWidth != width)+ window->winSetSize(width, height);+}+void InitAIPersonaComboBoxes(GameWindow *parent, const char *layoutFilename,GameWindow *comboPersona[], NameKeyType comboPersonaID[]){@@ -826,6 +876,7 @@ void InitAIPersonaComboBoxes(GameWindow *parent, const char *layoutFilename,comboPersona[i] = TheWindowManager->winGetWindowFromId(parent, comboPersonaID[i]);if (!comboPersona[i])continue; // a layout from before the column+ measurePersonaSeat(parent, layoutFilename, comboPersona[i], i);// make room for the whole list before the first add, as PopulatePlayerSlotComboBox doesGameWindow *listBox = GadgetComboBoxGetListBox(comboPersona[i]);@@ -860,6 +911,9 @@ void UpdateAIPersonaComboBoxes(GameInfo *myGame, GameWindow *comboPersona[])// a takeover seat has no AI behind it, so nothing for a personality to steerconst Bool computer = slot->isAI() && !slot->isTakeover();comboPersona[i]->winHide(!computer);+ const Int width = computer ? thePersonaSeatNarrow[i] : thePersonaSeatWide[i];+ setSeatPlayerWidth(thePersonaSeatPlayer[i], width);+ setSeatPlayerWidth(thePersonaSeatName[i], width);if (!computer)continue;comboPersona[i]->winEnable(myGame->amIHost());diff --git a/GeneralsMD/Code/Tools/lobbyroom_layout.py b/GeneralsMD/Code/Tools/lobbyroom_layout.pyindex 27d04585c..06cb4b55c 100644--- a/GeneralsMD/Code/Tools/lobbyroom_layout.py+++ b/GeneralsMD/Code/Tools/lobbyroom_layout.py@@ -10,7 +10,9 @@ than 4:3 at one scale (GameWindowManagerScript.cpp, parseScreenRect): exact on 1One grid drives all three rooms. The seat table takes the left of the panel, one row a seat: acolour bar, the player (or the computer's level) and the computer's personality, the army, a colourswatch and the colour, a team swatch and the team; the swatches are the rules page's check boxes'-size, framed like them. A player who is+size, framed like them. The personality column has no heading: only a computer's row fills it, and+on every other row the menu code widens the player box over it (InitAIPersonaComboBoxes in+GUIUtil.cpp). A player who isready turns his row green, so the network rooms need no status column; their ready lights are keptat no size, since the menu code still sets them. The online room puts a ping light ahead of the row.The right column is the map preview, the map's name and Select Map, and the match rules page, always@@ -126,10 +128,10 @@ CARD_BORDER = FRAME_COLOREMPTY_COLOR = (48, 54, 76, 255)VEIL = (2, 4, 12, 120)-# The personality column: its heading is cloned from the team heading and its combo boxes from the-# faction ones, so both keep EA's art.-PERSONA_HEADING, PERSONA_PREFIX = "StaticTextAIPersona", "ComboBoxAIPersona"-PERSONA_HEADING_TEXT, PERSONA_TOOLTIP = "GUI:AIPersona", "GUI:AIPersonaTooltip"+# The personality column: its combo boxes are cloned from the faction ones, so they keep EA's art.+# The heading an earlier grid gave it comes out again.+PERSONA_PREFIX, PERSONA_TOOLTIP = "ComboBoxAIPersona", "GUI:AIPersonaTooltip"+RETIRED_PERSONA_HEADING = "StaticTextAIPersona"# Turbo mode replaced the skirmish room's game speed dropdown: a box cloned from the unit limit's,# which every room has, so it inherits that box's art and lettering.@@ -156,7 +158,7 @@ STAT_ROWS = [# Generali" 258, colour "Camgöbeği" 98, team "Keins" 49.SEAT_COLUMNS = [("StaticTextPlayers", ("ComboBoxPlayer",), 190),- (PERSONA_HEADING, (PERSONA_PREFIX,), 210),+ (None, (PERSONA_PREFIX,), 210),("StaticTextFaction", ("ComboBoxPlayerTemplate",), None),("StaticTextColor", ("SeatSwatch",), SWATCH),(None, ("ComboBoxColor",), 170),@@ -248,16 +250,14 @@ def remove(layout, names):def add_persona_column(layout, menu):- """The personality heading and one combo box a seat, cloned in once and ahead of the team- heading, seat 7 first like EA's columns. A layout that already has them is left alone."""- if layout.find(PERSONA_HEADING) is not None:+ """One personality combo box a seat, cloned in once and ahead of the team heading, seat 7 first+ like EA's columns. A layout that already has them is left alone."""+ if layout.find(PERSONA_PREFIX + "0") is not None:returnnamed = lambda name: "%s.wnd:%s" % (menu, name)team = need(layout, "StaticTextTeam")container = layout.root.parent_of(team)- heading = clone(team, named(PERSONA_HEADING))- heading.put_prop("TEXT", '"%s"' % PERSONA_HEADING_TEXT)- added = [heading]+ added = []for seat in reversed(range(SEAT_COUNT)):combo = clone(need(layout, "ComboBoxPlayerTemplate%d" % seat), named("%s%d" % (PERSONA_PREFIX, seat)))combo.put_prop("TOOLTIPTEXT", '"%s"' % PERSONA_TOOLTIP)@@ -524,7 +524,7 @@ def build(layout, menu):spec = ROOMS[menu]widen(layout)add_persona_column(layout, menu)- remove(layout, TABS + GAME_SPEED_DROPDOWN)+ remove(layout, TABS + GAME_SPEED_DROPDOWN + (RETIRED_PERSONA_HEADING,))add_turbo_box(layout)container = need(layout, spec["container"])add_ruler(layout, menu, container)