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.

feat(controlbar): side-styled tooltip cards with stat icons

Olcay Seygan315277602f8b
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6eca57df7..263d961ff 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -25,6 +25,7 @@ found and fixed, EA's own, not port damage.**
- Watching a match gets a bar of its own in dark graphite with rounded corners. Its radar takes the map's shape as a player's does, and the column of players stands against the radar's edge on a tall map instead of leaving a gap. A lamp in each player's colour sits beside his button, with a ring round the one you point at and a brighter one round the player you are watching.
- While you watch, a rack of drawers hangs from the right edge under the superweapon countdowns. The top drawer holds a lever for the camera with three stops (yours, the director that goes to the biggest fight by itself, or the followed player's own screen), a switch for that player's fog of war and a switch that slides the armies drawer out. Under it every player is ranked on a dial of seven numbers: net worth, cash, income a minute, army value, kills and losses, general's rank and power. Turn it with a click, the wheel or Q, W, E, R, T, Y and A, and each row's bar shows his share of the leader's number. A tab out of each row follows that player, a second click lets him go, and the armies drawer lists the six kinds of unit he has most of, with how many. A click on the rack never reaches the battlefield.
- 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 graphite in the menus.
- 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, and a mod's army carries the card of the country it is built on. 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.
## Your queue in pictures again
diff --git a/GeneralsMD/Code/Data/Art/Textures/ReforgedHudAmericaPowers.dds b/GeneralsMD/Code/Data/Art/Textures/ReforgedHudAmericaPowers.dds
index 72a75f844..691ac6e5d 100644
Binary files a/GeneralsMD/Code/Data/Art/Textures/ReforgedHudAmericaPowers.dds and b/GeneralsMD/Code/Data/Art/Textures/ReforgedHudAmericaPowers.dds differ
diff --git a/GeneralsMD/Code/Data/Art/Textures/ReforgedHudChinaPowers.dds b/GeneralsMD/Code/Data/Art/Textures/ReforgedHudChinaPowers.dds
index 2cc328f90..6b2657641 100644
Binary files a/GeneralsMD/Code/Data/Art/Textures/ReforgedHudChinaPowers.dds and b/GeneralsMD/Code/Data/Art/Textures/ReforgedHudChinaPowers.dds differ
diff --git a/GeneralsMD/Code/Data/Art/Textures/ReforgedHudGlaPowers.dds b/GeneralsMD/Code/Data/Art/Textures/ReforgedHudGlaPowers.dds
index 4a27d9813..84fb841dc 100644
Binary files a/GeneralsMD/Code/Data/Art/Textures/ReforgedHudGlaPowers.dds and b/GeneralsMD/Code/Data/Art/Textures/ReforgedHudGlaPowers.dds differ
diff --git a/GeneralsMD/Code/Data/Art/Textures/ReforgedHudHelpbox.dds b/GeneralsMD/Code/Data/Art/Textures/ReforgedHudHelpbox.dds
index e3710f695..b19b10607 100644
Binary files a/GeneralsMD/Code/Data/Art/Textures/ReforgedHudHelpbox.dds and b/GeneralsMD/Code/Data/Art/Textures/ReforgedHudHelpbox.dds differ
diff --git a/GeneralsMD/Code/Data/Art/Textures/ReforgedHudTurkiyePowers.dds b/GeneralsMD/Code/Data/Art/Textures/ReforgedHudTurkiyePowers.dds
index 95700474c..666346864 100644
Binary files a/GeneralsMD/Code/Data/Art/Textures/ReforgedHudTurkiyePowers.dds and b/GeneralsMD/Code/Data/Art/Textures/ReforgedHudTurkiyePowers.dds differ
diff --git a/GeneralsMD/Code/Data/French/Generals.str b/GeneralsMD/Code/Data/French/Generals.str
index 25b022967..049102812 100644
--- a/GeneralsMD/Code/Data/French/Generals.str
+++ b/GeneralsMD/Code/Data/French/Generals.str
@@ -16389,10 +16389,6 @@ TOOLTIP:SupplyPileFull
"\n Pris : la limite par réserve tient vos collecteurs à l'écart"
END
-TOOLTIP:StatTime
-"Temps de construction"
-END
-
TOOLTIP:StatSeconds
"%ds"
END
diff --git a/GeneralsMD/Code/Data/German/Generals.str b/GeneralsMD/Code/Data/German/Generals.str
index 3bb21ccc3..76acd5093 100644
--- a/GeneralsMD/Code/Data/German/Generals.str
+++ b/GeneralsMD/Code/Data/German/Generals.str
@@ -14625,10 +14625,6 @@ TOOLTIP:SupplyPileFull
"\n Belegt: Das Haufenlimit hält deine Sammler fern"
END
-TOOLTIP:StatTime
-"Bauzeit"
-END
-
TOOLTIP:StatDamage
"Schaden"
END
diff --git a/GeneralsMD/Code/Data/INI/ControlBarProReforged.ini b/GeneralsMD/Code/Data/INI/ControlBarProReforged.ini
index 6649792af..213573dbf 100644
--- a/GeneralsMD/Code/Data/INI/ControlBarProReforged.ini
+++ b/GeneralsMD/Code/Data/INI/ControlBarProReforged.ini
@@ -157,6 +157,7 @@ ControlBarScheme America8x6
IdleAircraftLR X:1366 Y:1071
RadarFrameImage AmericaProRadar
PowerTrayImage AmericaProTray
+ TooltipImage AmericaPro
End
@@ -276,6 +277,7 @@ ControlBarScheme Turkiye8x6
IdleAircraftLR X:1366 Y:1071
RadarFrameImage TurkiyeProRadar
PowerTrayImage TurkiyeProTray
+ TooltipImage TurkiyePro
End
@@ -393,6 +395,7 @@ ControlBarScheme GLA8x6
IdleAircraftLR X:1366 Y:1071
RadarFrameImage GlaProRadar
PowerTrayImage GlaProTray
+ TooltipImage GlaPro
End
@@ -511,6 +514,7 @@ ControlBarScheme China8x6
IdleAircraftLR X:1366 Y:1071
RadarFrameImage ChinaProRadar
PowerTrayImage ChinaProTray
+ TooltipImage ChinaPro
End
@@ -602,6 +606,7 @@ ControlBarScheme Observer8x6
; edge; the superweapon tray in America's pieces, standing where it does in a player's game
RadarFrameImage ObserverProRadar
PowerTrayImage AmericaProTray
+ TooltipImage Helpbox
End
;-----------------------GENERALS CHALLENGE
@@ -721,6 +726,7 @@ ControlBarScheme AmericaSuperWeaponGeneral8x6
IdleAircraftLR X:1366 Y:1071
RadarFrameImage AmericaProRadar
PowerTrayImage AmericaProTray
+ TooltipImage AmericaPro
End
@@ -837,6 +843,7 @@ ControlBarScheme AmericaLaserGeneral8x6
IdleAircraftLR X:1366 Y:1071
RadarFrameImage AmericaProRadar
PowerTrayImage AmericaProTray
+ TooltipImage AmericaPro
End
@@ -955,6 +962,7 @@ ControlBarScheme AmericaAirForceGeneral8x6
IdleAircraftLR X:1366 Y:1071
RadarFrameImage AmericaProRadar
PowerTrayImage AmericaProTray
+ TooltipImage AmericaPro
End
@@ -1098,6 +1106,7 @@ ControlBarScheme ChinaTankGeneral8x6
IdleAircraftLR X:1366 Y:1071
RadarFrameImage ChinaProRadar
PowerTrayImage ChinaProTray
+ TooltipImage ChinaPro
End
@@ -1217,6 +1226,7 @@ ControlBarScheme ChinaInfantryGeneral8x6
IdleAircraftLR X:1366 Y:1071
RadarFrameImage ChinaProRadar
PowerTrayImage ChinaProTray
+ TooltipImage ChinaPro
End
@@ -1338,6 +1348,7 @@ ControlBarScheme ChinaNukeGeneral8x6
IdleAircraftLR X:1366 Y:1071
RadarFrameImage ChinaProRadar
PowerTrayImage ChinaProTray
+ TooltipImage ChinaPro
End
@@ -1474,6 +1485,7 @@ ControlBarScheme GLAToxinGeneral8x6
IdleAircraftLR X:1366 Y:1071
RadarFrameImage GlaProRadar
PowerTrayImage GlaProTray
+ TooltipImage GlaPro
End
@@ -1593,6 +1605,7 @@ ControlBarScheme GLADemolitionGeneral8x6
IdleAircraftLR X:1366 Y:1071
RadarFrameImage GlaProRadar
PowerTrayImage GlaProTray
+ TooltipImage GlaPro
End
@@ -1712,6 +1725,7 @@ ControlBarScheme GLAStealthGeneral8x6
IdleAircraftLR X:1366 Y:1071
RadarFrameImage GlaProRadar
PowerTrayImage GlaProTray
+ TooltipImage GlaPro
End
@@ -1833,5 +1847,6 @@ ControlBarScheme ChinaBossGeneral8x6
IdleAircraftLR X:1366 Y:1071
RadarFrameImage ChinaProRadar
PowerTrayImage ChinaProTray
+ TooltipImage ChinaPro
End
diff --git a/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedHudAmericaPowers.ini b/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedHudAmericaPowers.ini
index 27a4be624..bdbdbaab2 100644
--- a/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedHudAmericaPowers.ini
+++ b/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedHudAmericaPowers.ini
@@ -627,3 +627,243 @@ MappedImage AmericaProGenPowerCloseI
Coords = Left:736 Top:112 Right:796 Bottom:162
Status = NONE
End
+
+MappedImage AmericaProTipTL
+ Texture = ReforgedHudAmericaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:258 Top:647 Right:274 Bottom:715
+ Status = NONE
+End
+
+MappedImage AmericaProTipT
+ Texture = ReforgedHudAmericaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:278 Top:647 Right:406 Bottom:715
+ Status = NONE
+End
+
+MappedImage AmericaProTipTR
+ Texture = ReforgedHudAmericaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:410 Top:647 Right:458 Bottom:715
+ Status = NONE
+End
+
+MappedImage AmericaProTipL
+ Texture = ReforgedHudAmericaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:258 Top:719 Right:274 Bottom:783
+ Status = NONE
+End
+
+MappedImage AmericaProTipC
+ Texture = ReforgedHudAmericaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:278 Top:719 Right:342 Bottom:783
+ Status = NONE
+End
+
+MappedImage AmericaProTipR
+ Texture = ReforgedHudAmericaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:410 Top:719 Right:458 Bottom:783
+ Status = NONE
+End
+
+MappedImage AmericaProTipBL
+ Texture = ReforgedHudAmericaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:258 Top:787 Right:274 Bottom:801
+ Status = NONE
+End
+
+MappedImage AmericaProTipB
+ Texture = ReforgedHudAmericaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:278 Top:787 Right:406 Bottom:801
+ Status = NONE
+End
+
+MappedImage AmericaProTipBR
+ Texture = ReforgedHudAmericaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:410 Top:787 Right:458 Bottom:801
+ Status = NONE
+End
+
+MappedImage AmericaProCursorTipTL
+ Texture = ReforgedHudAmericaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:464 Top:647 Right:472 Bottom:655
+ Status = NONE
+End
+
+MappedImage AmericaProCursorTipT
+ Texture = ReforgedHudAmericaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:476 Top:647 Right:508 Bottom:655
+ Status = NONE
+End
+
+MappedImage AmericaProCursorTipTR
+ Texture = ReforgedHudAmericaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:512 Top:647 Right:520 Bottom:655
+ Status = NONE
+End
+
+MappedImage AmericaProCursorTipL
+ Texture = ReforgedHudAmericaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:464 Top:659 Right:472 Bottom:675
+ Status = NONE
+End
+
+MappedImage AmericaProCursorTipC
+ Texture = ReforgedHudAmericaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:476 Top:659 Right:492 Bottom:675
+ Status = NONE
+End
+
+MappedImage AmericaProCursorTipR
+ Texture = ReforgedHudAmericaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:512 Top:659 Right:520 Bottom:675
+ Status = NONE
+End
+
+MappedImage AmericaProCursorTipBL
+ Texture = ReforgedHudAmericaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:464 Top:679 Right:472 Bottom:687
+ Status = NONE
+End
+
+MappedImage AmericaProCursorTipB
+ Texture = ReforgedHudAmericaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:476 Top:679 Right:508 Bottom:687
+ Status = NONE
+End
+
+MappedImage AmericaProCursorTipBR
+ Texture = ReforgedHudAmericaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:512 Top:679 Right:520 Bottom:687
+ Status = NONE
+End
+
+MappedImage AmericaProTipIconMoney
+ Texture = ReforgedHudAmericaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:258 Top:805 Right:274 Bottom:821
+ Status = NONE
+End
+
+MappedImage AmericaProTipIconTime
+ Texture = ReforgedHudAmericaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:278 Top:805 Right:294 Bottom:821
+ Status = NONE
+End
+
+MappedImage AmericaProTipIconHealth
+ Texture = ReforgedHudAmericaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:298 Top:805 Right:314 Bottom:821
+ Status = NONE
+End
+
+MappedImage AmericaProTipIconArmor
+ Texture = ReforgedHudAmericaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:318 Top:805 Right:334 Bottom:821
+ Status = NONE
+End
+
+MappedImage AmericaProTipIconDamage
+ Texture = ReforgedHudAmericaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:338 Top:805 Right:354 Bottom:821
+ Status = NONE
+End
+
+MappedImage AmericaProTipIconRate
+ Texture = ReforgedHudAmericaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:358 Top:805 Right:374 Bottom:821
+ Status = NONE
+End
+
+MappedImage AmericaProTipIconRange
+ Texture = ReforgedHudAmericaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:378 Top:805 Right:394 Bottom:821
+ Status = NONE
+End
+
+MappedImage AmericaProTipIconSpeed
+ Texture = ReforgedHudAmericaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:398 Top:805 Right:414 Bottom:821
+ Status = NONE
+End
+
+MappedImage AmericaProTipIconPower
+ Texture = ReforgedHudAmericaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:418 Top:805 Right:434 Bottom:821
+ Status = NONE
+End
+
+MappedImage AmericaProTipHeadTL
+ Texture = ReforgedHudAmericaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:610 Top:170 Right:626 Bottom:208
+ Status = NONE
+End
+
+MappedImage AmericaProTipHeadT
+ Texture = ReforgedHudAmericaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:630 Top:170 Right:758 Bottom:208
+ Status = NONE
+End
+
+MappedImage AmericaProTipHeadTR
+ Texture = ReforgedHudAmericaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:762 Top:170 Right:810 Bottom:208
+ Status = NONE
+End
diff --git a/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedHudChinaPowers.ini b/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedHudChinaPowers.ini
index 31836330d..14f9a9c48 100644
--- a/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedHudChinaPowers.ini
+++ b/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedHudChinaPowers.ini
@@ -627,3 +627,243 @@ MappedImage ChinaProGenPowerCloseI
Coords = Left:736 Top:112 Right:796 Bottom:162
Status = NONE
End
+
+MappedImage ChinaProTipTL
+ Texture = ReforgedHudChinaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:258 Top:647 Right:274 Bottom:715
+ Status = NONE
+End
+
+MappedImage ChinaProTipT
+ Texture = ReforgedHudChinaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:278 Top:647 Right:406 Bottom:715
+ Status = NONE
+End
+
+MappedImage ChinaProTipTR
+ Texture = ReforgedHudChinaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:410 Top:647 Right:458 Bottom:715
+ Status = NONE
+End
+
+MappedImage ChinaProTipL
+ Texture = ReforgedHudChinaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:258 Top:719 Right:274 Bottom:783
+ Status = NONE
+End
+
+MappedImage ChinaProTipC
+ Texture = ReforgedHudChinaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:278 Top:719 Right:342 Bottom:783
+ Status = NONE
+End
+
+MappedImage ChinaProTipR
+ Texture = ReforgedHudChinaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:410 Top:719 Right:458 Bottom:783
+ Status = NONE
+End
+
+MappedImage ChinaProTipBL
+ Texture = ReforgedHudChinaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:258 Top:787 Right:274 Bottom:801
+ Status = NONE
+End
+
+MappedImage ChinaProTipB
+ Texture = ReforgedHudChinaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:278 Top:787 Right:406 Bottom:801
+ Status = NONE
+End
+
+MappedImage ChinaProTipBR
+ Texture = ReforgedHudChinaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:410 Top:787 Right:458 Bottom:801
+ Status = NONE
+End
+
+MappedImage ChinaProCursorTipTL
+ Texture = ReforgedHudChinaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:464 Top:647 Right:472 Bottom:655
+ Status = NONE
+End
+
+MappedImage ChinaProCursorTipT
+ Texture = ReforgedHudChinaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:476 Top:647 Right:508 Bottom:655
+ Status = NONE
+End
+
+MappedImage ChinaProCursorTipTR
+ Texture = ReforgedHudChinaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:512 Top:647 Right:520 Bottom:655
+ Status = NONE
+End
+
+MappedImage ChinaProCursorTipL
+ Texture = ReforgedHudChinaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:464 Top:659 Right:472 Bottom:675
+ Status = NONE
+End
+
+MappedImage ChinaProCursorTipC
+ Texture = ReforgedHudChinaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:476 Top:659 Right:492 Bottom:675
+ Status = NONE
+End
+
+MappedImage ChinaProCursorTipR
+ Texture = ReforgedHudChinaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:512 Top:659 Right:520 Bottom:675
+ Status = NONE
+End
+
+MappedImage ChinaProCursorTipBL
+ Texture = ReforgedHudChinaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:464 Top:679 Right:472 Bottom:687
+ Status = NONE
+End
+
+MappedImage ChinaProCursorTipB
+ Texture = ReforgedHudChinaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:476 Top:679 Right:508 Bottom:687
+ Status = NONE
+End
+
+MappedImage ChinaProCursorTipBR
+ Texture = ReforgedHudChinaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:512 Top:679 Right:520 Bottom:687
+ Status = NONE
+End
+
+MappedImage ChinaProTipIconMoney
+ Texture = ReforgedHudChinaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:258 Top:805 Right:274 Bottom:821
+ Status = NONE
+End
+
+MappedImage ChinaProTipIconTime
+ Texture = ReforgedHudChinaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:278 Top:805 Right:294 Bottom:821
+ Status = NONE
+End
+
+MappedImage ChinaProTipIconHealth
+ Texture = ReforgedHudChinaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:298 Top:805 Right:314 Bottom:821
+ Status = NONE
+End
+
+MappedImage ChinaProTipIconArmor
+ Texture = ReforgedHudChinaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:318 Top:805 Right:334 Bottom:821
+ Status = NONE
+End
+
+MappedImage ChinaProTipIconDamage
+ Texture = ReforgedHudChinaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:338 Top:805 Right:354 Bottom:821
+ Status = NONE
+End
+
+MappedImage ChinaProTipIconRate
+ Texture = ReforgedHudChinaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:358 Top:805 Right:374 Bottom:821
+ Status = NONE
+End
+
+MappedImage ChinaProTipIconRange
+ Texture = ReforgedHudChinaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:378 Top:805 Right:394 Bottom:821
+ Status = NONE
+End
+
+MappedImage ChinaProTipIconSpeed
+ Texture = ReforgedHudChinaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:398 Top:805 Right:414 Bottom:821
+ Status = NONE
+End
+
+MappedImage ChinaProTipIconPower
+ Texture = ReforgedHudChinaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:418 Top:805 Right:434 Bottom:821
+ Status = NONE
+End
+
+MappedImage ChinaProTipHeadTL
+ Texture = ReforgedHudChinaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:610 Top:170 Right:626 Bottom:208
+ Status = NONE
+End
+
+MappedImage ChinaProTipHeadT
+ Texture = ReforgedHudChinaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:630 Top:170 Right:758 Bottom:208
+ Status = NONE
+End
+
+MappedImage ChinaProTipHeadTR
+ Texture = ReforgedHudChinaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:762 Top:170 Right:810 Bottom:208
+ Status = NONE
+End
diff --git a/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedHudGlaPowers.ini b/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedHudGlaPowers.ini
index 8d119b9c3..55fd0d1c9 100644
--- a/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedHudGlaPowers.ini
+++ b/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedHudGlaPowers.ini
@@ -627,3 +627,243 @@ MappedImage GlaProGenPowerCloseI
Coords = Left:736 Top:112 Right:796 Bottom:162
Status = NONE
End
+
+MappedImage GlaProTipTL
+ Texture = ReforgedHudGlaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:258 Top:647 Right:274 Bottom:715
+ Status = NONE
+End
+
+MappedImage GlaProTipT
+ Texture = ReforgedHudGlaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:278 Top:647 Right:406 Bottom:715
+ Status = NONE
+End
+
+MappedImage GlaProTipTR
+ Texture = ReforgedHudGlaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:410 Top:647 Right:458 Bottom:715
+ Status = NONE
+End
+
+MappedImage GlaProTipL
+ Texture = ReforgedHudGlaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:258 Top:719 Right:274 Bottom:783
+ Status = NONE
+End
+
+MappedImage GlaProTipC
+ Texture = ReforgedHudGlaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:278 Top:719 Right:342 Bottom:783
+ Status = NONE
+End
+
+MappedImage GlaProTipR
+ Texture = ReforgedHudGlaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:410 Top:719 Right:458 Bottom:783
+ Status = NONE
+End
+
+MappedImage GlaProTipBL
+ Texture = ReforgedHudGlaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:258 Top:787 Right:274 Bottom:801
+ Status = NONE
+End
+
+MappedImage GlaProTipB
+ Texture = ReforgedHudGlaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:278 Top:787 Right:406 Bottom:801
+ Status = NONE
+End
+
+MappedImage GlaProTipBR
+ Texture = ReforgedHudGlaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:410 Top:787 Right:458 Bottom:801
+ Status = NONE
+End
+
+MappedImage GlaProCursorTipTL
+ Texture = ReforgedHudGlaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:464 Top:647 Right:472 Bottom:655
+ Status = NONE
+End
+
+MappedImage GlaProCursorTipT
+ Texture = ReforgedHudGlaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:476 Top:647 Right:508 Bottom:655
+ Status = NONE
+End
+
+MappedImage GlaProCursorTipTR
+ Texture = ReforgedHudGlaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:512 Top:647 Right:520 Bottom:655
+ Status = NONE
+End
+
+MappedImage GlaProCursorTipL
+ Texture = ReforgedHudGlaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:464 Top:659 Right:472 Bottom:675
+ Status = NONE
+End
+
+MappedImage GlaProCursorTipC
+ Texture = ReforgedHudGlaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:476 Top:659 Right:492 Bottom:675
+ Status = NONE
+End
+
+MappedImage GlaProCursorTipR
+ Texture = ReforgedHudGlaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:512 Top:659 Right:520 Bottom:675
+ Status = NONE
+End
+
+MappedImage GlaProCursorTipBL
+ Texture = ReforgedHudGlaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:464 Top:679 Right:472 Bottom:687
+ Status = NONE
+End
+
+MappedImage GlaProCursorTipB
+ Texture = ReforgedHudGlaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:476 Top:679 Right:508 Bottom:687
+ Status = NONE
+End
+
+MappedImage GlaProCursorTipBR
+ Texture = ReforgedHudGlaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:512 Top:679 Right:520 Bottom:687
+ Status = NONE
+End
+
+MappedImage GlaProTipIconMoney
+ Texture = ReforgedHudGlaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:258 Top:805 Right:274 Bottom:821
+ Status = NONE
+End
+
+MappedImage GlaProTipIconTime
+ Texture = ReforgedHudGlaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:278 Top:805 Right:294 Bottom:821
+ Status = NONE
+End
+
+MappedImage GlaProTipIconHealth
+ Texture = ReforgedHudGlaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:298 Top:805 Right:314 Bottom:821
+ Status = NONE
+End
+
+MappedImage GlaProTipIconArmor
+ Texture = ReforgedHudGlaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:318 Top:805 Right:334 Bottom:821
+ Status = NONE
+End
+
+MappedImage GlaProTipIconDamage
+ Texture = ReforgedHudGlaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:338 Top:805 Right:354 Bottom:821
+ Status = NONE
+End
+
+MappedImage GlaProTipIconRate
+ Texture = ReforgedHudGlaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:358 Top:805 Right:374 Bottom:821
+ Status = NONE
+End
+
+MappedImage GlaProTipIconRange
+ Texture = ReforgedHudGlaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:378 Top:805 Right:394 Bottom:821
+ Status = NONE
+End
+
+MappedImage GlaProTipIconSpeed
+ Texture = ReforgedHudGlaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:398 Top:805 Right:414 Bottom:821
+ Status = NONE
+End
+
+MappedImage GlaProTipIconPower
+ Texture = ReforgedHudGlaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:418 Top:805 Right:434 Bottom:821
+ Status = NONE
+End
+
+MappedImage GlaProTipHeadTL
+ Texture = ReforgedHudGlaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:610 Top:170 Right:626 Bottom:208
+ Status = NONE
+End
+
+MappedImage GlaProTipHeadT
+ Texture = ReforgedHudGlaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:630 Top:170 Right:758 Bottom:208
+ Status = NONE
+End
+
+MappedImage GlaProTipHeadTR
+ Texture = ReforgedHudGlaPowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:762 Top:170 Right:810 Bottom:208
+ Status = NONE
+End
diff --git a/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedHudHelpbox.ini b/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedHudHelpbox.ini
index 530d21385..0d014d1f3 100644
--- a/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedHudHelpbox.ini
+++ b/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedHudHelpbox.ini
@@ -1,25 +1,244 @@
-; For best presentation, Helpbox coordinates must match native texture resolution.
+; The tooltips' console set (Tools/hud_command_bar.py paint_helpbox): the build card's nine, the pointer
+; tooltip's nine and the card's stat icons, for the shell, the observer and any ControlBarScheme without a
+; TooltipImage of its own. Prefix Helpbox: <prefix>Tip<TL..BR>, <prefix>TipHead<TL,T,TR> (the short top row of
+; a card with no stat row), <prefix>CursorTip<TL..BR>, <prefix>TipIcon<Kind>.
-MappedImage Helpbox-top ; Hardcoded name; collides with entry in SCSmShellUserInterface512.INI but is loaded first here
+MappedImage HelpboxTipTL
Texture = ReforgedHudHelpbox.tga
TextureWidth = 512
- TextureHeight = 128
- Coords = Left:0 Top:0 Right:512 Bottom:30
+ TextureHeight = 256
+ Coords = Left:2 Top:2 Right:18 Bottom:70
Status = NONE
End
-MappedImage Helpbox-middle ; Hardcoded name; collides with entry in SCSmShellUserInterface512.INI but is loaded first here
+MappedImage HelpboxTipT
Texture = ReforgedHudHelpbox.tga
TextureWidth = 512
- TextureHeight = 128
- Coords = Left:0 Top:30 Right:512 Bottom:60
+ TextureHeight = 256
+ Coords = Left:22 Top:2 Right:150 Bottom:70
Status = NONE
End
-MappedImage Helpbox-bottom ; Hardcoded name; collides with entry in SCSmShellUserInterface512.INI but is loaded first here
+MappedImage HelpboxTipTR
Texture = ReforgedHudHelpbox.tga
TextureWidth = 512
- TextureHeight = 128
- Coords = Left:0 Top:60 Right:512 Bottom:90
+ TextureHeight = 256
+ Coords = Left:154 Top:2 Right:202 Bottom:70
+ Status = NONE
+End
+
+MappedImage HelpboxTipL
+ Texture = ReforgedHudHelpbox.tga
+ TextureWidth = 512
+ TextureHeight = 256
+ Coords = Left:2 Top:74 Right:18 Bottom:138
+ Status = NONE
+End
+
+MappedImage HelpboxTipC
+ Texture = ReforgedHudHelpbox.tga
+ TextureWidth = 512
+ TextureHeight = 256
+ Coords = Left:22 Top:74 Right:86 Bottom:138
+ Status = NONE
+End
+
+MappedImage HelpboxTipR
+ Texture = ReforgedHudHelpbox.tga
+ TextureWidth = 512
+ TextureHeight = 256
+ Coords = Left:154 Top:74 Right:202 Bottom:138
+ Status = NONE
+End
+
+MappedImage HelpboxTipBL
+ Texture = ReforgedHudHelpbox.tga
+ TextureWidth = 512
+ TextureHeight = 256
+ Coords = Left:2 Top:142 Right:18 Bottom:156
+ Status = NONE
+End
+
+MappedImage HelpboxTipB
+ Texture = ReforgedHudHelpbox.tga
+ TextureWidth = 512
+ TextureHeight = 256
+ Coords = Left:22 Top:142 Right:150 Bottom:156
+ Status = NONE
+End
+
+MappedImage HelpboxTipBR
+ Texture = ReforgedHudHelpbox.tga
+ TextureWidth = 512
+ TextureHeight = 256
+ Coords = Left:154 Top:142 Right:202 Bottom:156
+ Status = NONE
+End
+
+MappedImage HelpboxCursorTipTL
+ Texture = ReforgedHudHelpbox.tga
+ TextureWidth = 512
+ TextureHeight = 256
+ Coords = Left:208 Top:2 Right:216 Bottom:10
+ Status = NONE
+End
+
+MappedImage HelpboxCursorTipT
+ Texture = ReforgedHudHelpbox.tga
+ TextureWidth = 512
+ TextureHeight = 256
+ Coords = Left:220 Top:2 Right:252 Bottom:10
+ Status = NONE
+End
+
+MappedImage HelpboxCursorTipTR
+ Texture = ReforgedHudHelpbox.tga
+ TextureWidth = 512
+ TextureHeight = 256
+ Coords = Left:256 Top:2 Right:264 Bottom:10
+ Status = NONE
+End
+
+MappedImage HelpboxCursorTipL
+ Texture = ReforgedHudHelpbox.tga
+ TextureWidth = 512
+ TextureHeight = 256
+ Coords = Left:208 Top:14 Right:216 Bottom:30
+ Status = NONE
+End
+
+MappedImage HelpboxCursorTipC
+ Texture = ReforgedHudHelpbox.tga
+ TextureWidth = 512
+ TextureHeight = 256
+ Coords = Left:220 Top:14 Right:236 Bottom:30
+ Status = NONE
+End
+
+MappedImage HelpboxCursorTipR
+ Texture = ReforgedHudHelpbox.tga
+ TextureWidth = 512
+ TextureHeight = 256
+ Coords = Left:256 Top:14 Right:264 Bottom:30
+ Status = NONE
+End
+
+MappedImage HelpboxCursorTipBL
+ Texture = ReforgedHudHelpbox.tga
+ TextureWidth = 512
+ TextureHeight = 256
+ Coords = Left:208 Top:34 Right:216 Bottom:42
+ Status = NONE
+End
+
+MappedImage HelpboxCursorTipB
+ Texture = ReforgedHudHelpbox.tga
+ TextureWidth = 512
+ TextureHeight = 256
+ Coords = Left:220 Top:34 Right:252 Bottom:42
+ Status = NONE
+End
+
+MappedImage HelpboxCursorTipBR
+ Texture = ReforgedHudHelpbox.tga
+ TextureWidth = 512
+ TextureHeight = 256
+ Coords = Left:256 Top:34 Right:264 Bottom:42
+ Status = NONE
+End
+
+MappedImage HelpboxTipIconMoney
+ Texture = ReforgedHudHelpbox.tga
+ TextureWidth = 512
+ TextureHeight = 256
+ Coords = Left:2 Top:160 Right:18 Bottom:176
+ Status = NONE
+End
+
+MappedImage HelpboxTipIconTime
+ Texture = ReforgedHudHelpbox.tga
+ TextureWidth = 512
+ TextureHeight = 256
+ Coords = Left:22 Top:160 Right:38 Bottom:176
+ Status = NONE
+End
+
+MappedImage HelpboxTipIconHealth
+ Texture = ReforgedHudHelpbox.tga
+ TextureWidth = 512
+ TextureHeight = 256
+ Coords = Left:42 Top:160 Right:58 Bottom:176
+ Status = NONE
+End
+
+MappedImage HelpboxTipIconArmor
+ Texture = ReforgedHudHelpbox.tga
+ TextureWidth = 512
+ TextureHeight = 256
+ Coords = Left:62 Top:160 Right:78 Bottom:176
+ Status = NONE
+End
+
+MappedImage HelpboxTipIconDamage
+ Texture = ReforgedHudHelpbox.tga
+ TextureWidth = 512
+ TextureHeight = 256
+ Coords = Left:82 Top:160 Right:98 Bottom:176
+ Status = NONE
+End
+
+MappedImage HelpboxTipIconRate
+ Texture = ReforgedHudHelpbox.tga
+ TextureWidth = 512
+ TextureHeight = 256
+ Coords = Left:102 Top:160 Right:118 Bottom:176
+ Status = NONE
+End
+
+MappedImage HelpboxTipIconRange
+ Texture = ReforgedHudHelpbox.tga
+ TextureWidth = 512
+ TextureHeight = 256
+ Coords = Left:122 Top:160 Right:138 Bottom:176
+ Status = NONE
+End
+
+MappedImage HelpboxTipIconSpeed
+ Texture = ReforgedHudHelpbox.tga
+ TextureWidth = 512
+ TextureHeight = 256
+ Coords = Left:142 Top:160 Right:158 Bottom:176
+ Status = NONE
+End
+
+MappedImage HelpboxTipIconPower
+ Texture = ReforgedHudHelpbox.tga
+ TextureWidth = 512
+ TextureHeight = 256
+ Coords = Left:162 Top:160 Right:178 Bottom:176
+ Status = NONE
+End
+
+MappedImage HelpboxTipHeadTL
+ Texture = ReforgedHudHelpbox.tga
+ TextureWidth = 512
+ TextureHeight = 256
+ Coords = Left:2 Top:182 Right:18 Bottom:220
+ Status = NONE
+End
+
+MappedImage HelpboxTipHeadT
+ Texture = ReforgedHudHelpbox.tga
+ TextureWidth = 512
+ TextureHeight = 256
+ Coords = Left:22 Top:182 Right:150 Bottom:220
+ Status = NONE
+End
+
+MappedImage HelpboxTipHeadTR
+ Texture = ReforgedHudHelpbox.tga
+ TextureWidth = 512
+ TextureHeight = 256
+ Coords = Left:154 Top:182 Right:202 Bottom:220
Status = NONE
End
diff --git a/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedHudTurkiyePowers.ini b/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedHudTurkiyePowers.ini
index db2b69199..f108556cf 100644
--- a/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedHudTurkiyePowers.ini
+++ b/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedHudTurkiyePowers.ini
@@ -619,3 +619,243 @@ MappedImage TurkiyeProGenPowerCloseI
Coords = Left:736 Top:112 Right:796 Bottom:162
Status = NONE
End
+
+MappedImage TurkiyeProTipTL
+ Texture = ReforgedHudTurkiyePowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:258 Top:647 Right:274 Bottom:715
+ Status = NONE
+End
+
+MappedImage TurkiyeProTipT
+ Texture = ReforgedHudTurkiyePowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:278 Top:647 Right:406 Bottom:715
+ Status = NONE
+End
+
+MappedImage TurkiyeProTipTR
+ Texture = ReforgedHudTurkiyePowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:410 Top:647 Right:458 Bottom:715
+ Status = NONE
+End
+
+MappedImage TurkiyeProTipL
+ Texture = ReforgedHudTurkiyePowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:258 Top:719 Right:274 Bottom:783
+ Status = NONE
+End
+
+MappedImage TurkiyeProTipC
+ Texture = ReforgedHudTurkiyePowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:278 Top:719 Right:342 Bottom:783
+ Status = NONE
+End
+
+MappedImage TurkiyeProTipR
+ Texture = ReforgedHudTurkiyePowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:410 Top:719 Right:458 Bottom:783
+ Status = NONE
+End
+
+MappedImage TurkiyeProTipBL
+ Texture = ReforgedHudTurkiyePowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:258 Top:787 Right:274 Bottom:801
+ Status = NONE
+End
+
+MappedImage TurkiyeProTipB
+ Texture = ReforgedHudTurkiyePowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:278 Top:787 Right:406 Bottom:801
+ Status = NONE
+End
+
+MappedImage TurkiyeProTipBR
+ Texture = ReforgedHudTurkiyePowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:410 Top:787 Right:458 Bottom:801
+ Status = NONE
+End
+
+MappedImage TurkiyeProCursorTipTL
+ Texture = ReforgedHudTurkiyePowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:464 Top:647 Right:472 Bottom:655
+ Status = NONE
+End
+
+MappedImage TurkiyeProCursorTipT
+ Texture = ReforgedHudTurkiyePowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:476 Top:647 Right:508 Bottom:655
+ Status = NONE
+End
+
+MappedImage TurkiyeProCursorTipTR
+ Texture = ReforgedHudTurkiyePowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:512 Top:647 Right:520 Bottom:655
+ Status = NONE
+End
+
+MappedImage TurkiyeProCursorTipL
+ Texture = ReforgedHudTurkiyePowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:464 Top:659 Right:472 Bottom:675
+ Status = NONE
+End
+
+MappedImage TurkiyeProCursorTipC
+ Texture = ReforgedHudTurkiyePowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:476 Top:659 Right:492 Bottom:675
+ Status = NONE
+End
+
+MappedImage TurkiyeProCursorTipR
+ Texture = ReforgedHudTurkiyePowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:512 Top:659 Right:520 Bottom:675
+ Status = NONE
+End
+
+MappedImage TurkiyeProCursorTipBL
+ Texture = ReforgedHudTurkiyePowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:464 Top:679 Right:472 Bottom:687
+ Status = NONE
+End
+
+MappedImage TurkiyeProCursorTipB
+ Texture = ReforgedHudTurkiyePowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:476 Top:679 Right:508 Bottom:687
+ Status = NONE
+End
+
+MappedImage TurkiyeProCursorTipBR
+ Texture = ReforgedHudTurkiyePowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:512 Top:679 Right:520 Bottom:687
+ Status = NONE
+End
+
+MappedImage TurkiyeProTipIconMoney
+ Texture = ReforgedHudTurkiyePowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:258 Top:805 Right:274 Bottom:821
+ Status = NONE
+End
+
+MappedImage TurkiyeProTipIconTime
+ Texture = ReforgedHudTurkiyePowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:278 Top:805 Right:294 Bottom:821
+ Status = NONE
+End
+
+MappedImage TurkiyeProTipIconHealth
+ Texture = ReforgedHudTurkiyePowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:298 Top:805 Right:314 Bottom:821
+ Status = NONE
+End
+
+MappedImage TurkiyeProTipIconArmor
+ Texture = ReforgedHudTurkiyePowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:318 Top:805 Right:334 Bottom:821
+ Status = NONE
+End
+
+MappedImage TurkiyeProTipIconDamage
+ Texture = ReforgedHudTurkiyePowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:338 Top:805 Right:354 Bottom:821
+ Status = NONE
+End
+
+MappedImage TurkiyeProTipIconRate
+ Texture = ReforgedHudTurkiyePowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:358 Top:805 Right:374 Bottom:821
+ Status = NONE
+End
+
+MappedImage TurkiyeProTipIconRange
+ Texture = ReforgedHudTurkiyePowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:378 Top:805 Right:394 Bottom:821
+ Status = NONE
+End
+
+MappedImage TurkiyeProTipIconSpeed
+ Texture = ReforgedHudTurkiyePowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:398 Top:805 Right:414 Bottom:821
+ Status = NONE
+End
+
+MappedImage TurkiyeProTipIconPower
+ Texture = ReforgedHudTurkiyePowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:418 Top:805 Right:434 Bottom:821
+ Status = NONE
+End
+
+MappedImage TurkiyeProTipHeadTL
+ Texture = ReforgedHudTurkiyePowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:610 Top:170 Right:626 Bottom:208
+ Status = NONE
+End
+
+MappedImage TurkiyeProTipHeadT
+ Texture = ReforgedHudTurkiyePowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:630 Top:170 Right:758 Bottom:208
+ Status = NONE
+End
+
+MappedImage TurkiyeProTipHeadTR
+ Texture = ReforgedHudTurkiyePowers.tga
+ TextureWidth = 1024
+ TextureHeight = 1024
+ Coords = Left:762 Top:170 Right:810 Bottom:208
+ Status = NONE
+End
diff --git a/GeneralsMD/Code/Data/Patch.str b/GeneralsMD/Code/Data/Patch.str
index 903ed1e08..6ddde25e5 100644
--- a/GeneralsMD/Code/Data/Patch.str
+++ b/GeneralsMD/Code/Data/Patch.str
@@ -962,10 +962,6 @@ END
// The build tooltip card's figures, a label and its value each.
-TOOLTIP:StatTime
-"Build time"
-END
-
TOOLTIP:StatSeconds
"%ds"
END
@@ -1018,33 +1014,203 @@ TOOLTIP:StatNewWeaponFigures
"%d damage, %d range"
END
-// The gloss after each figure on the card: what it counts, as the card computes it. Damage is the
-// main weapon's primary damage a shot, the weapon that does the most a second; attack speed spreads
-// a clip's reload over its shots; range is in world units, 10 to a pathfinding cell, the square the
-// placement grid draws; build time counts the player's power and how many factories make the unit.
+// The card's armour cell: the class of the unconditioned ArmorSet's armour, TOOLTIP:Armor and the
+// Armor block's name with its first "Armor" taken out. Short, a cell is about sixty pixels wide.
+
+TOOLTIP:ArmorNo
+"None"
+END
+
+TOOLTIP:ArmorVulnerableAll
+"None"
+END
+
+TOOLTIP:ArmorInvulnerable
+"Invulnerable"
+END
+
+TOOLTIP:ArmorInvulnerableAll
+"Invulnerable"
+END
+
+TOOLTIP:ArmorHuman
+"Infantry"
+END
+
+TOOLTIP:ArmorHazMatHuman
+"Infantry"
+END
+
+TOOLTIP:ArmorChemSuitHuman
+"Infantry"
+END
+
+TOOLTIP:ArmorInfGen_Human
+"Infantry"
+END
+
+TOOLTIP:ArmorChemReb_Human
+"Infantry"
+END
+
+TOOLTIP:ArmorDemoGenTerrorist
+"Infantry"
+END
+
+TOOLTIP:ArmorStingerSoldier
+"Infantry"
+END
+
+TOOLTIP:ArmorTruck
+"Vehicle"
+END
+
+TOOLTIP:ArmorHumvee
+"Vehicle"
+END
+
+TOOLTIP:ArmorDozer
+"Vehicle"
+END
+
+TOOLTIP:ArmorToxinTruck
+"Vehicle"
+END
+
+TOOLTIP:ArmorAntiAirVehicle
+"Vehicle"
+END
+
+TOOLTIP:ArmorQuadCannon
+"Vehicle"
+END
+
+TOOLTIP:ArmorAvenger
+"Vehicle"
+END
+
+TOOLTIP:ArmorBattleBusTruck
+"Vehicle"
+END
+
+TOOLTIP:ArmorBattleBusTruckPlusOne
+"Vehicle"
+END
+
+TOOLTIP:ArmorBattleBusTruckPlusTwo
+"Vehicle"
+END
+
+TOOLTIP:ArmorTank
+"Tank"
+END
+
+TOOLTIP:ArmorUpgradedTank
+"Tank"
+END
+
+TOOLTIP:ArmorDragonTank
+"Tank"
+END
+
+TOOLTIP:ArmorAssaultCrawler
+"Tank"
+END
+
+TOOLTIP:ArmorAvalanche
+"Tank"
+END
+
+TOOLTIP:ArmorAirplane
+"Aircraft"
+END
+
+TOOLTIP:ArmorCountermeasuresAirplane
+"Aircraft"
+END
+
+TOOLTIP:ArmorSpectreGunship
+"Aircraft"
+END
+
+TOOLTIP:ArmorCountermeasuresSpectreGunship
+"Aircraft"
+END
+
+TOOLTIP:ArmorComanche
+"Helicopter"
+END
+
+TOOLTIP:ArmorAFG_Comanche
+"Helicopter"
+END
+
+TOOLTIP:ArmorCountermeasuresComanche
+"Helicopter"
+END
+
+TOOLTIP:ArmorAFG_CountermeasuresComanche
+"Helicopter"
+END
+
+TOOLTIP:ArmorChinook
+"Helicopter"
+END
+
+TOOLTIP:ArmorSentryDrone
+"Drone"
+END
+
+TOOLTIP:ArmorMine
+"Mine"
+END
+
+TOOLTIP:ArmorStructure
+"Building"
+END
+
+TOOLTIP:ArmorStructureInternetCenter
+"Building"
+END
+
+TOOLTIP:ArmorStructureTough
+"Fortified"
+END
+
+TOOLTIP:ArmorGLAUpgradedStructure
+"Fortified"
+END
+
+TOOLTIP:ArmorGLAUpgradedStructureTough
+"Fortified"
+END
+
+TOOLTIP:ArmorBattleBusStructureTough
+"Fortified"
+END
-TOOLTIP:StatHealthHint
-"(damage it can take after armor)"
+TOOLTIP:ArmorBattleBusStructureToughPlusOne
+"Fortified"
END
-TOOLTIP:StatDamageHint
-"(main weapon, one shot, before armor)"
+TOOLTIP:ArmorBattleBusStructureToughPlusTwo
+"Fortified"
END
-TOOLTIP:StatAttackSpeedHint
-"(shots a second, reloads counted)"
+TOOLTIP:ArmorBaseDefense
+"Defense"
END
-TOOLTIP:StatDamagePerSecondHint
-"(damage × attack speed)"
+TOOLTIP:ArmorFireBase
+"Defense"
END
-TOOLTIP:StatRangeHint
-"(10 is one square of the placement grid)"
+TOOLTIP:ArmorStingerSite
+"Defense"
END
-TOOLTIP:StatTimeHint
-"(with your power and factories now)"
+TOOLTIP:ArmorWall
+"Wall"
END
// Under the figures: a unit's upgrades, or on an upgrade's card the units it changes.
diff --git a/GeneralsMD/Code/Data/Russian/Generals.str b/GeneralsMD/Code/Data/Russian/Generals.str
index 755d53056..676625700 100644
--- a/GeneralsMD/Code/Data/Russian/Generals.str
+++ b/GeneralsMD/Code/Data/Russian/Generals.str
@@ -16385,10 +16385,6 @@ TOOLTIP:SupplyPileFull
"\n Занято: лимит на кучу не пускает ваших сборщиков"
END
-TOOLTIP:StatTime
-"Время постройки"
-END
-
TOOLTIP:StatSeconds
"%d с"
END
diff --git a/GeneralsMD/Code/Data/Turkish/Generals.str b/GeneralsMD/Code/Data/Turkish/Generals.str
index 0885652d6..ab0aaf221 100644
--- a/GeneralsMD/Code/Data/Turkish/Generals.str
+++ b/GeneralsMD/Code/Data/Turkish/Generals.str
@@ -15585,10 +15585,6 @@ GUI:CantBuildTooManyDerrickDefenses
"Bu petrol kuyularının çevresinde zaten iki savunmanız var."
END
-TOOLTIP:StatTime
-"Üretim süresi"
-END
-
TOOLTIP:StatSeconds
"%d sn"
END
@@ -15641,28 +15637,200 @@ TOOLTIP:StatNewWeaponFigures
"%d hasar, %d menzil"
END
-TOOLTIP:StatHealthHint
-"(zırhtan sonra kaldırabileceği hasar)"
+TOOLTIP:ArmorNo
+"Yok"
+END
+
+TOOLTIP:ArmorVulnerableAll
+"Yok"
+END
+
+TOOLTIP:ArmorInvulnerable
+"Hasar almaz"
+END
+
+TOOLTIP:ArmorInvulnerableAll
+"Hasar almaz"
+END
+
+TOOLTIP:ArmorHuman
+"Piyade"
+END
+
+TOOLTIP:ArmorHazMatHuman
+"Piyade"
+END
+
+TOOLTIP:ArmorChemSuitHuman
+"Piyade"
+END
+
+TOOLTIP:ArmorInfGen_Human
+"Piyade"
+END
+
+TOOLTIP:ArmorChemReb_Human
+"Piyade"
+END
+
+TOOLTIP:ArmorDemoGenTerrorist
+"Piyade"
+END
+
+TOOLTIP:ArmorStingerSoldier
+"Piyade"
+END
+
+TOOLTIP:ArmorTruck
+"Araç"
+END
+
+TOOLTIP:ArmorHumvee
+"Araç"
+END
+
+TOOLTIP:ArmorDozer
+"Araç"
+END
+
+TOOLTIP:ArmorToxinTruck
+"Araç"
+END
+
+TOOLTIP:ArmorAntiAirVehicle
+"Araç"
+END
+
+TOOLTIP:ArmorQuadCannon
+"Araç"
+END
+
+TOOLTIP:ArmorAvenger
+"Araç"
+END
+
+TOOLTIP:ArmorBattleBusTruck
+"Araç"
+END
+
+TOOLTIP:ArmorBattleBusTruckPlusOne
+"Araç"
+END
+
+TOOLTIP:ArmorBattleBusTruckPlusTwo
+"Araç"
+END
+
+TOOLTIP:ArmorTank
+"Tank"
END
-TOOLTIP:StatDamageHint
-"(ana silah, atış başına, zırhtan önce)"
+TOOLTIP:ArmorUpgradedTank
+"Tank"
END
-TOOLTIP:StatAttackSpeedHint
-"(saniyedeki atış, şarjör doldurma dahil)"
+TOOLTIP:ArmorDragonTank
+"Tank"
END
-TOOLTIP:StatDamagePerSecondHint
-"(hasar × atış hızı)"
+TOOLTIP:ArmorAssaultCrawler
+"Tank"
END
-TOOLTIP:StatRangeHint
-"(10, yerleştirme ızgarasının bir karesi)"
+TOOLTIP:ArmorAvalanche
+"Tank"
END
-TOOLTIP:StatTimeHint
-"(şu anki enerjiniz ve fabrikalarınızla)"
+TOOLTIP:ArmorAirplane
+"Uçak"
+END
+
+TOOLTIP:ArmorCountermeasuresAirplane
+"Uçak"
+END
+
+TOOLTIP:ArmorSpectreGunship
+"Uçak"
+END
+
+TOOLTIP:ArmorCountermeasuresSpectreGunship
+"Uçak"
+END
+
+TOOLTIP:ArmorComanche
+"Helikopter"
+END
+
+TOOLTIP:ArmorAFG_Comanche
+"Helikopter"
+END
+
+TOOLTIP:ArmorCountermeasuresComanche
+"Helikopter"
+END
+
+TOOLTIP:ArmorAFG_CountermeasuresComanche
+"Helikopter"
+END
+
+TOOLTIP:ArmorChinook
+"Helikopter"
+END
+
+TOOLTIP:ArmorSentryDrone
+"Dron"
+END
+
+TOOLTIP:ArmorMine
+"Mayın"
+END
+
+TOOLTIP:ArmorStructure
+"Bina"
+END
+
+TOOLTIP:ArmorStructureInternetCenter
+"Bina"
+END
+
+TOOLTIP:ArmorStructureTough
+"Tahkimli"
+END
+
+TOOLTIP:ArmorGLAUpgradedStructure
+"Tahkimli"
+END
+
+TOOLTIP:ArmorGLAUpgradedStructureTough
+"Tahkimli"
+END
+
+TOOLTIP:ArmorBattleBusStructureTough
+"Tahkimli"
+END
+
+TOOLTIP:ArmorBattleBusStructureToughPlusOne
+"Tahkimli"
+END
+
+TOOLTIP:ArmorBattleBusStructureToughPlusTwo
+"Tahkimli"
+END
+
+TOOLTIP:ArmorBaseDefense
+"Savunma"
+END
+
+TOOLTIP:ArmorFireBase
+"Savunma"
+END
+
+TOOLTIP:ArmorStingerSite
+"Savunma"
+END
+
+TOOLTIP:ArmorWall
+"Duvar"
END
TOOLTIP:Upgrades
diff --git a/GeneralsMD/Code/Data/Ukrainian/Generals.str b/GeneralsMD/Code/Data/Ukrainian/Generals.str
index 956394a13..fe3499b8b 100644
--- a/GeneralsMD/Code/Data/Ukrainian/Generals.str
+++ b/GeneralsMD/Code/Data/Ukrainian/Generals.str
@@ -16385,10 +16385,6 @@ TOOLTIP:SupplyPileFull
"\n Зайнято: ліміт купи не пускає ваших збирачів"
END
-TOOLTIP:StatTime
-"Час будівництва"
-END
-
TOOLTIP:StatSeconds
"%dс"
END
diff --git a/GeneralsMD/Code/Data/Window/ControlBarPopupDescription.wnd b/GeneralsMD/Code/Data/Window/ControlBarPopupDescription.wnd
index 102c19c5d..4a475cf68 100644
--- a/GeneralsMD/Code/Data/Window/ControlBarPopupDescription.wnd
+++ b/GeneralsMD/Code/Data/Window/ControlBarPopupDescription.wnd
@@ -52,8 +52,8 @@ WINDOW
CHILD
WINDOW
WINDOWTYPE = STATICTEXT;
- SCREENRECT = UPPERLEFT: 0 680,
- BOTTOMRIGHT: 512 710,
+ SCREENRECT = UPPERLEFT: 1 686,
+ BOTTOMRIGHT: 494 716,
CREATIONRESOLUTION: 1920 1080;
NAME = "ControlBarPopupDescription.wnd:StaticTextDescription";
STATUS = ENABLED;
@@ -100,59 +100,11 @@ WINDOW
CHILD
WINDOW
WINDOWTYPE = STATICTEXT;
- SCREENRECT = UPPERLEFT: 0 650,
- BOTTOMRIGHT: 512 680,
- CREATIONRESOLUTION: 1920 1080;
- NAME = "ControlBarPopupDescription.wnd:StaticTextCost";
- STATUS = ENABLED;
- STYLE = STATICTEXT+MOUSETRACK;
- SYSTEMCALLBACK = "[None]";
- INPUTCALLBACK = "[None]";
- TOOLTIPCALLBACK = "[None]";
- DRAWCALLBACK = "[None]";
- FONT = NAME: "Arial", SIZE: 8, BOLD: 0;
- HEADERTEMPLATE = "LabelSmall";
- TOOLTIPDELAY = -1;
- TEXTCOLOR = ENABLED: 254 254 254 255, ENABLEDBORDER: 0 0 0 255,
- DISABLED: 192 192 192 255, DISABLEDBORDER: 64 64 64 255,
- HILITE: 3 196 0 255, HILITEBORDER: 0 66 4 255;
- ENABLEDDRAWDATA = IMAGE: NoImage, COLOR: 2 2 2 0, BORDERCOLOR: 17 0 255 0,
- IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,
- IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,
- IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,
- IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,
- IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,
- IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,
- IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,
- IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0;
- DISABLEDDRAWDATA = IMAGE: NoImage, COLOR: 64 64 64 255, BORDERCOLOR: 192 192 192 255,
- IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,
- IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,
- IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,
- IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,
- IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,
- IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,
- IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,
- IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0;
- HILITEDRAWDATA = IMAGE: NoImage, COLOR: 0 128 0 255, BORDERCOLOR: 128 255 128 255,
- IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,
- IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,
- IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,
- IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,
- IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,
- IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,
- IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,
- IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0;
- STATICTEXTDATA = CENTERED: 0;
- END
- CHILD
- WINDOW
- WINDOWTYPE = STATICTEXT;
- SCREENRECT = UPPERLEFT: 0 620,
- BOTTOMRIGHT: 512 650,
+ SCREENRECT = UPPERLEFT: 5 625,
+ BOTTOMRIGHT: 322 647,
CREATIONRESOLUTION: 1920 1080;
NAME = "ControlBarPopupDescription.wnd:StaticTextName";
- STATUS = ENABLED+WRAP_CENTERED+HOTKEY_TEXT;
+ STATUS = ENABLED+ONE_LINE+HOTKEY_TEXT;
STYLE = STATICTEXT+MOUSETRACK;
SYSTEMCALLBACK = "[None]";
INPUTCALLBACK = "[None]";
@@ -191,7 +143,7 @@ WINDOW
IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,
IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,
IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0;
- STATICTEXTDATA = CENTERED: 1;
+ STATICTEXTDATA = CENTERED: 0;
END
ENDALLCHILDREN
END
diff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/ControlBar.h b/GeneralsMD/Code/GameEngine/Include/GameClient/ControlBar.h
index 41921ec70..547784a94 100644
--- a/GeneralsMD/Code/GameEngine/Include/GameClient/ControlBar.h
+++ b/GeneralsMD/Code/GameEngine/Include/GameClient/ControlBar.h
@@ -1413,8 +1413,8 @@ public:
/// the same with the prices and figures counted for player rather than the local one
void populateBuildTooltipLayout( const CommandButton *commandButton, GameWindow *tooltipWin, Player *player );
void repopulateBuildTooltipLayout( void );
- /// where the popup lives, so -uidrill can read the rectangle it landed in. The tooltip is placed
- /// against BackgroundMarker's screen position, so it goes wherever the bar's windows went
+ /// where the popup lives, so -uidrill can read the rectangle it landed in. The tooltip stands on
+ /// the radar's frame, so it goes wherever the bar's windows went
WindowLayout *getBuildTooltipLayout( void ) { return m_buildToolTipLayout; }
private:
@@ -1571,5 +1571,25 @@ extern void ControlBarLayoutUniform( GameWindow *root, Real anchorFracX, Real an
extern Int ControlBar_secondsFromFrames( Real frames );
extern Int ControlBar_secondsFromFramesAt( Real frames, Int logicFps ); ///< ...at a rate you name
+//-------------------------------------------------------------------------------------------------
+/** What the build card's draw (W3DCommandBarHelpPopupDraw) puts beside the .wnd's texts: the price and
+ * build time at the header's right, then a row of figure cells, each an icon and its value. Filled by
+ * ControlBar::populateBuildTooltipLayout. */
+//-------------------------------------------------------------------------------------------------
+struct BuildTooltipFigures
+{
+ enum { MAX_CELLS = 7 };
+ /// a card with no figures wears the short top row (<prefix>TipHead*, 38 high at 1080) and its
+ /// description starts here (the generator's TIP_TEXT_HEAD)
+ enum { HEAD_HEIGHT = 36 };
+ UnicodeString cost; ///< empty when there is nothing to pay
+ Bool costIsMoney; ///< the money icon goes before it; a science's points go without
+ UnicodeString time; ///< empty for none
+ Int cellCount; ///< 0: no row, and the description moves up into it
+ Int cellIcon[ MAX_CELLS ]; ///< ControlBarTooltipImages::ICON_*
+ UnicodeString cellValue[ MAX_CELLS ];
+};
+extern const BuildTooltipFigures& ControlBarBuildTooltipFigures( void );
+
#endif // end __CONTROLBAR_H_
diff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/ControlBarScheme.h b/GeneralsMD/Code/GameEngine/Include/GameClient/ControlBarScheme.h
index 27a7dda6c..ccab0b354 100644
--- a/GeneralsMD/Code/GameEngine/Include/GameClient/ControlBarScheme.h
+++ b/GeneralsMD/Code/GameEngine/Include/GameClient/ControlBarScheme.h
@@ -120,6 +120,21 @@ private:
};
+/// The tooltips' art one TooltipImage prefix names (Tools/hud_command_bar.py, TIP_*): <prefix>Tip<piece> the
+/// build card's nine (ControlBarPopupDescription.wnd), <prefix>CursorTip<piece> the pointer's nine
+/// (Mouse::drawTooltip), <prefix>TipIcon<Kind> the card's figures. NULL where the art has none.
+//-----------------------------------------------------------------------------
+struct ControlBarTooltipImages
+{
+ enum { ICON_MONEY, ICON_TIME, ICON_HEALTH, ICON_ARMOR, ICON_DAMAGE, ICON_RATE, ICON_RANGE, ICON_SPEED, ICON_POWER, ICON_COUNT };
+ const Image *card[ 9 ]; ///< in ControlBarScheme::FRAME_* order
+ const Image *head[ 3 ]; ///< <prefix>TipHead{TL,T,TR}: the card's top row without the figures' well, for a card with no figures
+ const Image *cursor[ 9 ];
+ const Image *icon[ ICON_COUNT ];
+
+ void find( const AsciiString& prefix ); ///< every one NULL for an empty prefix
+};
+
// Class that each scheme will have. Contains all information about that scheme
//-----------------------------------------------------------------------------
class ControlBarScheme
@@ -254,6 +269,10 @@ public:
AsciiString m_powerTrayName;
const Image *m_powerTray[ TRAY_PIECE_COUNT ]; ///< resolved by init; all NULL without the key
+ /// TooltipImage: the prefix of the tooltips' art; a scheme without it wears the console's, Helpbox
+ AsciiString m_tooltipName;
+ ControlBarTooltipImages m_tooltip; ///< resolved by init
+
@@ -319,6 +338,10 @@ public:
/// the general's powers tray's pieces (ControlBarScheme::TRAY_*) of the scheme on screen, or NULL
/// without a cell; the tray then keeps the shipped column
const Image *const *getPowerTray( void ) const;
+ /// the tooltips' art of the scheme on screen, or the console's when it has no card of its own
+ const ControlBarTooltipImages& getTooltipImages( void ) const;
+ /// the console's tooltips (Helpbox), which the shell wears
+ const ControlBarTooltipImages& getConsoleTooltipImages( void ) const { return m_consoleTooltip; }
/// the scheme's painting, cut at the panel seams and each piece drawn where its panel stands
void drawPainting( ICoord2D offset, Bool foreground );
@@ -341,6 +364,7 @@ private:
ControlBarScheme *m_currentScheme; ///< the current scheme that everythign uses
Bool m_loadingControlBarPro; ///< newControlBarScheme marks what it makes as ControlBar Pro's
+ ControlBarTooltipImages m_consoleTooltip; ///< Helpbox, resolved by init
Coord2D m_multiplyer;
typedef std::list< ControlBarScheme* > ControlBarSchemeList; ///< list of control bar schemes
@@ -365,5 +389,9 @@ const Image *ControlBarSideImage( const PlayerTemplate *pt, const char *prefix )
/// the side's emblem the observer's column and the rack show: ControlBarSideImage's SSObserver, else
/// its EnabledImage
const Image *ControlBarSideEmblem( const PlayerTemplate *pt );
+/// nine pieces (ControlBarScheme::FRAME_* order) filling box: the corners at their size times scale (the
+/// art's texels are 1080 pixels), the edges and the centre stretched between them. FALSE, and nothing
+/// drawn, when the art lacks the two corners that size it
+Bool ControlBarDrawNinePieceBox( const Image *const *pieces, const IRegion2D& box, Real scale );
#endif // __CONTROL_BAR_SCHEME_H_
diff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/Mouse.h b/GeneralsMD/Code/GameEngine/Include/GameClient/Mouse.h
index 913523ada..9d112a54b 100644
--- a/GeneralsMD/Code/GameEngine/Include/GameClient/Mouse.h
+++ b/GeneralsMD/Code/GameEngine/Include/GameClient/Mouse.h
@@ -412,6 +412,7 @@ protected:
UnsignedInt m_stillTime;
RGBAColorInt m_tooltipTextColor;
RGBAColorInt m_tooltipBackColor;
+ RGBAColorInt m_tooltipFrameTextColor; ///< the text's on the art's frame: the colour the caller named (a unit's owner) at full strength
Int m_eventsThisFrame;
diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Armor.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Armor.h
index 9d111bd56..c263836f3 100644
--- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Armor.h
+++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Armor.h
@@ -63,11 +63,16 @@ public:
static void parseArmorCoefficients( INI* ini, void *instance, void* /* store */, const void* userData );
+ /// the Armor block's name, which the build tooltip shows as the armour's class
+ const AsciiString& getName() const { return m_name; }
+
protected:
private:
+ friend class ArmorStore;
Real m_damageCoefficient[DAMAGE_NUM_TYPES]; ///< modifiers to damage
-};
+ AsciiString m_name;
+};
//-------------------------------------------------------------------------------------------------
class Armor
diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Locomotor.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Locomotor.h
index c9d06d709..c45e6cfaa 100644
--- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Locomotor.h
+++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Locomotor.h
@@ -134,6 +134,9 @@ public:
void friend_setName(const AsciiString& n) { m_name = n; }
+ /// the undamaged top speed, dist/frame, before the owner's SpeedScale (the build tooltip's figure)
+ Real getMaxSpeed() const { return m_maxSpeed; }
+
void validate();
protected:
diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp
index 1deaee0a5..b89aa6d92 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp
@@ -1475,7 +1475,6 @@ ControlBar::~ControlBar( void )
} // end ~ControlBar
void ControlBarPopupDescriptionUpdateFunc( WindowLayout *layout, void *param );
-void ControlBarPopupDescription_forgetOffset( void );
//-------------------------------------------------------------------------------------------------
// Three-panel control bar layout -----------------------------------------------------------------
@@ -2211,11 +2210,9 @@ void ControlBar_logPlacement( const char *tag, Int frame )
markerWin->winGetScreenPosition( &liveX, &liveY );
/* The other half of the complaint was tooltips off the screen, so put a real one up - the same
- call hovering a build button makes - and write down the rectangle it landed in. This is what
- cleared the build popup: it is placed against BackgroundMarker's *live* screen position, and
- the drift never moves that window, so with the bar's children two hundred pixels high the
- popup was measured in exactly the same place as with them home. Kept because it is the only
- thing that says so. */
+ call hovering a build button makes - and write down the rectangle it landed in. The popup
+ stands on the radar's frame, so it goes wherever the drift takes the radar. Kept because it
+ is the only thing that says where it landed. */
Int tipX = -1, tipY = -1, tipW = 0, tipH = 0;
GameWindow *master = TheControlBar->getMasterParent();
GameWindow *button = master ? controlBarFirstCommandButton( master ) : NULL;
@@ -2939,7 +2936,6 @@ void ControlBar::initWindows( void )
if(!m_animateWindowManagerForGenShortcuts)
m_animateWindowManagerForGenShortcuts = NEW AnimateWindowManager;
m_buildToolTipLayout = TheWindowManager->winCreateLayout( "ControlBarPopupDescription.wnd" );
- ControlBarPopupDescription_forgetOffset();
if(m_buildToolTipLayout)
{
m_buildToolTipLayout->hide(TRUE);
diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBarScheme.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBarScheme.cpp
index 26761e43c..a31c04358 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBarScheme.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBarScheme.cpp
@@ -185,6 +185,7 @@ const FieldParse ControlBarSchemeManager::m_controlBarSchemeFieldParseTable[] =
{ "IdleAircraftLR", INI::parseICoord2D, NULL, offsetof( ControlBarScheme, m_idleLR[ ControlBarScheme::IDLE_AIRCRAFT ] ) },
{ "RadarFrameImage", INI::parseAsciiString, NULL, offsetof( ControlBarScheme, m_radarFrameName ) },
{ "PowerTrayImage", INI::parseAsciiString, NULL, offsetof( ControlBarScheme, m_powerTrayName ) },
+ { "TooltipImage", INI::parseAsciiString, NULL, offsetof( ControlBarScheme, m_tooltipName ) },
{ "CommandMarkerImage", INI::parseMappedImage, NULL, offsetof( ControlBarScheme, m_commandMarkerImage) },
{ "ExpBarForegroundImage", INI::parseMappedImage, NULL, offsetof( ControlBarScheme, m_expBarForeground) },
@@ -477,6 +478,7 @@ ControlBarScheme::ControlBarScheme(void)
m_radarFrame[ i ] = NULL;
for( Int i = 0; i < TRAY_PIECE_COUNT; i++ )
m_powerTray[ i ] = NULL;
+ m_tooltip = ControlBarTooltipImages();
}
@@ -508,8 +510,8 @@ static void placeSchemeWindow( GameWindow *win, const ICoord2D& ul, const ICoord
( lr.y - ul.y ) * resMultiplier.y + COMMAND_BAR_SIZE_OFFSET );
}
-/// <prefix><suffix> for each suffix from the mapped images; every one NULL when the scheme names no prefix
-static void findPieces( const AsciiString& prefix, const char *const *suffixes, Int count, const Image **out )
+/// <prefix><middle><suffix> for each suffix from the mapped images; every one NULL when the scheme names no prefix
+static void findPieces( const AsciiString& prefix, const char *middle, const char *const *suffixes, Int count, const Image **out )
{
for( Int i = 0; i < count; i++ )
{
@@ -517,19 +519,33 @@ static void findPieces( const AsciiString& prefix, const char *const *suffixes,
if( prefix.isEmpty() )
continue;
AsciiString name = prefix;
+ name.concat( middle );
name.concat( suffixes[ i ] );
out[ i ] = TheMappedImageCollection->findImageByName( name );
}
}
+static const char *const theFrameSuffixes[ ControlBarScheme::FRAME_PIECE_COUNT ] = { "TL", "T", "TR", "L", "C", "R", "BL", "B", "BR" };
+
+void ControlBarTooltipImages::find( const AsciiString& prefix )
+{
+ // the generator's TIP_ICONS, in ICON_* order
+ static const char *const iconSuffixes[ ICON_COUNT ] =
+ { "Money", "Time", "Health", "Armor", "Damage", "Rate", "Range", "Speed", "Power" };
+ findPieces( prefix, "Tip", theFrameSuffixes, ControlBarScheme::FRAME_PIECE_COUNT, card );
+ findPieces( prefix, "TipHead", theFrameSuffixes, 3, head );
+ findPieces( prefix, "CursorTip", theFrameSuffixes, ControlBarScheme::FRAME_PIECE_COUNT, cursor );
+ findPieces( prefix, "TipIcon", iconSuffixes, ICON_COUNT, icon );
+}
+
void ControlBarScheme::init(void)
{
// before anything below lays the bar out: layoutPanels fits the radar's frame from these
- static const char *const frameSuffixes[ FRAME_PIECE_COUNT ] = { "TL", "T", "TR", "L", "C", "R", "BL", "B", "BR" };
static const char *const traySuffixes[ TRAY_PIECE_COUNT ] =
{ "Cell", "EdgeTop", "EdgeLeft", "EdgeBottom", "CornerTopLeft", "CornerBottomLeft", "Step" };
- findPieces( m_radarFrameName, frameSuffixes, FRAME_PIECE_COUNT, m_radarFrame );
- findPieces( m_powerTrayName, traySuffixes, TRAY_PIECE_COUNT, m_powerTray );
+ findPieces( m_radarFrameName, "", theFrameSuffixes, FRAME_PIECE_COUNT, m_radarFrame );
+ findPieces( m_powerTrayName, "", traySuffixes, TRAY_PIECE_COUNT, m_powerTray );
+ m_tooltip.find( m_tooltipName );
if(TheControlBar)
{
@@ -634,7 +650,7 @@ void ControlBarScheme::init(void)
}
static const char *const states[ 4 ] = { "", "H", "P", "I" };
const Image *image[ 4 ];
- findPieces( m_idleButtonImage[ i ], states, 4, image );
+ findPieces( m_idleButtonImage[ i ], "", states, 4, image );
GadgetButtonSetEnabledImage( win, image[ 0 ] );
GadgetButtonSetHiliteImage( win, image[ 1 ] );
GadgetButtonSetHiliteSelectedImage( win, image[ 2 ] );
@@ -921,6 +937,7 @@ ControlBarSchemeManager::ControlBarSchemeManager( void )
{
m_currentScheme = NULL;
m_loadingControlBarPro = FALSE;
+ m_consoleTooltip = ControlBarTooltipImages();
m_schemeList.clear();
m_multiplyer.x = m_multiplyer.y = 1;
}
@@ -1129,6 +1146,7 @@ void ControlBarSchemeManager::init( void )
m_loadingControlBarPro = TRUE;
ini.load( AsciiString( "Data\\INI\\ControlBarProReforged.ini" ), INI_LOAD_OVERWRITE, NULL );
m_loadingControlBarPro = FALSE;
+ m_consoleTooltip.find( AsciiString( "Helpbox" ) );
// //Load the user modified control bar schemes
// WIN32_FIND_DATA findData;
@@ -1392,6 +1410,47 @@ const Image *const *ControlBarSchemeManager::getPowerTray( void ) const
return m_currentScheme->m_powerTray;
}
+const ControlBarTooltipImages& ControlBarSchemeManager::getTooltipImages( void ) const
+{
+ if( m_currentScheme == NULL || m_currentScheme->m_tooltip.card[ ControlBarScheme::FRAME_TL ] == NULL )
+ return m_consoleTooltip;
+ return m_currentScheme->m_tooltip;
+}
+
+//-----------------------------------------------------------------------------
+/** Nine pieces between outer and inner: the corners, the edges stretched along inner and the centre
+ * under it. A piece the art leaves out (drawImage takes NULL) leaves what is under it showing. */
+//-----------------------------------------------------------------------------
+static void drawNinePiece( const Image *const *pieces, const IRegion2D& outer, const IRegion2D& inner )
+{
+ const Int xs[ 4 ] = { outer.lo.x, inner.lo.x, inner.hi.x, outer.hi.x };
+ const Int ys[ 4 ] = { outer.lo.y, inner.lo.y, inner.hi.y, outer.hi.y };
+ for( Int piece = 0; piece < ControlBarScheme::FRAME_PIECE_COUNT; piece++ )
+ {
+ const Int col = piece % 3, row = piece / 3;
+ TheDisplay->drawImage( pieces[ piece ], xs[ col ], ys[ row ], xs[ col + 1 ], ys[ row + 1 ] );
+ }
+}
+
+Bool ControlBarDrawNinePieceBox( const Image *const *pieces, const IRegion2D& box, Real k )
+{
+ const Image *tl = pieces[ ControlBarScheme::FRAME_TL ];
+ const Image *br = pieces[ ControlBarScheme::FRAME_BR ];
+ if( tl == NULL || br == NULL )
+ return FALSE;
+ IRegion2D inner;
+ inner.lo.x = box.lo.x + REAL_TO_INT_CEIL( tl->getImageWidth() * k );
+ inner.lo.y = box.lo.y + REAL_TO_INT_CEIL( tl->getImageHeight() * k );
+ // a box narrower than its two corners (the pointer's tooltip opening) lets the right ones overhang
+ inner.hi.x = max( inner.lo.x, box.hi.x - REAL_TO_INT_CEIL( br->getImageWidth() * k ) );
+ inner.hi.y = max( inner.lo.y, box.hi.y - REAL_TO_INT_CEIL( br->getImageHeight() * k ) );
+ IRegion2D outer = box;
+ outer.hi.x = max( outer.hi.x, inner.hi.x + REAL_TO_INT_CEIL( br->getImageWidth() * k ) );
+ outer.hi.y = max( outer.hi.y, inner.hi.y + REAL_TO_INT_CEIL( br->getImageHeight() * k ) );
+ drawNinePiece( pieces, outer, inner );
+ return TRUE;
+}
+
//-----------------------------------------------------------------------------
/** The radar's frame, nine pieces round wherever ControlBar::fitRadarToMap stood the radar: the
* corners at their size, the edges stretched along the radar and the centre under it, which is
@@ -1409,16 +1468,7 @@ static void drawRadarFrame( const Image *const *frame )
inner.hi.x += inner.lo.x;
inner.hi.y += inner.lo.y;
ControlBarSchemeManager::radarFrameRect( frame, inner, &outer );
- const Int xs[ 4 ] = { outer.lo.x, inner.lo.x, inner.hi.x, outer.hi.x };
- const Int ys[ 4 ] = { outer.lo.y, inner.lo.y, inner.hi.y, outer.hi.y };
- for( Int piece = 0; piece < ControlBarScheme::FRAME_PIECE_COUNT; piece++ )
- {
- // a piece the art leaves out leaves the painting showing there
- if( frame[ piece ] == NULL )
- continue;
- const Int col = piece % 3, row = piece / 3;
- TheDisplay->drawImage( frame[ piece ], xs[ col ], ys[ row ], xs[ col + 1 ], ys[ row + 1 ] );
- }
+ drawNinePiece( frame, outer, inner );
}
//-----------------------------------------------------------------------------
diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/ControlBarPopupDescription.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/ControlBarPopupDescription.cpp
index 0ee9c275d..abdd1a212 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/ControlBarPopupDescription.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/ControlBarPopupDescription.cpp
@@ -90,8 +90,13 @@
#include "GameClient/InGameUI.h"
#include "GameClient/MetaEvent.h"
#include "GameClient/ControlBar.h"
+#include "GameClient/ControlBarScheme.h"
#include "GameClient/DisplayStringManager.h"
#include "GameLogic/AI.h"
+#include "GameLogic/Armor.h"
+#include "GameLogic/ArmorSet.h"
+#include "GameLogic/Locomotor.h"
+#include "GameLogic/Module/AIUpdate.h"
#include "GameLogic/GameLogic.h"
#include "GameLogic/Damage.h"
#include "GameLogic/Module/FireWeaponWhenDeadBehavior.h"
@@ -174,12 +179,15 @@ struct BuildTooltipUpgrade
struct BuildTooltipCard
{
Bool hasStats; ///< a unit's card: the figures below are there
- Int buildSeconds;
Int health; ///< 0 for a body that cannot be hurt
Int damage; ///< the main weapon's, with the upgrades the player owns; 0 for no weapon
Int range;
Real attacksPerSecond; ///< shots a second over a whole clip and its reload
Int damagePerSecond;
+ UnicodeString armor; ///< the unconditioned armour's class, empty for none
+ Int speed; ///< the normal locomotor's top speed a second, 0 for none
+ Int power; ///< EnergyProduction: what it adds to the base's power, negative for what it draws
+ Bool structure;
std::vector< BuildTooltipUpgrade > upgrades; ///< a unit's upgrades, or the units an upgrade changes
};
@@ -544,6 +552,94 @@ static void putUpgradeTargets( BuildTooltipCard &card, const UpgradeTemplate *up
}
}
+//-------------------------------------------------------------------------------------------------
+/** The class of `thing`'s unconditioned armour: TOOLTIP:Armor and the Armor block's name with its first
+ * "Armor" taken out (TankArmor reads TOOLTIP:ArmorTank, StructureArmorTough TOOLTIP:ArmorStructureTough).
+ * A mod's armour the string table does not know shows that name itself. Empty when the set wears none. */
+//-------------------------------------------------------------------------------------------------
+static UnicodeString armorClass( const ThingTemplate *thing )
+{
+ const ArmorTemplateSet *set = thing->findArmorTemplateSet( ArmorSetFlags() );
+ if( set == NULL || set->getArmorTemplate() == NULL )
+ return UnicodeString::TheEmptyString;
+ std::string name = set->getArmorTemplate()->getName().str();
+ const size_t armor = name.find( "Armor" );
+ if( armor != std::string::npos )
+ name.erase( armor, 5 );
+ Bool exists = FALSE;
+ UnicodeString text = TheGameText->fetch( ( "TOOLTIP:Armor" + name ).c_str(), &exists );
+ if( !exists )
+ text.translate( AsciiString( name.c_str() ) );
+ return text;
+}
+
+//-------------------------------------------------------------------------------------------------
+/** `thing`'s top speed a second on its normal locomotors, the fastest of them, at its SpeedScale; 0 for
+ * one that does not move. */
+//-------------------------------------------------------------------------------------------------
+static Int topSpeed( const ThingTemplate *thing )
+{
+ Real fastest = 0.0f;
+ const ModuleInfo &modules = thing->getBehaviorModuleInfo();
+ for( Int m = 0; m < modules.getCount(); ++m )
+ {
+ const ModuleData *data = modules.getNthData( m );
+ if( data == NULL || !data->isAiModuleData() )
+ continue;
+ const LocomotorTemplateVector *set = static_cast< const AIUpdateModuleData * >( data )->findLocomotorTemplateVector( LOCOMOTORSET_NORMAL );
+ for( size_t each = 0; set && each < set->size(); ++each )
+ fastest = max( fastest, ( *set )[ each ]->getMaxSpeed() );
+ }
+ return REAL_TO_INT( fastest * thing->getSpeedScale() * LOGICFRAMES_PER_SECOND );
+}
+
+//-------------------------------------------------------------------------------------------------
+/** `text` without its lines that end in ": <figure>", and the blank lines left at its end. EA wrote
+ * "Power Required: 1" or "Power Provided: 5" into every building's description, in every language,
+ * and the card's power cell says it now. */
+// ponytail: matched by the figure, not the words, so it holds in every language; a building whose
+// description ends another line in the same ": N" loses that line too, none of the stock ones does
+//-------------------------------------------------------------------------------------------------
+static UnicodeString withoutFigureLine( const UnicodeString &text, Int figure )
+{
+ UnicodeString tail;
+ tail.format( u": %d", figure );
+ const WideCharString end = tail.str();
+ const WideCharString whole = text.str();
+ std::vector< WideCharString > kept;
+ for( size_t from = 0; from <= whole.size(); )
+ {
+ size_t to = whole.find( u'\n', from );
+ if( to == WideCharString::npos )
+ to = whole.size();
+ const WideCharString line = whole.substr( from, to - from );
+ const size_t last = line.find_last_not_of( u' ' );
+ const WideCharString trimmed = last == WideCharString::npos ? WideCharString() : line.substr( 0, last + 1 );
+ if( trimmed.size() < end.size() || trimmed.compare( trimmed.size() - end.size(), end.size(), end ) != 0 )
+ kept.push_back( line );
+ from = to + 1;
+ }
+ while( !kept.empty() && kept.back().find_first_not_of( u' ' ) == WideCharString::npos )
+ kept.pop_back();
+
+ UnicodeString out;
+ for( size_t each = 0; each < kept.size(); ++each )
+ {
+ if( each > 0 )
+ out.concat( u"\n" );
+ out.concat( kept[ each ].c_str() );
+ }
+ return out;
+}
+
+/// what the card's draw puts beside the texts, filled by populateBuildTooltipLayout
+static BuildTooltipFigures theFigures;
+
+const BuildTooltipFigures& ControlBarBuildTooltipFigures( void )
+{
+ return theFigures;
+}
+
void ControlBarPopupDescriptionUpdateFunc( WindowLayout *layout, void *param )
{
if(TheScriptEngine->isGameEnding())
@@ -569,17 +665,6 @@ void ControlBarPopupDescriptionUpdateFunc( WindowLayout *layout, void *param )
}
-//
-// How far the bar had travelled (minimised, or sliding in) the last time the tooltip was moved with
-// it. It belongs to one tooltip layout: a new layout, made when the resolution changes, stands where
-// the loader put it, and carrying the old one's offset over lifted it by the whole minimised drop.
-//
-static ICoord2D theTooltipLastOffset = { 0, 0 };
-
-void ControlBarPopupDescription_forgetOffset( void )
-{
- theTooltipLastOffset.x = theTooltipLastOffset.y = 0;
-}
// ---------------------------------------------------------------------------------------
void ControlBar::showBuildTooltipLayout( GameWindow *cmdButton )
@@ -717,7 +802,7 @@ void ControlBar::populateBuildTooltipLayout( const CommandButton *commandButton,
if(!m_buildToolTipLayout)
return;
- UnicodeString name, cost, descrip;
+ UnicodeString name, descrip;
UnicodeString requires = UnicodeString::TheEmptyString, requiresList;
Bool firstRequirement = true;
const ProductionPrerequisite *prereq;
@@ -726,6 +811,11 @@ void ControlBar::populateBuildTooltipLayout( const CommandButton *commandButton,
UnicodeString cardWarning; // why it cannot be bought right now, empty when it can
UnicodeString cardRequires; // "Requires: ..." naming what is still missing
BuildTooltipCard card = BuildTooltipCard();
+ theFigures = BuildTooltipFigures();
+ auto putTime = [&]( Int frames )
+ {
+ theFigures.time.format( TheGameText->fetch( "TOOLTIP:StatSeconds" ), ControlBar_secondsFromFrames( (Real)frames ) );
+ };
if(commandButton)
{
@@ -877,14 +967,20 @@ void ControlBar::populateBuildTooltipLayout( const CommandButton *commandButton,
costToBuild = thingTemplate->calcCostToBuild( player );
if( costToBuild > 0 )
{
- cost.format( TheGameText->fetch("TOOLTIP:Cost"), costToBuild );
+ theFigures.cost.format( u"%d", costToBuild );
+ theFigures.costIsMoney = TRUE;
}
// retail tells you the price and nothing about what you get: the card adds the build time,
- // health and the main weapon's figures, all read off the template, there is no Object yet
+ // the body, the main weapon's figures, the speed and the power, all read off the template,
+ // there is no Object yet
card.hasStats = TRUE;
- card.buildSeconds = ControlBar_secondsFromFrames( (Real)thingTemplate->calcTimeToBuild( player ) );
+ putTime( thingTemplate->calcTimeToBuild( player ) );
putUnitFigures( card, thingTemplate, player );
+ card.armor = armorClass( thingTemplate );
+ card.speed = topSpeed( thingTemplate );
+ card.power = thingTemplate->getEnergyProduction();
+ card.structure = thingTemplate->isKindOf( KINDOF_STRUCTURE );
// ask each prerequisite to give us a list of the non satisfied prerequisites
for( Int i=0; i<thingTemplate->getPrereqCount(); i++ )
@@ -977,8 +1073,10 @@ void ControlBar::populateBuildTooltipLayout( const CommandButton *commandButton,
costToBuild = upgradeTemplate->calcCostToBuild( player );
if( costToBuild > 0 )
{
- cost.format( TheGameText->fetch("TOOLTIP:Cost"), costToBuild );
+ theFigures.cost.format( u"%d", costToBuild );
+ theFigures.costIsMoney = TRUE;
}
+ putTime( upgradeTemplate->calcTimeToBuild( player ) );
if( missingScience )
cardRequires.format( TheGameText->fetch( "CONTROLBAR:Requirements" ).str(), TheGameText->fetch( "CONTROLBAR:GeneralsPromotion" ).str() );
@@ -991,7 +1089,7 @@ void ControlBar::populateBuildTooltipLayout( const CommandButton *commandButton,
costToBuild = TheScienceStore->getSciencePurchaseCost( st );
if( costToBuild > 0 )
{
- cost.format( TheGameText->fetch("TOOLTIP:ScienceCost"), costToBuild );
+ theFigures.cost.format( TheGameText->fetch("TOOLTIP:ScienceCost"), costToBuild );
}
// ask each prerequisite to give us a list of the non satisfied prerequisites
@@ -1064,47 +1162,48 @@ void ControlBar::populateBuildTooltipLayout( const CommandButton *commandButton,
}
- // the layout's one text, in the order Reforged's card had it: the description, the unit's figures
- // counted with the upgrades the player owns, every upgrade that moves one of them and by how much
- // (on an upgrade's own button, the units it changes), then why it cannot be bought now and what
- // it still needs
+ // the unit's figures, counted with the upgrades the player owns, go in the card's row of icons
+ // (BuildTooltipFigures); the description keeps what an icon cannot say: every upgrade that moves a
+ // figure and by how much (on an upgrade's own button, the units it changes), then why it cannot be
+ // bought now and what it still needs
if( card.hasStats )
{
- // each figure ends in a short gloss of what it counts, so the card reads without a manual
- UnicodeString figures;
- auto row = [&]( const char *label, const UnicodeString &value, const char *hint )
+ auto cell = [&]( Int icon, const UnicodeString &value )
{
- figures.concat( u"\n" );
- figures.concat( TheGameText->fetch( label ) );
- figures.concat( u": " );
- figures.concat( value );
- figures.concat( u" " );
- figures.concat( TheGameText->fetch( hint ) );
+ theFigures.cellIcon[ theFigures.cellCount ] = icon;
+ theFigures.cellValue[ theFigures.cellCount ] = value;
+ ++theFigures.cellCount;
};
- auto number = []( Int value )
+ auto number = []( const WideChar *format, Int value )
{
UnicodeString text;
- text.format( u"%d", value );
+ text.format( format, value );
return text;
};
if( card.health > 0 )
- row( "TOOLTIP:StatHealth", number( card.health ), "TOOLTIP:StatHealthHint" );
+ cell( ControlBarTooltipImages::ICON_HEALTH, number( u"%d", card.health ) );
+ if( !card.armor.isEmpty() )
+ cell( ControlBarTooltipImages::ICON_ARMOR, card.armor );
if( card.damage > 0 )
{
- // a bomb that kills its carrier goes off once, so it has no rate
- const Bool once = card.attacksPerSecond <= 0.0f;
- row( "TOOLTIP:StatDamage", number( card.damage ), "TOOLTIP:StatDamageHint" );
- row( "TOOLTIP:StatAttackSpeed", once ? UnicodeString( u"-" ) : UnicodeString( MultiByteToWideCharSingleLine( rateFigure( card.attacksPerSecond ).c_str() ).c_str() ),
- "TOOLTIP:StatAttackSpeedHint" );
- row( "TOOLTIP:StatDamagePerSecond", once ? UnicodeString( u"-" ) : number( card.damagePerSecond ), "TOOLTIP:StatDamagePerSecondHint" );
- row( "TOOLTIP:StatRange", number( card.range ), "TOOLTIP:StatRangeHint" );
+ // the rate cell is damage a second; a bomb that kills its carrier goes off once, so it has none
+ UnicodeString rate( u"-" );
+ if( card.attacksPerSecond > 0.0f )
+ {
+ rate = number( u"%d", card.damagePerSecond );
+ rate.concat( TheGameText->fetch( "TOOLTIP:StatPerSecond" ) );
+ }
+ cell( ControlBarTooltipImages::ICON_DAMAGE, number( u"%d", card.damage ) );
+ cell( ControlBarTooltipImages::ICON_RATE, rate );
+ cell( ControlBarTooltipImages::ICON_RANGE, number( u"%d", card.range ) );
+ }
+ if( !card.structure && card.speed > 0 )
+ cell( ControlBarTooltipImages::ICON_SPEED, number( u"%d", card.speed ) );
+ if( card.power != 0 )
+ {
+ cell( ControlBarTooltipImages::ICON_POWER, number( u"%+d", card.power ) );
+ descrip = withoutFigureLine( descrip, abs( card.power ) );
}
- UnicodeString seconds;
- seconds.format( TheGameText->fetch( "TOOLTIP:StatSeconds" ), card.buildSeconds );
- row( "TOOLTIP:StatTime", seconds, "TOOLTIP:StatTimeHint" );
- if( !descrip.isEmpty() )
- descrip.concat( u"\n" );
- descrip.concat( figures );
}
if( !card.upgrades.empty() )
{
@@ -1168,30 +1267,21 @@ void ControlBar::populateBuildTooltipLayout( const CommandButton *commandButton,
GadgetStaticTextSetText(win, name);
}
- win = TheWindowManager->winGetWindowFromId(m_buildToolTipLayout->getFirstWindow(), TheNameKeyGenerator->nameToKey("ControlBarPopupDescription.wnd:StaticTextCost"));
- if(win)
- {
- if( costToBuild > 0 )
- {
- win->winHide( FALSE );
- GadgetStaticTextSetText(win, cost);
- }
- else
- {
- win->winHide( TRUE );
- }
- }
+ // the price is drawn with its icon by the card now; a mod's copy of EA's layout still has the
+ // window that used to say it, empty
+ static const NameKeyType costID = TheNameKeyGenerator->nameToKey( "ControlBarPopupDescription.wnd:StaticTextCost" );
+ win = TheWindowManager->winGetWindowFromId( m_buildToolTipLayout->getFirstWindow(), costID );
+ if( win )
+ win->winHide( TRUE );
win = TheWindowManager->winGetWindowFromId(m_buildToolTipLayout->getFirstWindow(), TheNameKeyGenerator->nameToKey("ControlBarPopupDescription.wnd:StaticTextDescription"));
if(win)
{
- static NameKeyType winNamekey = TheNameKeyGenerator->nameToKey( AsciiString( "ControlBar.wnd:BackgroundMarker" ) );
- ICoord2D &lastOffset = theTooltipLastOffset;
+ static NameKeyType radarID = TheNameKeyGenerator->nameToKey( AsciiString( "ControlBar.wnd:LeftHUD" ) );
ICoord2D size, newSize, pos;
- Int diffSize;
-
+
DisplayString *tempDString = TheDisplayStringManager->newDisplayString();
win->winGetSize(&size.x, &size.y);
tempDString->setFont(win->winGetFont());
@@ -1200,49 +1290,44 @@ void ControlBar::populateBuildTooltipLayout( const CommandButton *commandButton,
tempDString->getSize(&newSize.x, &newSize.y);
TheDisplayStringManager->freeDisplayString(tempDString);
tempDString = NULL;
- diffSize = newSize.y - size.y;
GameWindow *parent = m_buildToolTipLayout->getFirstWindow();
if(!parent)
return;
-
- parent->winGetSize(&size.x, &size.y);
- if(size.y + diffSize < 102) {
- diffSize = 102 - size.y;
- }
- parent->winSetSize(size.x, size.y + diffSize);
+ // the card's layout at 1080 (Tools/hud_command_bar.py, TIP_TEXT): the description from y 66 under
+ // the figures' row, right under the short top row when there is none, 14 of frame under it; never
+ // under 102 high. The text window is as tall as its text, so its centring leaves the text at its
+ // top. The card is 512 wide at 1080 and fitted (LAYOUT_FIT), so its width is the scale, as the
+ // draw takes it.
+ parent->winGetSize(&size.x, &size.y);
+ const Real k = size.x / 512.0f;
+ const Int descTop = REAL_TO_INT( ( theFigures.cellCount > 0 ? 66 : BuildTooltipFigures::HEAD_HEIGHT ) * k );
+ const Int cardHeight = max( REAL_TO_INT( 102 * k ), descTop + max( newSize.y, REAL_TO_INT( 30 * k ) ) + REAL_TO_INT( 14 * k ) );
+ parent->winSetSize(size.x, cardHeight);
parent->winGetPosition(&pos.x, &pos.y);
-// if(size.y + diffSize < 102)
-// {
-//
-// parent->winSetPosition(pos.x, pos.y - (102 - (newSize.y + size.y + diffSize) ));
-// }
-// else
-
-// heightChange = controlBarPos.y - m_defaultControlBarPosition.y;
-
- GameWindow *marker = TheWindowManager->winGetWindowFromId(NULL,winNamekey);
- static ICoord2D basePos;
- if(!marker)
- {
- return;
- }
- TheControlBar->getBackgroundMarkerPos(&basePos.x, &basePos.y);
- ICoord2D curPos, offset;
- marker->winGetScreenPosition(&curPos.x,&curPos.y);
-
- offset.x = curPos.x - basePos.x;
- offset.y = curPos.y - basePos.y;
-
- parent->winSetPosition(pos.x, (pos.y - diffSize) + (offset.y - lastOffset.y));
-
- lastOffset.x = offset.x;
- lastOffset.y = offset.y;
+ // The card stands on the radar's frame, 6 above it at 1080, wherever the bar's own scale and the
+ // bar's slide or minimising put the radar: the layout's fit anchors it to the screen's bottom
+ // instead, and on 1280x1024 that sank it over the radar's top.
+ GameWindow *radar = TheWindowManager->winGetWindowFromId( NULL, radarID );
+ IRegion2D radarRect, radarOuter;
+ radar->winGetScreenPosition( &radarRect.lo.x, &radarRect.lo.y );
+ radar->winGetSize( &radarRect.hi.x, &radarRect.hi.y );
+ radarRect.hi.x += radarRect.lo.x;
+ radarRect.hi.y += radarRect.lo.y;
+ radarOuter = radarRect;
+ const Image *const *frame = getControlBarSchemeManager()->getRadarFrame();
+ if( frame )
+ ControlBarSchemeManager::radarFrameRect( frame, radarRect, &radarOuter );
+ parent->winSetPosition( pos.x, radarOuter.lo.y - REAL_TO_INT( 6 * k ) - cardHeight );
+
+ ICoord2D descPos;
+ win->winGetPosition(&descPos.x, &descPos.y);
+ win->winSetPosition(descPos.x, descTop);
win->winGetSize(&size.x, &size.y);
- win->winSetSize(size.x, size.y + diffSize);
+ win->winSetSize(size.x, newSize.y);
- GadgetStaticTextSetText(win, descrip);
+ GadgetStaticTextSetText(win, descrip);
}
m_buildToolTipLayout->hide(FALSE);
}
diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/Input/Mouse.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/Input/Mouse.cpp
index 5e2fee9f4..0d0ad7767 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameClient/Input/Mouse.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/Input/Mouse.cpp
@@ -39,6 +39,8 @@
#include "Common/INI.h"
#include "GameClient/ClickTolerance.h"
+#include "GameClient/ControlBar.h"
+#include "GameClient/ControlBarScheme.h"
#include "GameClient/Display.h"
#include "GameClient/DisplayStringManager.h"
#include "GameClient/GameClient.h"
@@ -48,6 +50,7 @@
#include "GameClient/Keyboard.h"
#include "GameClient/Mouse.h"
#include "GameClient/GlobalLanguage.h"
+#include "GameClient/Shell.h"
#include "GameLogic/ScriptEngine.h"
@@ -544,6 +547,7 @@ Mouse::Mouse( void )
m_tooltipBackColor.green = 0;
m_tooltipBackColor.blue = 0;
m_tooltipBackColor.alpha = 255;
+ m_tooltipFrameTextColor = m_tooltipTextColor;
} // end Mouse
@@ -888,6 +892,11 @@ void Mouse::setCursorTooltip( UnicodeString tooltip, Int delay, const RGBColor *
}
if (color)
{
+ // Mouse.ini hands the colour to the box's fill; the art's frame has no fill, so its text wears it
+ m_tooltipFrameTextColor.red = REAL_TO_INT(color->red * 255.0f);
+ m_tooltipFrameTextColor.green = REAL_TO_INT(color->green * 255.0f);
+ m_tooltipFrameTextColor.blue = REAL_TO_INT(color->blue * 255.0f);
+ m_tooltipFrameTextColor.alpha = m_tooltipColorText.alpha;
if (m_useTooltipAltTextColor)
{
if (m_adjustTooltipAltColor)
@@ -925,6 +934,7 @@ void Mouse::setCursorTooltip( UnicodeString tooltip, Int delay, const RGBColor *
{
m_tooltipTextColor = m_tooltipColorText;
m_tooltipBackColor = m_tooltipColorBackground;
+ m_tooltipFrameTextColor = m_tooltipColorText;
}
} // end setCursorTooltip
@@ -1056,33 +1066,54 @@ void Mouse::drawTooltip( void )
Int width, xPos;
Int height, yPos;
m_tooltipDisplayString->getSize(&width,&height);
- placeTooltip( m_currMouse.pos.x, m_currMouse.pos.y, width, height,
+
+ // the text in the pointer tooltip's framed well with TIP_CURSOR_PAD of glass round it
+ // (Tools/hud_command_bar.py), 6 at 1080: the local side's art in a match, the console's in the
+ // shell and wherever the scheme on screen has none of its own (the observer's)
+ const Real scale = TheDisplay->getHeight() / 1080.0f;
+ const Int pad = REAL_TO_INT( 6 * scale );
+ const Int boxHeight = height + 2 + 2 * pad;
+ placeTooltip( m_currMouse.pos.x, m_currMouse.pos.y, width + 2 + 2 * pad, boxHeight,
m_minX, m_minY, m_maxX, m_maxY, &xPos, &yPos );
+ const Int textX = xPos + pad + 1, textY = yPos + pad + 1; // the same glass on every side
- Int boxWidth = (m_tooltipAnimateBackground)?(min(width, m_highlightPos)):width;
+ Int boxWidth = ((m_tooltipAnimateBackground)?(min(width, m_highlightPos)):width) + 2 + 2 * pad;
#define GMC(x) GameMakeColor(x.red, x.green, x.blue, x.alpha)
#define COLOR(x) GMC(m_tooltipColor##x)
- TheDisplay->drawFillRect(xPos, yPos, boxWidth + 2,height + 2, GMC(m_tooltipBackColor));//GameMakeColor(0,0,0,125));
- TheDisplay->drawOpenRect(xPos, yPos, boxWidth + 2,height + 2, 1.0, COLOR(Border));//GameMakeColor(20,20,20,255));
+ const ControlBarSchemeManager *schemes = TheControlBar->getControlBarSchemeManager();
+ const ControlBarTooltipImages &art = TheShell->isShellActive() ? schemes->getConsoleTooltipImages() : schemes->getTooltipImages();
+ IRegion2D box;
+ box.lo.x = xPos;
+ box.lo.y = yPos;
+ box.hi.x = xPos + boxWidth;
+ box.hi.y = yPos + boxHeight;
+ Color textColor = GMC(m_tooltipFrameTextColor);
+ if( !ControlBarDrawNinePieceBox( art.cursor, box, scale ) )
+ {
+ // no art for it (a mod's sheet): Mouse.ini's box
+ TheDisplay->drawFillRect(xPos, yPos, boxWidth, boxHeight, GMC(m_tooltipBackColor));
+ TheDisplay->drawOpenRect(xPos, yPos, boxWidth, boxHeight, 1.0, COLOR(Border));
+ textColor = GMC(m_tooltipTextColor);
+ }
// build clip rect
IRegion2D clipRegion;
- clipRegion.lo.x = xPos+2;
- clipRegion.lo.y = yPos+1;
- clipRegion.hi.x = xPos+2+m_highlightPos;
- clipRegion.hi.y = yPos+1+height;
+ clipRegion.lo.x = textX;
+ clipRegion.lo.y = textY;
+ clipRegion.hi.x = textX+m_highlightPos;
+ clipRegion.hi.y = textY+height;
m_tooltipDisplayString->setClipRegion(&clipRegion);
- m_tooltipDisplayString->draw(xPos +2, yPos +1, GMC(m_tooltipTextColor), COLOR(Shadow));//GameMakeColor(220,220,220,255),GameMakeColor(20,20,20,125));
+ m_tooltipDisplayString->draw(textX, textY, textColor, COLOR(Shadow));//GameMakeColor(220,220,220,255),GameMakeColor(20,20,20,125));
// highlight section
const Int HIGHLIGHT_WIDTH = 15;
- clipRegion.lo.x = xPos+2+m_highlightPos-HIGHLIGHT_WIDTH;
- clipRegion.lo.y = yPos+1;
- clipRegion.hi.x = xPos+2+m_highlightPos;
- clipRegion.hi.y = yPos+1+height;
+ clipRegion.lo.x = textX+m_highlightPos-HIGHLIGHT_WIDTH;
+ clipRegion.lo.y = textY;
+ clipRegion.hi.x = textX+m_highlightPos;
+ clipRegion.hi.y = textY+height;
m_tooltipDisplayString->setClipRegion(&clipRegion);
- m_tooltipDisplayString->draw(xPos +2, yPos +1, COLOR(Highlight), COLOR(Shadow));//GameMakeColor(255,255,0,255),GameMakeColor(20,20,20,125));
+ m_tooltipDisplayString->draw(textX, textY, COLOR(Highlight), COLOR(Shadow));//GameMakeColor(255,255,0,255),GameMakeColor(20,20,20,125));
// get ready for the next part of the anim
if (m_highlightPos < width + HIGHLIGHT_WIDTH)
diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Armor.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Armor.cpp
index e6a78e37e..ed406f157 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Armor.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Armor.cpp
@@ -178,6 +178,7 @@ void ArmorStore::reset()
}
ArmorTemplate& armorTmpl = TheArmorStore->m_armorTemplates[key];
armorTmpl.clear();
+ armorTmpl.m_name = c;
ini->initFromINI(&armorTmpl, myFieldParse);
}
diff --git a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/GUI/GUICallbacks/W3DControlBar.cpp b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/GUI/GUICallbacks/W3DControlBar.cpp
index c9b95b554..77d8353c3 100644
--- a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/GUI/GUICallbacks/W3DControlBar.cpp
+++ b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/GUI/GUICallbacks/W3DControlBar.cpp
@@ -35,6 +35,8 @@
#include "W3DDevice/GameClient/W3DGameWindow.h"
#include "GameClient/InGameUI.h"
#include "GameClient/Display.h"
+#include "GameClient/DisplayStringManager.h"
+#include "GameClient/GameFont.h"
#include "GameClient/ControlBar.h"
#include "GameClient/GameWindowManager.h"
#include "GameClient/ControlBarScheme.h"
@@ -1053,115 +1055,117 @@ void drawSkinnyBorder( Int x, Int y, Int width, Int height)
}
+//-------------------------------------------------------------------------------------------------
+/** The build card (ControlBarPopupDescription.wnd): the scheme's nine pieces round the window, then
+ * what BuildTooltipFigures holds beside the .wnd's texts, laid out as Tools/hud_command_bar.py's
+ * TIP_TEXT at 1080: the money icon and price, the clock and build time, right-aligned in x -186..-46 of
+ * the header (y 5..27); then the figures, a cell each, icon and value, in x 8..-18, y 31..57. */
+//-------------------------------------------------------------------------------------------------
void W3DCommandBarHelpPopupDraw( GameWindow *window, WinInstanceData *instData )
{
-
- static const Image *endBar = TheMappedImageCollection->findImageByName("Helpbox-top");
- static const Image *beginBar = TheMappedImageCollection->findImageByName("Helpbox-bottom");
- static const Image *centerBar = TheMappedImageCollection->findImageByName("Helpbox-middle");
-
- ICoord2D pos, size;
- window->winGetScreenPosition( &pos.x, &pos.y );
- window->winGetSize( &size.x, &size.y );
-
-
-
- if( !endBar || !beginBar || !centerBar)
- return;
-
-
-// Int range;
-// range = size.y;
-
-
- // get image sizes for the ends
- ICoord2D topSize, bottomSize, start, end;
- bottomSize.x = beginBar->getImageWidth();
- bottomSize.y = beginBar->getImageHeight();
- topSize.x = endBar->getImageWidth();
- topSize.y = endBar->getImageHeight();
-
- // get two key points used in the end drawing
- ICoord2D bottomEnd, topStart;
- bottomEnd.x = pos.x + size.x;
- bottomEnd.y = pos.y + size.y - bottomSize.y;
- topStart.x = pos.x;
- topStart.y = pos.y +size.y - topSize.y;
-
- // draw the center repeating bar
- Int centerWidth, pieces;
-
- // get width we have to draw our repeating center in
- centerWidth = size.y - topSize.y - bottomSize.y;
-
- if( centerWidth <= 0)
+ const ControlBarTooltipImages &art = TheControlBar->getControlBarSchemeManager()->getTooltipImages();
+ IRegion2D card;
+ window->winGetScreenPosition( &card.lo.x, &card.lo.y );
+ window->winGetSize( &card.hi.x, &card.hi.y );
+ card.hi.x += card.lo.x;
+ card.hi.y += card.lo.y;
+ // the card is 512 wide at 1080 and the layout fits it (LAYOUT_FIT), so its width is its scale
+ const Real k = ( card.hi.x - card.lo.x ) / 512.0f;
+ const BuildTooltipFigures &figures = ControlBarBuildTooltipFigures();
+ // a card with no figures (a power, a generic window) takes the top row without the figures' well
+ const Image *pieces[ ControlBarScheme::FRAME_PIECE_COUNT ];
+ for( Int piece = 0; piece < ControlBarScheme::FRAME_PIECE_COUNT; ++piece )
+ pieces[ piece ] = art.card[ piece ];
+ if( figures.cellCount == 0 && art.head[ 0 ] )
+ for( Int piece = ControlBarScheme::FRAME_TL; piece <= ControlBarScheme::FRAME_TR; ++piece )
+ pieces[ piece ] = art.head[ piece ];
+ ControlBarDrawNinePieceBox( pieces, card, k );
+
+ auto px = [k]( Int at1080 ) { return REAL_TO_INT( at1080 * k ); };
+ const Int iconSize = px( 16 );
+ const Color white = GameMakeColor( 254, 254, 254, 255 );
+ const Color dim = GameMakeColor( 200, 204, 212, 255 );
+ const Color shadow = GameMakeColor( 0, 0, 0, 255 );
+
+ static NameKeyType nameID = NAMEKEY( "ControlBarPopupDescription.wnd:StaticTextName" );
+ GameFont *font = TheWindowManager->winGetWindowFromId( window, nameID )->winGetFont();
+ GameFont *bold = TheFontLibrary->getFont( font->nameString, font->pointSize, TRUE );
+
+ // one string a slot, so each keeps the texture of its text from frame to frame
+ enum { SLOT_COST, SLOT_TIME, SLOT_CELL };
+ static DisplayString *theStrings[ SLOT_CELL + BuildTooltipFigures::MAX_CELLS ] = { NULL };
+ auto text = [&]( Int slot, const UnicodeString &value, GameFont *withFont )
{
- // draw left end
- start.x = pos.x;
- start.y = pos.y + size.y - bottomSize.y;
- end.y = pos.y + size.y;
- end.x = pos.x + size.x;
- TheWindowManager->winDrawImage(beginBar, start.x, start.y, end.x, end.y);
-
- // draw right end
- start.y = pos.y + size.y - bottomSize.y - topSize.y;
- start.x = pos.x;
- end.x = pos.x + size.x;
- end.y = start.y + topSize.y;
- TheWindowManager->winDrawImage(endBar, start.x, start.y, end.x, end.y);
- }
- else
+ if( theStrings[ slot ] == NULL )
+ theStrings[ slot ] = TheDisplayStringManager->newDisplayString();
+ theStrings[ slot ]->setFont( withFont );
+ theStrings[ slot ]->setText( value );
+ return theStrings[ slot ];
+ };
+ // an icon (none for NULL) and its text after a gap, centred between top and bottom, the text cut at
+ // right: a long armour name (a mod's own, shown raw) stops at its cell's edge
+ auto figure = [&]( const Image *icon, DisplayString *value, Int gap, Int x, Int top, Int bottom, Int right, Color color )
{
-
- // how many whole repeating pieces will fit in that width
- pieces = centerWidth / centerBar->getImageHeight();
-
- // draw the pieces
- start.x = pos.x;
- start.y = pos.y + topSize.y ;
- end.x = start.x + size.x; //centerImage->getImageHeight() + yOffset;
- for( Int i = 0; i < pieces; i++ )
- {
-
- end.y = start.y + centerBar->getImageHeight();
- TheWindowManager->winDrawImage( centerBar,
- start.x, start.y,
- end.x, end.y );
- start.y += centerBar->getImageHeight();
-
- } // end for i
-
- // we will draw the image but clip the parts we don't want to show
- IRegion2D reg;
- reg.lo.x = start.x;
- reg.lo.y = start.y;
- reg.hi.x = pos.x + size.x;
- reg.hi.y = pos.y + size.y - bottomSize.y;
- centerWidth = pos.y + size.y - bottomSize.y - start.y;
- if( centerWidth > 0)
+ const Int y = ( top + bottom - iconSize ) / 2;
+ if( icon )
{
- TheDisplay->setClipRegion(&reg);
- end.y = start.y + centerBar->getImageHeight();
- TheWindowManager->winDrawImage( centerBar,
- start.x, start.y,
- end.x, end.y );
- TheDisplay->enableClipping(FALSE);
+ TheDisplay->drawImage( icon, x, y, x + iconSize, y + iconSize );
+ x += iconSize + gap;
}
+ Int width, height;
+ value->getSize( &width, &height );
+ IRegion2D clip;
+ clip.lo.x = x;
+ clip.lo.y = top;
+ clip.hi.x = right;
+ clip.hi.y = bottom;
+ value->setClipRegion( &clip );
+ value->draw( x, ( top + bottom - height ) / 2, color, shadow );
+ };
+ auto widthOf = [&]( const Image *icon, DisplayString *value, Int gap )
+ {
+ return ( icon ? iconSize + gap : 0 ) + value->getWidth();
+ };
- // draw left end
- end.x = pos.x + size.x;
- end.y = pos.y + size.y;
- start.x = pos.x;
- start.y = pos.y + size.y - bottomSize.y;
- TheWindowManager->winDrawImage(beginBar, start.x, start.y, end.x, end.y);
-
- // draw right end
- start.x = pos.x;
- start.y = pos.y ;
- end.x = pos.x + size.x;
- end.y = pos.y + topSize.y;
- TheWindowManager->winDrawImage(endBar, start.x, start.y, end.x, end.y);
+ const Int headerTop = card.lo.y + px( 5 ), headerBottom = card.lo.y + px( 27 );
+ const Image *money = figures.costIsMoney ? art.icon[ ControlBarTooltipImages::ICON_MONEY ] : NULL;
+ const Image *clock = art.icon[ ControlBarTooltipImages::ICON_TIME ];
+ DisplayString *cost = figures.cost.isEmpty() ? NULL : text( SLOT_COST, figures.cost, bold );
+ DisplayString *time = figures.time.isEmpty() ? NULL : text( SLOT_TIME, figures.time, font );
+ Int x = card.hi.x - px( 46 ) - ( cost ? widthOf( money, cost, px( 4 ) ) : 0 ) - ( cost && time ? px( 12 ) : 0 )
+ - ( time ? widthOf( clock, time, px( 4 ) ) : 0 );
+ if( cost )
+ {
+ figure( money, cost, px( 4 ), x, headerTop, headerBottom, card.hi.x, white );
+ x += widthOf( money, cost, px( 4 ) ) + px( 12 );
}
-
+ if( time )
+ figure( clock, time, px( 4 ), x, headerTop, headerBottom, card.hi.x, dim );
+ if( figures.cellCount == 0 )
+ return;
+ // each cell as wide as its icon and text, the room left over spread as even gaps after them; a row
+ // whose cells will not fit at all (a mod's long armour name on a narrow screen) takes even cells, cut
+ const Int rowLeft = card.lo.x + px( 10 ), rowRight = card.hi.x - px( 18 );
+ const Int rowTop = card.lo.y + px( 31 ), rowBottom = card.lo.y + px( 57 );
+ DisplayString *values[ BuildTooltipFigures::MAX_CELLS ];
+ Int widths[ BuildTooltipFigures::MAX_CELLS ];
+ Int total = 0;
+ for( Int cell = 0; cell < figures.cellCount; ++cell )
+ {
+ values[ cell ] = text( SLOT_CELL + cell, figures.cellValue[ cell ], font );
+ widths[ cell ] = widthOf( art.icon[ figures.cellIcon[ cell ] ], values[ cell ], px( 5 ) );
+ total += widths[ cell ];
+ }
+ const Int room = rowRight - rowLeft;
+ const Bool fits = total <= room;
+ const Int gap = fits ? ( room - total ) / figures.cellCount : 0;
+ x = rowLeft;
+ for( Int cell = 0; cell < figures.cellCount; ++cell )
+ {
+ const Int span = fits ? widths[ cell ] + gap : room / figures.cellCount;
+ figure( art.icon[ figures.cellIcon[ cell ] ], values[ cell ], px( 5 ), x, rowTop, rowBottom, x + span - ( fits ? 0 : px( 2 ) ), white );
+ x += span;
+ }
}
+
diff --git a/GeneralsMD/Code/Tools/hud_command_bar.py b/GeneralsMD/Code/Tools/hud_command_bar.py
index 605103e10..4196f8ed5 100644
--- a/GeneralsMD/Code/Tools/hud_command_bar.py
+++ b/GeneralsMD/Code/Tools/hud_command_bar.py
@@ -16,7 +16,9 @@ The button sheet is ReforgedHud<Side>Powers, 1024x1024: the general's powers win
and tab buttons in their four states, the rank bar's frame, the shortcut tray, the radar corner's hover
bracket, the selection window's emblem and the promotion banner, and the pieces the code lays out
itself (the radar's frame, the powers tray and the pieces the queue's and superweapons' trays take
-mirrored or flipped, the readout plate), each where MappedImages/HandCreated/ReforgedHud<Side>Powers.ini maps it.
+mirrored or flipped, the readout plate, the build card's and the pointer tooltip's frames and the card's stat
+icons), each where MappedImages/HandCreated/ReforgedHud<Side>Powers.ini maps it. The tooltips' console set,
+for the shell and any scheme without its own, is ReforgedHudHelpbox (written with the observer's sheets).
Nothing here is traced from another painting. Each side is built its own way (BUILDS): its own
silhouette, how its plates stand on each other, the profile of their edges, the corners of every
@@ -31,7 +33,7 @@ radar frame's nine, every side's and general's emblem) and the spectator's rack
python Tools/hud_command_bar.py --out DIR [--side all|Observer|Lobby|America|China|Gla|Turkiye] [--dds TEXTURES]
writes DIR/ReforgedHud<Side>CommandBar.png, ...CommandBarWide.png and ...Powers.png for each side,
- the observer's ReforgedHudObsCommandBar, ...ObsPlayerWindow, ...ObsPieces and ...ObsSpec, and the
+ the observer's ReforgedHudObsCommandBar, ...ObsPlayerWindow, ...ObsPieces, ...ObsSpec and ReforgedHudHelpbox, and the
front end's ReforgedFactionEmblems (Lobby), and with --dds the same as DXT5 .dds into TEXTURES
(Data/Art/Textures)
"""
@@ -1441,11 +1443,335 @@ def paint_powers(side_name="America", svg_path=EMBLEM_SVG, frame=None, glow="B")
pieces.update({"HudCell" + k: v for k, v in hud_cell_pieces(side_name).items()})
pieces.update({"TrayTabDown": tray_tab(side_name), "TrayTabUp": tray_tab(side_name, up=True)})
pieces.update(ready_glow_pieces(build, glow))
+ pieces.update(tip_pieces(side))
for name, img in pieces.items():
put(sheet_img, img, M.get(prefix + name, READY_GLOW_AT.get(name)))
return sheet_img
+# ---------------------------------------------------------------------------------------------- the tooltips
+
+# Approved by the owner on 2026-11-03 (round 17). Two pieces of nine each and nine icons, the code
+# looking them up by the scheme's TooltipImage prefix: <prefix>Tip<TL..BR>, <prefix>CursorTip<TL..BR> and
+# <prefix>TipIcon<Kind>. The frames are cut like the radar's and stretched by the code the same way, so
+# whatever runs along an edge is even along its length and every fitting sits in a corner, mostly top right.
+# Tip the build card (ControlBarPopupDescription.wnd), hung on the screen's left edge, its left
+# side open like the radar's. Its top row holds the name slot, the stat row's well, the low
+# rib between them and the description well's top lip, so the card grows by stretching the
+# middle row alone. TIP_TEXT is where the card's texts stand, from its top left (a right or
+# bottom edge below zero is from the card's right or bottom): the name left in the slot, the
+# price right of it (money icon and figure, clock and build time), the unit's figures as icon
+# and value cells in the second row, the description under them.
+# CursorTip the pointer's tooltip (Mouse::drawTooltip): a small framed well, closed all round, the
+# text inside it with TIP_CURSOR_PAD of glass round it.
+# TipIcon the stat icons, TIP_ICON square, one set of glyphs lit in each side's steel.
+# Each side draws all three in its own build on its Powers sheet; the observer's console build is the
+# default for the shell and any scheme without its own (prefix Helpbox, on ReforgedHudHelpbox). Where
+# each piece goes is its sheet's MappedImages INI.
+TIP_EDGE = (16, 68, 48, 14) # left, top, right, bottom: the card's corners
+TIP_REF = (192, 146) # the card drawn once, its middle 128 wide and 64 high
+TIP_TEXT = dict(name=(12, 5, -190, 27), cost=(-186, 5, -46, 27), stats=(8, 31, -18, 57), description=(8, 66, -18, -14))
+# a card with no stat row (a general's power, an upgrade) takes TipHeadTL/T/TR, TIP_HEAD high, for its top row:
+# the name slot and the description well's top lip, the description from TIP_TEXT_HEAD's top
+TIP_HEAD = 38
+TIP_TEXT_HEAD = dict(TIP_TEXT, stats=None, description=(8, 36, -18, -14))
+TIP_ICON = 16 # every stat icon, at 1080
+TIP_ICONS = ("Money", "Time", "Health", "Armor", "Damage", "Rate", "Range", "Speed", "Power")
+TIP_CURSOR_EDGE, TIP_CURSOR_REF, TIP_CURSOR_PAD = 8, (48, 32), 6
+TIP_HELPBOX_SIZE = (512, 256)
+
+
+def tip_wells(W, H, head=False):
+ """The name slot, the stat row's well and the description well, in the reference card; the short
+ head (TipHead) has no stat well, the description well right under the name slot."""
+ if head:
+ return (6, 5, W - 40, 27), None, (4, 31, W - 14, H - 8)
+ return (6, 5, W - 40, 27), (4, 31, W - 14, 57), (4, 61, W - 14, H - 8)
+
+
+def tip_soften(p, W, H, rib, head=False):
+ """The breaks inside the card made quieter (round 16, the owner's "less conspicuous"): the wells run
+ together under the name slot and between cost and description, and a low dark rib rib texels high
+ parts them where the steel bar and its two lips stood. The wells' ends keep their lips, in the corners."""
+ wells = [w for w in tip_wells(W, H, head) if w]
+ floor = p.h[(wells[-1][1] + 12) * SS, 100 * SS]
+ for a, b in zip(wells, wells[1:]):
+ x0, x1, y0, y1 = max(a[0], b[0]) + 4, min(a[2], b[2]) - 4, a[3] - 4, b[1] + 4
+ sl = (slice(int(y0 * SS), int(y1 * SS)), slice(int(x0 * SS), int(x1 * SS)))
+ p.h[sl], p.mat[sl] = floor, GLASS
+ mid = (a[3] + b[1]) / 2
+ p.bump([plate(x0, mid - 1, x1, mid + 1)], rib, 0.8, DARK)
+
+
+def tip_card(side, head=False):
+ """The reference card, TIP_REF, every build its own way; side is a SIDES entry or OBSERVER. head draws
+ the short variant for a card with no stat row (a general's power, an upgrade): the name slot, then the
+ description well straight under it, TIP_HEAD high, with only the fittings that fit beside the name;
+ TipHeadTL/T/TR are its top row and join the same middle and bottom pieces."""
+ build = side["build"]
+ W, H = (TIP_REF[0], TIP_HEAD + TIP_REF[1] - TIP_EDGE[1]) if head else TIP_REF
+ p = Painter(W + 4, H + 4) # room right and below, so only the left side is the screen's
+ name, cost, desc = tip_wells(W, H, head)
+ wells = [w for w in (name, cost, desc) if w]
+ full = not head # the stat well's rule and the fittings below the name slot
+
+ def sink(corners, depth, lip):
+ for r, c in zip((name, cost, desc), corners):
+ if r:
+ p.sink([shape(build, *r, c)], depth, lip(r) if callable(lip) else lip)
+ if build == "machined": # a dark flange, a satin frame on it, 45 degree cuts
+ p.silhouette([[(0, 0), (W - 16, 0), (W, 16), (W, H - 6), (W - 6, H), (0, H)]], 4.0, build, screen=True)
+ p.raise_plate([plate(0, 3, W - 4, H - 3, tr=("cut", 12), br=("cut", 4))], 7.0, 3.0, STEEL, screen=True)
+ sink((3, 4, 4), 6, 3)
+ tip_soften(p, W, H, 1.5, head)
+ vents(p, W - 38, W - 18, 9, 21)
+ if full:
+ p.inlay([plate(8, 58.6, W - 44, 59.4)], ACCENT, 0.2)
+ p.inlay(chevrons(W - 9, 33, 8, n=2), ACCENT2, 0.7)
+ p.stud(W - 9, 54, 3.0)
+ p.stud(W - 9, H - 9, 2.6)
+ elif build == "terraced": # cast in square terraces, a heavy rim round each well
+ outline = [(0, 0), (W - 24, 0), (W - 24, 8), (W - 12, 8), (W - 12, 16), (W, 16), (W, H), (0, H)]
+ sl, m, d = p.silhouette([outline], 11.0, build, STEEL, screen=True)
+ p.mat[sl][m & (d < 6)] = DARK
+ for r in wells:
+ p.bump([shape(build, *grow(r, 3), 4)], 2.0, 1.0)
+ for r in wells:
+ p.sink([shape(build, *grow(r, 1.2), 3)], 8, 1.2)
+ tip_soften(p, W, H, 2.0, head) # the rims' ridge there gives way to a square rib
+ if full:
+ p.inlay([plate(8, 58.2, W - 44, 59.8)], ACCENT, 0.15)
+ p.bump([plate(W - 37, 11, W - 21, 17.5)], 1.6, 0.8, ACCENT2)
+ for x in (W - 35, W - 23):
+ p.rivet(x, 23, 1.8)
+ for y in (28, 42, 56) if full else (28,):
+ p.rivet(W - 6, y, 1.9)
+ p.rivet(W - 6, H - 7, 1.9)
+ elif build == "scavenged": # a sheet laid on along the top and welded, bolts, a ragged corner
+ outline = [(0, 0), (W - 30, 0), (W - 22, 4), (W - 9, 1.5), (W, 13), (W, H - 9), (W - 4, H - 9), (W - 4, H), (0, H)]
+ p.silhouette([outline], 3.0, build, screen=True)
+ sl, m, _ = p.raise_plate([plate(0, 1.5, W - 26, 29.5)], 5.0, 1.2, STEEL, screen=True)
+ p.tint[sl][m] = 1.05
+ p.weld((W - 26, 3), (W - 26, 28), 151)
+ sink((4, 4, 4), 5, 2)
+ tip_soften(p, W, H, 1.2, head)
+ if full:
+ p.inlay([plate(4, 58.1, W - 46, 59.9), jitter(plate(W - 47, 57.6, W - 39, 60.4), 52, 1.0, 3)], ACCENT2, 0.12)
+ for x in (W - 22, W - 13):
+ p.inlay([[(x, 28), (x + 5, 19), (x + 9, 19), (x + 4, 28)]], ACCENT, 0.3)
+ for i, (x, y) in enumerate(((W - 19, 9), (W - 7, 45), (W - 10, H - 6))):
+ if full or y < 30 or y > H - 14:
+ p.bolt(x, y, 2.6, 90 + i)
+ elif build == "faceted": # composite: a 30 degree cut, one wide flat facet, tiles
+ p.silhouette([[(0, 0), (W - 34, 0), (W, 20), (W, H), (0, H)]], 4.0, "machined", screen=True)
+ p.frame([plate(0, 3, W - 5, H - 3, tr=("slant", 16), br=("cut", 4))], 9.0, build, screen=True)
+ sink((4, 5, 5), 6, lambda r: 4 if r is not name else 3)
+ tip_soften(p, W, H, 1.5, head)
+ # the tiles only on the right corners: along an edge they would smear when the code stretches it
+ h0, m0 = p.h.copy(), p.mat.copy()
+ p.facets(18, 0.06, 0.45, 23)
+ _, t, r_, b = TIP_EDGE
+ t = t if full else TIP_HEAD - 8 # the short head's tiles stop clear of its foot, so it meets TipR flat
+ flat_ = np.ones(p.h.shape, bool)
+ flat_[:t * SS, (W - r_) * SS:] = False
+ flat_[(H - b) * SS:, (W - r_) * SS:] = False
+ p.h[flat_], p.mat[flat_] = h0[flat_], m0[flat_]
+ if full:
+ p.inlay([plate(8, 58.6, W - 44, 59.4)], ACCENT, 0.2)
+ p.inlay([triangle(W - 28, 15, 9, 10, "left")], ACCENT, 0.6)
+ for x, y in ((W - 10, 42), (W - 10, H - 8)) if full else ((W - 10, H - 8),):
+ p.bump([regular(x, y, 3.0, 6, np.pi / 6)], 0.8, 1.2, BRIGHT)
+ else: # the console: radii, a bullnose, a grille, screws, the tally
+ p.silhouette([plate(0, 0, W, H, tr=("round", 10), br=("round", 6))], 6.0, build, STEEL, screen=True)
+ sink((4, 4, 4), 5, 2)
+ tip_soften(p, W, H, 1.5, head)
+ if full:
+ p.inlay([plate(8, 58.6, W - 44, 59.4)], ACCENT, 0.2)
+ screw(p, W - 8, 44, 2.4)
+ grille(p, W - 37, 7, W - 17, 23)
+ tally(p, W - 9, 15, 2.4)
+ screw(p, W - 9, H - 7, 2.2)
+ return shade(p, side, shadow=False, falloff=False).crop((0, 0, W, H))
+
+
+def tip_cursor(side):
+ """The pointer's tooltip, TIP_CURSOR_REF: a framed well closed all round, the build's corners."""
+ build = side["build"]
+ W, H = TIP_CURSOR_REF
+ p = Painter(W + 4, H + 4)
+ o = 2 # off the canvas's border, so no side reads as the screen's
+ if build == "machined":
+ p.silhouette([octagon(o, o, o + W, o + H, 3.5)], 3.0, build)
+ p.raise_plate([octagon(o + 1, o + 1, o + W - 1, o + H - 1, 3)], 5.0, 1.6, STEEL)
+ p.sink([shape(build, o + 3, o + 3, o + W - 3, o + H - 3, 2)], 2.6, 1.8)
+ p.inlay([plate(o + 5, o + 1.6, o + W - 5, o + 2.1)], ACCENT, 0.15)
+ elif build == "terraced":
+ sl, m, d = p.raise_plate([shape(build, o, o, o + W, o + H, 3)], 6.0, 1.0, STEEL, "chessboard", terraces((0, 0.5), (2, 0.5)))
+ p.limit[sl] |= m
+ p.mat[sl][m & (d < 2)] = DARK
+ p.sink([shape(build, o + 4, o + 4, o + W - 4, o + H - 4, 2)], 2.6, 1.2)
+ p.inlay([plate(o + 5, o + H - 2.4, o + W - 5, o + H - 1.6)], ACCENT, 0.15)
+ elif build == "scavenged":
+ p.silhouette([shape(build, o, o, o + W, o + H, 4)], 3.0, build)
+ p.sink([shape(build, o + 3, o + 3, o + W - 3, o + H - 3, 2.5)], 2.3, 1.4)
+ p.inlay([jitter(plate(o + 1, o + H - 7, o + 6, o + H - 1), 61, 1.0, 2)], ACCENT2, 0.25)
+ p.bolt(o + W - 3.6, o + 3.6, 1.8, 3)
+ elif build == "faceted":
+ p.silhouette([shape(build, o, o, o + W, o + H, 4)], 3.0, "machined")
+ p.frame([shape(build, o + 0.5, o + 0.5, o + W - 0.5, o + H - 0.5, 4)], 5.0, build, scale=0.4)
+ p.sink([shape(build, o + 3.5, o + 3.5, o + W - 3.5, o + H - 3.5, 2.5)], 2.6, 1.8)
+ p.inlay([triangle(o + 4.6, o + H - 4.6, 3.2, 3.6, "right")], ACCENT, 0.4)
+ else:
+ p.silhouette([shape(build, o, o, o + W, o + H, 5)], 5.0, build, STEEL)
+ p.sink([shape(build, o + 3, o + 3, o + W - 3, o + H - 3, 3)], 2.6, 1.8)
+ return shade(p, side, shadow=False, falloff=False).crop((o, o, o + W, o + H))
+
+
+def tip_icon(side, kind):
+ """A stat icon, TIP_ICON square: the glyph raised in bright steel on a dark rim a texel and a half wide,
+ so it reads on the card's glass and on bright ground alike. The same glyphs on every side, lit in the
+ side's own steel with an even grain. No cross, no flag, nothing a nation or the Red Cross owns."""
+ n, o = TIP_ICON, 2
+ p = Painter(n + 2 * o, n + 2 * o)
+ im = Image.new("L", (p.h.shape[1], p.h.shape[0]), 0)
+ d = ImageDraw.Draw(im)
+
+ def P(x, y):
+ return ((x + o) * SS, (y + o) * SS)
+
+ def poly(pts):
+ d.polygon([P(x, y) for x, y in pts], fill=255)
+
+ def line(pts, w):
+ d.line([P(x, y) for x, y in pts], fill=255, width=int(w * SS), joint="curve")
+
+ def ring(x0, y0, x1, y1, w):
+ d.ellipse([P(x0, y0), P(x1, y1)], outline=255, width=int(w * SS))
+
+ if kind == "Money": # the money window's own sign
+ from PIL import ImageFont
+ f = ImageFont.truetype(os.path.join(os.environ.get("WINDIR", "C:/Windows"), "Fonts", "arialbd.ttf"), 17 * SS)
+ d.text(P(8, 8.4), "$", font=f, fill=255, anchor="mm")
+ elif kind == "Time": # a clock face, two hands
+ ring(1, 1, 15, 15, 2.2)
+ line([(8, 3.8), (8, 8), (11.6, 8)], 2.0)
+ elif kind == "Health": # a plus in steel, never red
+ poly(plate(5.8, 1.5, 10.2, 14.5))
+ poly(plate(1.5, 5.8, 14.5, 10.2))
+ elif kind == "Armor": # a plain plate shield
+ poly([(2, 1.5), (14, 1.5), (14, 8), (8, 15), (2, 8)])
+ elif kind == "Damage": # a crosshair
+ ring(2.2, 2.2, 13.8, 13.8, 1.9)
+ for a, b in (((8, 0), (8, 5)), ((8, 11), (8, 16)), ((0, 8), (5, 8)), ((11, 8), (16, 8))):
+ line([a, b], 1.9)
+ d.ellipse([P(6.8, 6.8), P(9.2, 9.2)], fill=255)
+ elif kind == "Rate": # three rounds side by side, damage a second
+ for x in (1.5, 6.5, 11.5):
+ poly([(x, 6), (x + 1.5, 2), (x + 3, 6), (x + 3, 14.5), (x, 14.5)])
+ elif kind == "Range": # a span with two heads
+ line([(3, 8), (13, 8)], 2.0)
+ poly([(0.5, 8), (5, 3.5), (5, 12.5)])
+ poly([(15.5, 8), (11, 3.5), (11, 12.5)])
+ elif kind == "Speed": # two chevrons going right
+ line([(2, 2.5), (7.5, 8), (2, 13.5)], 2.6)
+ line([(8, 2.5), (13.5, 8), (8, 13.5)], 2.6)
+ elif kind == "Power": # a bolt
+ poly([(9.5, 0.5), (3, 9), (7.5, 9), (5.5, 15.5), (13, 6.5), (8.5, 6.5), (11, 0.5)])
+ glyph = np.asarray(im) > 127
+ rim = ndimage.binary_dilation(glyph, iterations=int(1.5 * SS))
+ p.alpha |= rim
+ p.limit |= rim
+ p.mat[rim] = DARK
+ p.h += rim * 0.6
+ p.h += np.clip(Painter.inside(glyph) / 0.9, 0, 1) * glyph * 2.2
+ p.mat[glyph] = BRIGHT
+ return shade(p, dict(side, build="console"), shadow=False, falloff=False).crop((o, o, o + n, o + n))
+
+
+def nine(img, edge, middle=None):
+ """img cut into TL, T, TR, L, C, R, BL, B, BR at edge (left, top, right, bottom); C resized to middle."""
+ l, t, r, b = edge
+ W, H = img.size
+ xs, ys = (0, l, W - r, W), (0, t, H - b, H)
+ out = {}
+ for i, name in enumerate(("TL", "T", "TR", "L", "C", "R", "BL", "B", "BR")):
+ col, row = i % 3, i // 3
+ out[name] = img.crop((xs[col], ys[row], xs[col + 1], ys[row + 1]))
+ if middle:
+ out["C"] = out["C"].resize(middle, Image.BOX)
+ return out
+
+
+def tip_pieces(side):
+ """Both tooltips' pieces by their name without the side's prefix (TipTL, ..., CursorTipBR)."""
+ e = TIP_CURSOR_EDGE
+ l, _, r, b = TIP_EDGE
+ out = {"Tip" + k: v for k, v in nine(tip_card(side), TIP_EDGE, (64, 64)).items()}
+ out.update({"TipHead" + k: v for k, v in nine(tip_card(side, head=True), (l, TIP_HEAD, r, b)).items()
+ if k in ("TL", "T", "TR")})
+ out.update({"CursorTip" + k: v for k, v in nine(tip_cursor(side), (e, e, e, e), (16, 16)).items()})
+ out.update({"TipIcon" + k: tip_icon(side, k) for k in TIP_ICONS})
+ return out
+
+
+def tip_sizes():
+ """Each tooltip piece's size, by its name without the prefix, as the code assumes it."""
+ l, t, r, b = TIP_EDGE
+ e, n = TIP_CURSOR_EDGE, TIP_ICON
+ cw, ch = TIP_CURSOR_REF[0] - 2 * e, TIP_CURSOR_REF[1] - 2 * e
+ mw, mh = TIP_REF[0] - l - r, TIP_REF[1] - t - b
+ out = {"TipTL": (l, t), "TipT": (mw, t), "TipTR": (r, t), "TipL": (l, mh), "TipC": (64, 64), "TipR": (r, mh),
+ "TipBL": (l, b), "TipB": (mw, b), "TipBR": (r, b),
+ "TipHeadTL": (l, TIP_HEAD), "TipHeadT": (mw, TIP_HEAD), "TipHeadTR": (r, TIP_HEAD),
+ "CursorTipTL": (e, e), "CursorTipT": (cw, e), "CursorTipTR": (e, e), "CursorTipL": (e, ch),
+ "CursorTipC": (16, 16), "CursorTipR": (e, ch), "CursorTipBL": (e, e), "CursorTipB": (cw, e), "CursorTipBR": (e, e)}
+ out.update({"TipIcon" + k: (n, n) for k in TIP_ICONS})
+ return out
+
+
+def paint_helpbox():
+ """ReforgedHudHelpbox in the console build: the tooltips for the shell and any scheme without its own,
+ laid out by ReforgedHudHelpbox.ini (prefix Helpbox)."""
+ M = read_mapped(None, name="ReforgedHudHelpbox")
+ sheet_img = Image.new("RGBA", TIP_HELPBOX_SIZE, (0, 0, 0, 0))
+ for name, img in tip_pieces(OBSERVER).items():
+ put(sheet_img, img, M["Helpbox" + name])
+ return sheet_img
+
+
+def check_tip_head(sheet_img, M, pre):
+ """TipHead's bottom row is the description well's top, as TipTL/T/TR's is, so either top row meets the
+ same middle row (TipL, TipC, TipR): the head's foot no further off the middle's top than the tall top
+ row's own foot is, give or take a few levels (the middle glass is shrunk, so T is held to C by mean)."""
+ lum = np.asarray(sheet_img.convert("L"), np.float32)
+
+ def row(n, last):
+ x0, y0, x1, y1 = M[pre + n]
+ return lum[y1 - 1 if last else y0, x0:x1]
+ for k, mid in (("TL", "L"), ("T", "C"), ("TR", "R")):
+ top = row("Tip" + mid, False)
+ if k == "T":
+ off = [abs(row(n, True).mean() - top.mean()) for n in ("Tip" + k, "TipHead" + k)]
+ else:
+ off = [np.abs(row(n, True) - top).mean() for n in ("Tip" + k, "TipHead" + k)]
+ assert off[1] <= off[0] + 4, "%sTipHead%s meets %sTip%s %.1f levels off, %sTip%s %.1f" % (
+ pre, k, pre, mid, off[1], pre, k, off[0])
+
+
+def check_helpbox(sheet_img):
+ """Every tooltip piece on ReforgedHudHelpbox at its size, none overlapping another (gutter included)."""
+ M = read_mapped(None, name="ReforgedHudHelpbox")
+ assert sheet_img.size == TIP_HELPBOX_SIZE
+ for n, wh in tip_sizes().items():
+ x0, y0, x1, y1 = M["Helpbox" + n]
+ assert (x1 - x0, y1 - y0) == wh, "Helpbox%s is %s, the code wants %s" % (n, (x1 - x0, y1 - y0), wh)
+ boxes = [(n, grow(M[n], 1)) for n in ("Helpbox" + k for k in tip_sizes())]
+ for i, (n, p) in enumerate(boxes):
+ for m, q in boxes[i + 1:]:
+ assert p[2] <= q[0] or q[2] <= p[0] or p[3] <= q[1] or q[3] <= p[1], "%s and %s overlap" % (n, m)
+ check_tip_head(sheet_img, M, "Helpbox")
+
+
# ---------------------------------------------------------------------------------------------- the observer
# The watcher's bar in the console build (OBSERVER), approved by the owner on 2026-11-03 with the rows'
@@ -2409,9 +2735,11 @@ def check_sheet(sheet_img, side_name, glow="B"):
want["Idle" + k + st] = (54, 35)
for st in ("", "H", "I"):
want["GenPowerClose" + st] = (60, 50)
+ want.update(tip_sizes())
for n, wh in want.items():
assert pre + n in M, "%s%s is not on the sheet" % (pre, n)
assert size(n) == wh, "%s%s is %s, the code wants %s" % (pre, n, size(n), wh)
+ check_tip_head(sheet_img, M, pre)
boxes = [(n, grow(v, 1)) for n, v in M.items() if not n.endswith("TraySmallTop")]
for i, (n, p) in enumerate(boxes):
for m, q in boxes[i + 1:]:
@@ -2468,6 +2796,8 @@ def main():
check_observer(bar, panel)
made = {"ReforgedHudObsCommandBar": bar, "ReforgedHudObsPlayerWindow": panel,
"ReforgedHudObsPieces": paint_observer_pieces(), "ReforgedHudObsSpec": paint_rack()}
+ made["ReforgedHudHelpbox"] = helpbox = paint_helpbox()
+ check_helpbox(helpbox)
else:
frame = radar_frame(side)
for wide in (False, True):