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(hud): campaign briefing on one well, scroll bar in side steel
Olcay Seygan0a76f9dde9c8
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 57627c497..3ec861906 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -29,7 +29,7 @@ found and fixed, EA's own, not port damage.**- The superweapon countdowns stand where they do in a player's game while you watch, in their tray. The observer's bar named no tray for them, so they used to sit bare and higher up.- The card that rises when you point at a build button is drawn in your side's own art now, with the price and the build time beside the name behind a coin and a clock. Under them one row of icons says what you are buying: health, armour class, damage, damage a second, range and speed for a unit, health, armour and the power it adds or draws for a building. The six lines of figures that used to pad out the description are gone, and so is the "Power Required" line EA wrote into every building's text, in every language. The small tooltip beside the pointer sits in a framed well of the same art in a match and of the watcher's steel in the menus. Both are cut from the bar itself: the same near-black shell, bevelled lip and sunk glass, the card's corner shaped like the side's bar (America's 45 degree cut, China's two steps, the GLA's bitten scrap, Turkiye's wide chamfer with its turquoise light), open on the side that meets the screen's edge.- The army screen, the lobby and the score screen wear our own emblems. Every army has a card of its own on the army screen, the generals included, where EA's faces and logos used to be, and the player card shows the same one. Turkiye stops borrowing America's logo there and in the lobby's game list. On the score screen each player's row starts with his army's emblem, and your own army's card stands faint behind the table.-- The Tab screen, with the players, their teams and the chat buttons, is painted in your side's bar now instead of EA's see-through black with a blue rule. It stands in the top left corner on the same dark steel in three tiers, square on the screen's two edges and cut at the corner facing the battlefield, every player's row in a sunk well with alternate rows a shade lighter so a name lines up with its team at a glance. Its buttons are cut from the same metal: the mute switch carries a speaker that is struck through once you have muted someone, the money's minus, plus and Send sit in bezels shaped like the side's toolbar buttons, and Main Menu stands in a socket of its own. In a campaign the mission's briefing lines sit straight on the dark glass, without the grey veil and blue frame they used to wear. The watcher gets it in his own steel. The panel is solid, so the battlefield no longer shows through the list. The Classic interface keeps EA's screen.+- The Tab screen, with the players, their teams and the chat buttons, is painted in your side's bar now instead of EA's see-through black with a blue rule. It stands in the top left corner on the same dark steel in three tiers, square on the screen's two edges and cut at the corner facing the battlefield, every player's row in a sunk well with alternate rows a shade lighter so a name lines up with its team at a glance. Its buttons are cut from the same metal: the mute switch carries a speaker that is struck through once you have muted someone, the money's minus, plus and Send sit in bezels shaped like the side's toolbar buttons, and Main Menu stands in a socket of its own. In a campaign the mission's briefing fills one clear well of dark glass, without the empty player rows, the grey veil and the blue frame it used to wear, and its scroll bar's arrows and groove are cut from the same steel. The watcher gets it in his own steel. The panel is solid, so the battlefield no longer shows through the list. The Classic interface keeps EA's screen.- Eight new player colours after the original eight: Teal, Lime, Navy, Magenta, Brown, Lavender, Coral and Olive, for players and AI in skirmish, LAN and online. They replace Crimson, Azure and Salmon.## Your queue in pictures againdiff --git a/GeneralsMD/Code/BuildFingerprint.manifest b/GeneralsMD/Code/BuildFingerprint.manifestindex 34cfb890f..0668a4ef7 100644--- a/GeneralsMD/Code/BuildFingerprint.manifest+++ b/GeneralsMD/Code/BuildFingerprint.manifest@@ -17,15 +17,18 @@ Data/Art/Textures/ReforgedGuardRing.tgaData/Art/Textures/ReforgedHudAmericaCommandBar.ddsData/Art/Textures/ReforgedHudAmericaPowers.ddsData/Art/Textures/ReforgedHudAmericaTabPanel.dds+Data/Art/Textures/ReforgedHudAmericaTabSolo.ddsData/Art/Textures/ReforgedHudBlankTexture.tgaData/Art/Textures/ReforgedHudChinaCommandBar.ddsData/Art/Textures/ReforgedHudChinaPowers.ddsData/Art/Textures/ReforgedHudChinaTabPanel.dds+Data/Art/Textures/ReforgedHudChinaTabSolo.ddsData/Art/Textures/ReforgedHudControlButtons.ddsData/Art/Textures/ReforgedHudDisconnectWindow.ddsData/Art/Textures/ReforgedHudGlaCommandBar.ddsData/Art/Textures/ReforgedHudGlaPowers.ddsData/Art/Textures/ReforgedHudGlaTabPanel.dds+Data/Art/Textures/ReforgedHudGlaTabSolo.ddsData/Art/Textures/ReforgedHudHelpbox.ddsData/Art/Textures/ReforgedHudObsCommandBar.ddsData/Art/Textures/ReforgedHudObsPieces.dds@@ -35,6 +38,7 @@ Data/Art/Textures/ReforgedHudObsTabPanel.ddsData/Art/Textures/ReforgedHudTurkiyeCommandBar.ddsData/Art/Textures/ReforgedHudTurkiyePowers.ddsData/Art/Textures/ReforgedHudTurkiyeTabPanel.dds+Data/Art/Textures/ReforgedHudTurkiyeTabSolo.ddsData/Art/Textures/ReforgedLaserPink.tgaData/Art/Textures/ReforgedLobbySpot.tgaData/Art/Textures/ReforgedMineGlowBlue.tgadiff --git a/GeneralsMD/Code/Data/Art/Textures/ReforgedHudAmericaTabPanel.dds b/GeneralsMD/Code/Data/Art/Textures/ReforgedHudAmericaTabPanel.ddsindex 0977d88c9..4d55d7d07 100644Binary files a/GeneralsMD/Code/Data/Art/Textures/ReforgedHudAmericaTabPanel.dds and b/GeneralsMD/Code/Data/Art/Textures/ReforgedHudAmericaTabPanel.dds differdiff --git a/GeneralsMD/Code/Data/Art/Textures/ReforgedHudAmericaTabSolo.dds b/GeneralsMD/Code/Data/Art/Textures/ReforgedHudAmericaTabSolo.ddsnew file mode 100644index 000000000..58c4529f8Binary files /dev/null and b/GeneralsMD/Code/Data/Art/Textures/ReforgedHudAmericaTabSolo.dds differdiff --git a/GeneralsMD/Code/Data/Art/Textures/ReforgedHudChinaTabPanel.dds b/GeneralsMD/Code/Data/Art/Textures/ReforgedHudChinaTabPanel.ddsindex 55141708a..fe15a1806 100644Binary files a/GeneralsMD/Code/Data/Art/Textures/ReforgedHudChinaTabPanel.dds and b/GeneralsMD/Code/Data/Art/Textures/ReforgedHudChinaTabPanel.dds differdiff --git a/GeneralsMD/Code/Data/Art/Textures/ReforgedHudChinaTabSolo.dds b/GeneralsMD/Code/Data/Art/Textures/ReforgedHudChinaTabSolo.ddsnew file mode 100644index 000000000..c2be1c24fBinary files /dev/null and b/GeneralsMD/Code/Data/Art/Textures/ReforgedHudChinaTabSolo.dds differdiff --git a/GeneralsMD/Code/Data/Art/Textures/ReforgedHudGlaTabPanel.dds b/GeneralsMD/Code/Data/Art/Textures/ReforgedHudGlaTabPanel.ddsindex 50fd4aeee..ae1399040 100644Binary files a/GeneralsMD/Code/Data/Art/Textures/ReforgedHudGlaTabPanel.dds and b/GeneralsMD/Code/Data/Art/Textures/ReforgedHudGlaTabPanel.dds differdiff --git a/GeneralsMD/Code/Data/Art/Textures/ReforgedHudGlaTabSolo.dds b/GeneralsMD/Code/Data/Art/Textures/ReforgedHudGlaTabSolo.ddsnew file mode 100644index 000000000..c778e59f5Binary files /dev/null and b/GeneralsMD/Code/Data/Art/Textures/ReforgedHudGlaTabSolo.dds differdiff --git a/GeneralsMD/Code/Data/Art/Textures/ReforgedHudObsTabPanel.dds b/GeneralsMD/Code/Data/Art/Textures/ReforgedHudObsTabPanel.ddsindex 3a41999ef..aab817196 100644Binary files a/GeneralsMD/Code/Data/Art/Textures/ReforgedHudObsTabPanel.dds and b/GeneralsMD/Code/Data/Art/Textures/ReforgedHudObsTabPanel.dds differdiff --git a/GeneralsMD/Code/Data/Art/Textures/ReforgedHudTurkiyeTabPanel.dds b/GeneralsMD/Code/Data/Art/Textures/ReforgedHudTurkiyeTabPanel.ddsindex 1cc7cb671..d5586bf92 100644Binary files a/GeneralsMD/Code/Data/Art/Textures/ReforgedHudTurkiyeTabPanel.dds and b/GeneralsMD/Code/Data/Art/Textures/ReforgedHudTurkiyeTabPanel.dds differdiff --git a/GeneralsMD/Code/Data/Art/Textures/ReforgedHudTurkiyeTabSolo.dds b/GeneralsMD/Code/Data/Art/Textures/ReforgedHudTurkiyeTabSolo.ddsnew file mode 100644index 000000000..7e0d9b0b2Binary files /dev/null and b/GeneralsMD/Code/Data/Art/Textures/ReforgedHudTurkiyeTabSolo.dds differdiff --git a/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedHudAmericaTabPanel.ini b/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedHudAmericaTabPanel.iniindex bcfb8c8da..f3b88f925 100644--- a/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedHudAmericaTabPanel.ini+++ b/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedHudAmericaTabPanel.ini@@ -9,6 +9,16 @@ MappedImage AmericaProTabPanelStatus = NONEEnd+; The campaign's painting (tab_panel solo), where the briefing list stands: one well for the titles and the+; table, no bands or rulings, on a texture of its own.+MappedImage AmericaProTabSolo+ Texture = ReforgedHudAmericaTabSolo.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:0 Top:0 Right:1379 Bottom:714+ Status = NONE+End+; The screen's buttons (tab_button, TAB_BUTTONS), each at its size at 1080 and Diplomacy.cpp's dressTabButton; stretching it over its button: Send, the money's - and + (Square), Mute and Unmute, Main Menu (Exit); H hilited,; P pushed, D disabled.@@ -172,3 +182,134 @@ MappedImage AmericaProTabExitDCoords = Left:1640 Top:166 Right:1806 Bottom:214Status = NONEEnd++; The briefing list's scroll bar: the arrows (Up, Down) and the Thumb in four states, the track's groove in+; four pieces the slider lays end, repeats and end.++MappedImage AmericaProTabUp+ Texture = ReforgedHudAmericaTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1812 Top:4 Right:1833 Bottom:26+ Status = NONE+End++MappedImage AmericaProTabUpH+ Texture = ReforgedHudAmericaTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1812 Top:58 Right:1833 Bottom:80+ Status = NONE+End++MappedImage AmericaProTabUpP+ Texture = ReforgedHudAmericaTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1812 Top:112 Right:1833 Bottom:134+ Status = NONE+End++MappedImage AmericaProTabUpD+ Texture = ReforgedHudAmericaTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1812 Top:166 Right:1833 Bottom:188+ Status = NONE+End++MappedImage AmericaProTabDown+ Texture = ReforgedHudAmericaTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1840 Top:4 Right:1861 Bottom:26+ Status = NONE+End++MappedImage AmericaProTabDownH+ Texture = ReforgedHudAmericaTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1840 Top:58 Right:1861 Bottom:80+ Status = NONE+End++MappedImage AmericaProTabDownP+ Texture = ReforgedHudAmericaTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1840 Top:112 Right:1861 Bottom:134+ Status = NONE+End++MappedImage AmericaProTabDownD+ Texture = ReforgedHudAmericaTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1840 Top:166 Right:1861 Bottom:188+ Status = NONE+End++MappedImage AmericaProTabThumb+ Texture = ReforgedHudAmericaTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1868 Top:4 Right:1889 Bottom:68+ Status = NONE+End++MappedImage AmericaProTabThumbH+ Texture = ReforgedHudAmericaTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1868 Top:76 Right:1889 Bottom:140+ Status = NONE+End++MappedImage AmericaProTabThumbP+ Texture = ReforgedHudAmericaTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1868 Top:148 Right:1889 Bottom:212+ Status = NONE+End++MappedImage AmericaProTabThumbD+ Texture = ReforgedHudAmericaTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1868 Top:220 Right:1889 Bottom:284+ Status = NONE+End++MappedImage AmericaProTabTrackTop+ Texture = ReforgedHudAmericaTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1896 Top:4 Right:1917 Bottom:12+ Status = NONE+End++MappedImage AmericaProTabTrackBottom+ Texture = ReforgedHudAmericaTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1896 Top:16 Right:1917 Bottom:24+ Status = NONE+End++MappedImage AmericaProTabTrackCenter+ Texture = ReforgedHudAmericaTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1896 Top:28 Right:1917 Bottom:44+ Status = NONE+End++MappedImage AmericaProTabTrackSmall+ Texture = ReforgedHudAmericaTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1896 Top:48 Right:1917 Bottom:50+ Status = NONE+Enddiff --git a/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedHudChinaTabPanel.ini b/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedHudChinaTabPanel.iniindex bf07f81e9..d534fe709 100644--- a/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedHudChinaTabPanel.ini+++ b/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedHudChinaTabPanel.ini@@ -9,6 +9,16 @@ MappedImage ChinaProTabPanelStatus = NONEEnd+; The campaign's painting (tab_panel solo), where the briefing list stands: one well for the titles and the+; table, no bands or rulings, on a texture of its own.+MappedImage ChinaProTabSolo+ Texture = ReforgedHudChinaTabSolo.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:0 Top:0 Right:1379 Bottom:714+ Status = NONE+End+; The screen's buttons (tab_button, TAB_BUTTONS), each at its size at 1080 and Diplomacy.cpp's dressTabButton; stretching it over its button: Send, the money's - and + (Square), Mute and Unmute, Main Menu (Exit); H hilited,; P pushed, D disabled.@@ -172,3 +182,134 @@ MappedImage ChinaProTabExitDCoords = Left:1640 Top:166 Right:1806 Bottom:214Status = NONEEnd++; The briefing list's scroll bar: the arrows (Up, Down) and the Thumb in four states, the track's groove in+; four pieces the slider lays end, repeats and end.++MappedImage ChinaProTabUp+ Texture = ReforgedHudChinaTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1812 Top:4 Right:1833 Bottom:26+ Status = NONE+End++MappedImage ChinaProTabUpH+ Texture = ReforgedHudChinaTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1812 Top:58 Right:1833 Bottom:80+ Status = NONE+End++MappedImage ChinaProTabUpP+ Texture = ReforgedHudChinaTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1812 Top:112 Right:1833 Bottom:134+ Status = NONE+End++MappedImage ChinaProTabUpD+ Texture = ReforgedHudChinaTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1812 Top:166 Right:1833 Bottom:188+ Status = NONE+End++MappedImage ChinaProTabDown+ Texture = ReforgedHudChinaTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1840 Top:4 Right:1861 Bottom:26+ Status = NONE+End++MappedImage ChinaProTabDownH+ Texture = ReforgedHudChinaTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1840 Top:58 Right:1861 Bottom:80+ Status = NONE+End++MappedImage ChinaProTabDownP+ Texture = ReforgedHudChinaTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1840 Top:112 Right:1861 Bottom:134+ Status = NONE+End++MappedImage ChinaProTabDownD+ Texture = ReforgedHudChinaTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1840 Top:166 Right:1861 Bottom:188+ Status = NONE+End++MappedImage ChinaProTabThumb+ Texture = ReforgedHudChinaTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1868 Top:4 Right:1889 Bottom:68+ Status = NONE+End++MappedImage ChinaProTabThumbH+ Texture = ReforgedHudChinaTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1868 Top:76 Right:1889 Bottom:140+ Status = NONE+End++MappedImage ChinaProTabThumbP+ Texture = ReforgedHudChinaTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1868 Top:148 Right:1889 Bottom:212+ Status = NONE+End++MappedImage ChinaProTabThumbD+ Texture = ReforgedHudChinaTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1868 Top:220 Right:1889 Bottom:284+ Status = NONE+End++MappedImage ChinaProTabTrackTop+ Texture = ReforgedHudChinaTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1896 Top:4 Right:1917 Bottom:12+ Status = NONE+End++MappedImage ChinaProTabTrackBottom+ Texture = ReforgedHudChinaTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1896 Top:16 Right:1917 Bottom:24+ Status = NONE+End++MappedImage ChinaProTabTrackCenter+ Texture = ReforgedHudChinaTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1896 Top:28 Right:1917 Bottom:44+ Status = NONE+End++MappedImage ChinaProTabTrackSmall+ Texture = ReforgedHudChinaTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1896 Top:48 Right:1917 Bottom:50+ Status = NONE+Enddiff --git a/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedHudGlaTabPanel.ini b/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedHudGlaTabPanel.iniindex 15c43b4e4..c9b60065e 100644--- a/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedHudGlaTabPanel.ini+++ b/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedHudGlaTabPanel.ini@@ -9,6 +9,16 @@ MappedImage GlaProTabPanelStatus = NONEEnd+; The campaign's painting (tab_panel solo), where the briefing list stands: one well for the titles and the+; table, no bands or rulings, on a texture of its own.+MappedImage GlaProTabSolo+ Texture = ReforgedHudGlaTabSolo.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:0 Top:0 Right:1379 Bottom:714+ Status = NONE+End+; The screen's buttons (tab_button, TAB_BUTTONS), each at its size at 1080 and Diplomacy.cpp's dressTabButton; stretching it over its button: Send, the money's - and + (Square), Mute and Unmute, Main Menu (Exit); H hilited,; P pushed, D disabled.@@ -172,3 +182,134 @@ MappedImage GlaProTabExitDCoords = Left:1640 Top:166 Right:1806 Bottom:214Status = NONEEnd++; The briefing list's scroll bar: the arrows (Up, Down) and the Thumb in four states, the track's groove in+; four pieces the slider lays end, repeats and end.++MappedImage GlaProTabUp+ Texture = ReforgedHudGlaTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1812 Top:4 Right:1833 Bottom:26+ Status = NONE+End++MappedImage GlaProTabUpH+ Texture = ReforgedHudGlaTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1812 Top:58 Right:1833 Bottom:80+ Status = NONE+End++MappedImage GlaProTabUpP+ Texture = ReforgedHudGlaTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1812 Top:112 Right:1833 Bottom:134+ Status = NONE+End++MappedImage GlaProTabUpD+ Texture = ReforgedHudGlaTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1812 Top:166 Right:1833 Bottom:188+ Status = NONE+End++MappedImage GlaProTabDown+ Texture = ReforgedHudGlaTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1840 Top:4 Right:1861 Bottom:26+ Status = NONE+End++MappedImage GlaProTabDownH+ Texture = ReforgedHudGlaTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1840 Top:58 Right:1861 Bottom:80+ Status = NONE+End++MappedImage GlaProTabDownP+ Texture = ReforgedHudGlaTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1840 Top:112 Right:1861 Bottom:134+ Status = NONE+End++MappedImage GlaProTabDownD+ Texture = ReforgedHudGlaTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1840 Top:166 Right:1861 Bottom:188+ Status = NONE+End++MappedImage GlaProTabThumb+ Texture = ReforgedHudGlaTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1868 Top:4 Right:1889 Bottom:68+ Status = NONE+End++MappedImage GlaProTabThumbH+ Texture = ReforgedHudGlaTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1868 Top:76 Right:1889 Bottom:140+ Status = NONE+End++MappedImage GlaProTabThumbP+ Texture = ReforgedHudGlaTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1868 Top:148 Right:1889 Bottom:212+ Status = NONE+End++MappedImage GlaProTabThumbD+ Texture = ReforgedHudGlaTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1868 Top:220 Right:1889 Bottom:284+ Status = NONE+End++MappedImage GlaProTabTrackTop+ Texture = ReforgedHudGlaTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1896 Top:4 Right:1917 Bottom:12+ Status = NONE+End++MappedImage GlaProTabTrackBottom+ Texture = ReforgedHudGlaTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1896 Top:16 Right:1917 Bottom:24+ Status = NONE+End++MappedImage GlaProTabTrackCenter+ Texture = ReforgedHudGlaTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1896 Top:28 Right:1917 Bottom:44+ Status = NONE+End++MappedImage GlaProTabTrackSmall+ Texture = ReforgedHudGlaTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1896 Top:48 Right:1917 Bottom:50+ Status = NONE+Enddiff --git a/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedHudObsTabPanel.ini b/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedHudObsTabPanel.iniindex f198d9983..6a349b275 100644--- a/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedHudObsTabPanel.ini+++ b/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedHudObsTabPanel.ini@@ -172,3 +172,134 @@ MappedImage HelpboxTabExitDCoords = Left:1640 Top:166 Right:1806 Bottom:214Status = NONEEnd++; The briefing list's scroll bar: the arrows (Up, Down) and the Thumb in four states, the track's groove in+; four pieces the slider lays end, repeats and end.++MappedImage HelpboxTabUp+ Texture = ReforgedHudObsTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1812 Top:4 Right:1833 Bottom:26+ Status = NONE+End++MappedImage HelpboxTabUpH+ Texture = ReforgedHudObsTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1812 Top:58 Right:1833 Bottom:80+ Status = NONE+End++MappedImage HelpboxTabUpP+ Texture = ReforgedHudObsTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1812 Top:112 Right:1833 Bottom:134+ Status = NONE+End++MappedImage HelpboxTabUpD+ Texture = ReforgedHudObsTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1812 Top:166 Right:1833 Bottom:188+ Status = NONE+End++MappedImage HelpboxTabDown+ Texture = ReforgedHudObsTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1840 Top:4 Right:1861 Bottom:26+ Status = NONE+End++MappedImage HelpboxTabDownH+ Texture = ReforgedHudObsTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1840 Top:58 Right:1861 Bottom:80+ Status = NONE+End++MappedImage HelpboxTabDownP+ Texture = ReforgedHudObsTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1840 Top:112 Right:1861 Bottom:134+ Status = NONE+End++MappedImage HelpboxTabDownD+ Texture = ReforgedHudObsTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1840 Top:166 Right:1861 Bottom:188+ Status = NONE+End++MappedImage HelpboxTabThumb+ Texture = ReforgedHudObsTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1868 Top:4 Right:1889 Bottom:68+ Status = NONE+End++MappedImage HelpboxTabThumbH+ Texture = ReforgedHudObsTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1868 Top:76 Right:1889 Bottom:140+ Status = NONE+End++MappedImage HelpboxTabThumbP+ Texture = ReforgedHudObsTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1868 Top:148 Right:1889 Bottom:212+ Status = NONE+End++MappedImage HelpboxTabThumbD+ Texture = ReforgedHudObsTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1868 Top:220 Right:1889 Bottom:284+ Status = NONE+End++MappedImage HelpboxTabTrackTop+ Texture = ReforgedHudObsTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1896 Top:4 Right:1917 Bottom:12+ Status = NONE+End++MappedImage HelpboxTabTrackBottom+ Texture = ReforgedHudObsTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1896 Top:16 Right:1917 Bottom:24+ Status = NONE+End++MappedImage HelpboxTabTrackCenter+ Texture = ReforgedHudObsTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1896 Top:28 Right:1917 Bottom:44+ Status = NONE+End++MappedImage HelpboxTabTrackSmall+ Texture = ReforgedHudObsTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1896 Top:48 Right:1917 Bottom:50+ Status = NONE+Enddiff --git a/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedHudTurkiyeTabPanel.ini b/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedHudTurkiyeTabPanel.iniindex cbd90e127..7833b1400 100644--- a/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedHudTurkiyeTabPanel.ini+++ b/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedHudTurkiyeTabPanel.ini@@ -9,6 +9,16 @@ MappedImage TurkiyeProTabPanelStatus = NONEEnd+; The campaign's painting (tab_panel solo), where the briefing list stands: one well for the titles and the+; table, no bands or rulings, on a texture of its own.+MappedImage TurkiyeProTabSolo+ Texture = ReforgedHudTurkiyeTabSolo.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:0 Top:0 Right:1379 Bottom:714+ Status = NONE+End+; The screen's buttons (tab_button, TAB_BUTTONS), each at its size at 1080 and Diplomacy.cpp's dressTabButton; stretching it over its button: Send, the money's - and + (Square), Mute and Unmute, Main Menu (Exit); H hilited,; P pushed, D disabled.@@ -172,3 +182,134 @@ MappedImage TurkiyeProTabExitDCoords = Left:1640 Top:166 Right:1806 Bottom:214Status = NONEEnd++; The briefing list's scroll bar: the arrows (Up, Down) and the Thumb in four states, the track's groove in+; four pieces the slider lays end, repeats and end.++MappedImage TurkiyeProTabUp+ Texture = ReforgedHudTurkiyeTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1812 Top:4 Right:1833 Bottom:26+ Status = NONE+End++MappedImage TurkiyeProTabUpH+ Texture = ReforgedHudTurkiyeTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1812 Top:58 Right:1833 Bottom:80+ Status = NONE+End++MappedImage TurkiyeProTabUpP+ Texture = ReforgedHudTurkiyeTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1812 Top:112 Right:1833 Bottom:134+ Status = NONE+End++MappedImage TurkiyeProTabUpD+ Texture = ReforgedHudTurkiyeTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1812 Top:166 Right:1833 Bottom:188+ Status = NONE+End++MappedImage TurkiyeProTabDown+ Texture = ReforgedHudTurkiyeTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1840 Top:4 Right:1861 Bottom:26+ Status = NONE+End++MappedImage TurkiyeProTabDownH+ Texture = ReforgedHudTurkiyeTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1840 Top:58 Right:1861 Bottom:80+ Status = NONE+End++MappedImage TurkiyeProTabDownP+ Texture = ReforgedHudTurkiyeTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1840 Top:112 Right:1861 Bottom:134+ Status = NONE+End++MappedImage TurkiyeProTabDownD+ Texture = ReforgedHudTurkiyeTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1840 Top:166 Right:1861 Bottom:188+ Status = NONE+End++MappedImage TurkiyeProTabThumb+ Texture = ReforgedHudTurkiyeTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1868 Top:4 Right:1889 Bottom:68+ Status = NONE+End++MappedImage TurkiyeProTabThumbH+ Texture = ReforgedHudTurkiyeTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1868 Top:76 Right:1889 Bottom:140+ Status = NONE+End++MappedImage TurkiyeProTabThumbP+ Texture = ReforgedHudTurkiyeTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1868 Top:148 Right:1889 Bottom:212+ Status = NONE+End++MappedImage TurkiyeProTabThumbD+ Texture = ReforgedHudTurkiyeTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1868 Top:220 Right:1889 Bottom:284+ Status = NONE+End++MappedImage TurkiyeProTabTrackTop+ Texture = ReforgedHudTurkiyeTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1896 Top:4 Right:1917 Bottom:12+ Status = NONE+End++MappedImage TurkiyeProTabTrackBottom+ Texture = ReforgedHudTurkiyeTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1896 Top:16 Right:1917 Bottom:24+ Status = NONE+End++MappedImage TurkiyeProTabTrackCenter+ Texture = ReforgedHudTurkiyeTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1896 Top:28 Right:1917 Bottom:44+ Status = NONE+End++MappedImage TurkiyeProTabTrackSmall+ Texture = ReforgedHudTurkiyeTabPanel.tga+ TextureWidth = 2048+ TextureHeight = 1024+ Coords = Left:1896 Top:48 Right:1917 Bottom:50+ Status = NONE+Enddiff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Diplomacy.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Diplomacy.cppindex add6e1c59..449140b87 100644--- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Diplomacy.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Diplomacy.cpp@@ -48,6 +48,7 @@#include "GameClient/GadgetCheckBox.h"#include "GameClient/GadgetListBox.h"#include "GameClient/GadgetPushButton.h"+#include "GameClient/GadgetSlider.h"#include "GameClient/GadgetTextEntry.h"#include "GameClient/GadgetStaticText.h"#include "GameClient/GadgetRadioButton.h"@@ -386,8 +387,8 @@ static void dressTabButton( GameWindow *button, const char *piece )/// The Tab screen's controls on the scheme's painting (Tools/hud_command_bar.py tab_panel, TAB_BUTTONS): the/// Main Menu, mute and money buttons in the side's pieces, and the campaign's briefing list without EA's-/// veil and blue rule, standing in the painting's glass (y 99..608 of the 714 the window is at 1080) so its-/// lines read on the wells and not across their lips.+/// veil and blue rule, standing in the solo painting's one well (y 99..608 of the 714 the window is at+/// 1080), its scroll bar's arrows, thumb and groove (TAB_TRACK) in the same pieces.static void dressForPanel( void ){Int width, height;@@ -416,6 +417,21 @@ static void dressForPanel( void )listboxSolo->winGetSize(&listWidth, &listHeight);listboxSolo->winSetPosition(x, y + panelY + height * 99 / 714 - screenY);listboxSolo->winSetSize(listWidth, height * (608 - 99) / 714);++ GameWindow *slider = GadgetListBoxGetSlider(listboxSolo);+ dressTabButton(GadgetListBoxGetUpButton(listboxSolo), "Up");+ dressTabButton(GadgetListBoxGetDownButton(listboxSolo), "Down");+ dressTabButton(GadgetSliderGetThumb(slider), "Thumb");+ const ControlBarSchemeManager *schemes = TheControlBar->getControlBarSchemeManager();+ const Image *top = schemes->getTabImage("TrackTop");+ const Image *bottom = schemes->getTabImage("TrackBottom");+ const Image *center = schemes->getTabImage("TrackCenter");+ const Image *smallCenter = schemes->getTabImage("TrackSmall");+ GadgetSliderSetEnabledImages(slider, top, bottom, center, smallCenter);+ GadgetSliderSetHiliteImages(slider, top, bottom, center, smallCenter);+ GadgetSliderSetDisabledImages(slider, top, bottom, center, smallCenter);+ // gogoGadgetSlider gives a listbox's slider the colour draw whatever its images+ slider->winSetDrawFunc(TheWindowManager->getVerticalSliderImageDrawFunc());}// ------------------------------------------------------------------------------------------------@@ -479,7 +495,9 @@ void ShowDiplomacy( Bool immediate )const Image *panel = TheControlBar->getControlBarSchemeManager()->getTabPanelImage();if (panel){- theWindow->winSetEnabledImage(0, panel);+ // the campaign's briefing list wants the painting without the table's rows (<TooltipImage>TabSolo)+ const Image *solo = TheRecorder->isMultiplayer() ? NULL : TheControlBar->getControlBarSchemeManager()->getTabImage("Solo");+ theWindow->winSetEnabledImage(0, solo ? solo : panel);theWindow->winSetStatus(WIN_STATUS_IMAGE);theWindow->winSetPosition(0, 0);Int width, height;diff --git a/GeneralsMD/Code/Tools/hud_command_bar.py b/GeneralsMD/Code/Tools/hud_command_bar.pyindex b730ec6e4..63517ac49 100644--- a/GeneralsMD/Code/Tools/hud_command_bar.py+++ b/GeneralsMD/Code/Tools/hud_command_bar.py@@ -2042,7 +2042,10 @@ TAB_HIDE = (1160, 650, 1160 + tab_u(763) - tab_u(671), 650 + tab_u(397) - tab_u(TAB_COLUMNS = [tab_u(u) for u in (46, 178, 319, 364, 408, 460, 560)] # between mute, player, side, ping, fps, team, status, money-def tab_panel(side):+def tab_panel(side, solo=False):+ """The Tab screen's painting on its sheet, the buttons beside it; solo is the campaign's (<prefix>TabSolo on+ ReforgedHud<Side>TabSolo), where the briefing list stands: the titles' and the table's wells are one, with+ no bands or rulings for its lines to fall across, and its sheet holds the painting alone."""look = BAR_LOOKS[side]build = look["build"]W, H = TAB_PANEL@@ -2062,17 +2065,20 @@ def tab_panel(side):[(10, 10), (W - 11, 10), (W - 11, H - 44), (W - 22, H - 44), (W - 22, H - 22), (W - 44, H - 22), (W - 44, H - 13),(10, H - 13)]], (True, False, True, False))c = 6 if kind != "rough" else 5- p.sink([shape(build, *TAB_TITLES, c)], 6, 2.5)- p.sink([shape(build, *TAB_TABLE, c)], 6, 2.5)+ if solo:+ p.sink([shape(build, TAB_TITLES[0], TAB_TITLES[1], TAB_TITLES[2], TAB_TABLE[3], c)], 6, 2.5)+ else:+ p.sink([shape(build, *TAB_TITLES, c)], 6, 2.5)+ p.sink([shape(build, *TAB_TABLE, c)], 6, 2.5)+ # the table's rulings: a hairline between rows and down the columns, faint in the glass+ rule = [plate(TAB_TABLE[0] + 8, (a[1] + b[0]) / 2, TAB_TABLE[2] - 8, (a[1] + b[0]) / 2 + 1) for a, b in zip(TAB_ROWS, TAB_ROWS[1:])]+ rule += [plate(x, TAB_TITLES[1] + 6, x + 1, TAB_TITLES[3] - 6) for x in TAB_COLUMNS]+ p.inlay(rule, INKM, 0.3)p.sink([shape(build, *grow(TAB_HIDE, 5), c)], 5, 2)- # the table's rulings: a hairline between rows and down the columns, faint in the glass- rule = [plate(TAB_TABLE[0] + 8, (a[1] + b[0]) / 2, TAB_TABLE[2] - 8, (a[1] + b[0]) / 2 + 1) for a, b in zip(TAB_ROWS, TAB_ROWS[1:])]- rule += [plate(x, TAB_TITLES[1] + 6, x + 1, TAB_TITLES[3] - 6) for x in TAB_COLUMNS]- p.inlay(rule, INKM, 0.3)top, foot = (12, TAB_TITLES[1] - 6), (TAB_TABLE[3] + 6, H - 15) # the plain strips above and below the wellstab_fittings(p, build, W, H, top, foot)img = bar_finish(shade(p, look), p, look)- if TAB_ZEBRA: # every other row's band of glass a shade lighter+ if TAB_ZEBRA and not solo: # every other row's band of glass a shade lightera = np.asarray(img).astype(np.float32)for y0, y1 in TAB_ROWS[1::2]:band = a[y0 - 3:y1 + 4, TAB_TABLE[0] + 6:TAB_TABLE[2] - 6, :3]@@ -2083,10 +2089,14 @@ def tab_panel(side):[(344, 22, TURQ), (W - 186, foot[0] + 9, AMBER)])sheet_img = Image.new("RGBA", TAB_SHEET, (0, 0, 0, 0))sheet_img.paste(img.crop((0, 0, W, H)), (0, 0))+ if solo:+ return sheet_imgboxes = tab_button_boxes()for kind in TAB_BUTTONS:for state in TAB_STATES:put(sheet_img, tab_button(side, kind, state), boxes["Tab" + kind + state])+ for name, piece in tab_track(side).items():+ put(sheet_img, piece, boxes["Tab" + name])return sheet_img@@ -2164,16 +2174,31 @@ def tab_fittings(p, build, W, H, top, foot):# be heard) and Unmute (he is muted) carry a speaker, its sound in two arcs or struck through. D is disabled.TAB_BUTTONS = dict(Send=(tab_u(760) - tab_u(700), tab_u(118) - tab_u(94)), Square=(tab_u(590) - tab_u(566), tab_u(118) - tab_u(94)),Mute=(tab_u(44) - tab_u(20), tab_u(118) - tab_u(94)), Unmute=(tab_u(44) - tab_u(20), tab_u(118) - tab_u(94)),- Exit=(TAB_HIDE[2] - TAB_HIDE[0], TAB_HIDE[3] - TAB_HIDE[1]))-TAB_BUTTON_X = dict(Send=1384, Square=1496, Mute=1544, Unmute=1592, Exit=1640)+ Exit=(TAB_HIDE[2] - TAB_HIDE[0], TAB_HIDE[3] - TAB_HIDE[1]),+ Up=(21, 22), Down=(21, 22), Thumb=(21, 64))+# The campaign briefing's scroll bar (GadgetListboxCreateScrollbar: arrows 21x22 in screen pixels at every+# resolution, the slider 21 wide): Up and Down carry an arrow, the Thumb is a bezel the code stretches along+# the track, and the track is a groove in four pieces the slider lays end, repeats and end+# (TAB_TRACK: Top and Bottom, Center and Small repeated between them, even down their length so they tile).+TAB_BUTTON_X = dict(Send=1384, Square=1496, Mute=1544, Unmute=1592, Exit=1640, Up=1812, Down=1840, Thumb=1868)TAB_STATES = ("", "H", "P", "D")TAB_BUTTON_STEP = 54+TAB_TRACK = dict(TrackTop=(21, 8), TrackBottom=(21, 8), TrackCenter=(21, 16), TrackSmall=(21, 2))+TAB_TRACK_X = 1896def tab_button_boxes():- """Tab<kind><state> -> its box on the sheet, the states one under the other."""- return {"Tab" + kind + state: (TAB_BUTTON_X[kind], 4 + TAB_BUTTON_STEP * i, TAB_BUTTON_X[kind] + w, 4 + TAB_BUTTON_STEP * i + h)- for kind, (w, h) in TAB_BUTTONS.items() for i, state in enumerate(TAB_STATES)}+ """Tab<kind><state> -> its box on the sheet, the states one under the other, and the track's pieces."""+ boxes = {}+ for kind, (w, h) in TAB_BUTTONS.items():+ step = TAB_BUTTON_STEP if h <= TAB_BUTTON_STEP - 6 else h + 8 # the thumb's states need more+ for i, state in enumerate(TAB_STATES):+ boxes["Tab" + kind + state] = (TAB_BUTTON_X[kind], 4 + step * i, TAB_BUTTON_X[kind] + w, 4 + step * i + h)+ y = 4+ for name, (w, h) in TAB_TRACK.items():+ boxes["Tab" + name] = (TAB_TRACK_X, y, TAB_TRACK_X + w, y + h)+ y += h + 4+ return boxesdef arc(cx, cy, r, t, sweep=0.8, n=10):@@ -2201,25 +2226,48 @@ def tab_button(side, kind, state):p = Painter(w + 2 * o, h + 2 * o) # go bad on one 31 texels highst = "I" if state == "D" else statebutton(p, (o, o, o + w, o + h), None, st, build)- if kind in ("Mute", "Unmute"):- off = 1 if state == "P" else 0- p.bump(speaker(o + w / 2 + off, o + h / 2 + off, kind == "Unmute"), 1.1, 0.6,- {"": PAPERM, "H": GOLDM, "P": HILITE, "I": DIM}[st])+ off = 1 if state == "P" else 0+ cx, cy = o + w / 2 + off, o + h / 2 + off+ glyph = {"Mute": speaker(cx, cy, False), "Unmute": speaker(cx, cy, True),+ "Up": [[(cx, cy - 4), (cx + 4.5, cy + 3), (cx - 4.5, cy + 3)]],+ "Down": [[(cx - 4.5, cy - 3), (cx + 4.5, cy - 3), (cx, cy + 4)]]}.get(kind)+ if glyph:+ p.bump(glyph, 1.1, 0.6, {"": PAPERM, "H": GOLDM, "P": HILITE, "I": DIM}[st])return shade(p, look, shadow=False, falloff=False).crop((o, o, o + w, o + h))-def check_tab(sheet_img, side_name, prefix):- """The painting and its buttons are mapped where the generator put them, the painting opaque along the+def tab_track(side):+ """The scroll bar's groove: one drawn 21x64 and cut, Center and Small its middle rows averaged down the+ length, so a repeat of them shows no seam."""+ look = BAR_LOOKS[side]+ build = look["build"]+ w, h, o = 21, 64, 32+ p = Painter(w + 2 * o, h + 2 * o)+ p.frame([shape(build, o, o, o + w, o + h, 3)], 2.0, build, DARK, BEZEL_SCALE)+ p.sink([plate(o + 5, o + 4, o + w - 5, o + h - 4)], 2.0, 1.0)+ groove = shade(p, look, shadow=False, falloff=False).crop((o, o, o + w, o + h))+ middle = np.asarray(groove)[24:40].astype(np.float32).mean(axis=0, keepdims=True).round().astype(np.uint8)+ return {"TrackTop": groove.crop((0, 0, w, 8)), "TrackBottom": groove.crop((0, h - 8, w, h)),+ "TrackCenter": Image.fromarray(np.repeat(middle, 16, axis=0), "RGBA"),+ "TrackSmall": Image.fromarray(np.repeat(middle, 2, axis=0), "RGBA")}+++def check_tab(sheet_img, side_name, prefix, solo_img=None):+ """The paintings and the buttons are mapped where the generator put them, each painting opaque along thescreen's two edges it stands on, and the rows, the titles and the Main Menu button stand on it."""M = read_mapped(side_name, "TabPanel")want = {prefix + "TabPanel": (0, 0) + TAB_PANEL}+ if solo_img is not None:+ want[prefix + "TabSolo"] = (0, 0) + TAB_PANELwant.update({prefix + name: box for name, box in tab_button_boxes().items()})assert M == want, "ReforgedHud%sTabPanel.ini maps %s, the generator draws %s" % (side_name, sorted(set(M) ^ set(want)) or M, want)- a = np.asarray(sheet_img)[..., 3]W, H = TAB_PANEL- assert (a[0, :W - 60] == 255).all() and (a[:H - 60, 0] == 255).all(), "the Tab screen leaves the screen's edge"- for x0, y0, x1, y1 in [TAB_TITLES, TAB_TABLE, TAB_HIDE]:- assert (a[y0:y1, x0:x1] == 255).all(), "the Tab screen has a hole under %s" % ((x0, y0, x1, y1),)+ for img in [sheet_img] + ([solo_img] if solo_img is not None else []):+ a = np.asarray(img)[..., 3]+ assert (a[0, :W - 60] == 255).all() and (a[:H - 60, 0] == 255).all(), "the Tab screen leaves the screen's edge"+ for x0, y0, x1, y1 in [TAB_TITLES, TAB_TABLE, TAB_HIDE]:+ assert (a[y0:y1, x0:x1] == 255).all(), "the Tab screen has a hole under %s" % ((x0, y0, x1, y1),)+ a = np.asarray(sheet_img)[..., 3]for name, (x0, y0, x1, y1) in tab_button_boxes().items():assert (a[y0 + 8:y1 - 8, x0 + 8:x1 - 8] == 255).all(), "%s%s has a hole in its face" % (prefix, name)@@ -3278,7 +3326,8 @@ def main():made["ReforgedHud%sPowers" % side] = sheet_img = paint_powers(side, args.emblem, frame, args.ready_glow)check_sheet(sheet_img, side, args.ready_glow)made["ReforgedHud%sTabPanel" % side] = tab = tab_panel(side)- check_tab(tab, side, side + "Pro")+ made["ReforgedHud%sTabSolo" % side] = solo = tab_panel(side, solo=True)+ check_tab(tab, side, side + "Pro", solo)for name, img in made.items():img.save(os.path.join(args.out, name + ".png"))if args.dds: