unify(controlbar): Merge and move ControlBar and related code to core#2849
unify(controlbar): Merge and move ControlBar and related code to core#2849stephanmeesters wants to merge 2 commits into
Conversation
95571e0 to
da28ca7
Compare
|
| Filename | Overview |
|---|---|
| Core/GameEngine/CMakeLists.txt | Uncomments all ControlBar source and header entries, enabling them in the Core build. Changes mirror what was removed from Generals/GeneralsMD CMakeLists.txt — looks correct. |
| Core/GameEngineDevice/CMakeLists.txt | Uncomments W3DControlBar.cpp for the Core device build, consistent with the engine CMake changes. |
| Generals/Code/GameEngine/CMakeLists.txt | Comments out all ControlBar entries (headers and sources) now served from Core. Change is symmetric with Core/CMakeLists.txt additions. |
| GeneralsMD/Code/GameEngine/CMakeLists.txt | Comments out all ControlBar entries for ZH, consistent with the files having been renamed to Core/. |
| GeneralsMD/Code/GameEngineDevice/CMakeLists.txt | Comments out W3DControlBar.cpp for ZH device build; now served from Core/GameEngineDevice. |
| Generals/Code/GameEngineDevice/CMakeLists.txt | Comments out W3DControlBar.cpp for Generals device build; now served from Core/GameEngineDevice. |
| Core/GameEngine/Source/GameClient/GUI/GUICallbacks/ControlBarPopupDescription.cpp | New Core file (moved from GeneralsMD, 100% similarity except for 23 changed lines). Adds cost-field hiding for zero-cost items, prerequisite-science messaging for upgrades (MOAB), and a building-specific max-count tooltip with a Generals fallback. Logic is clean and consistent with existing patterns. |
| scripts/cpp/unify_move_files.py | Marks all previously-active unify steps (CommandXlat and related, plus new ControlBar entries) as completed by commenting them out. All referenced files already exist in Core/, so the comments are correct. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
subgraph Before["Before this PR"]
GEN["Generals/Code/GameEngine/\nControlBar headers + sources"]
ZH["GeneralsMD/Code/GameEngine/\nControlBar headers + sources"]
CORE_EMPTY["Core/GameEngine/\nControlBar (commented out in CMake)"]
end
subgraph After["After this PR"]
CORE["Core/GameEngine/\nControlBar headers + sources\n(active in CMake)"]
GEN_DEL["Generals/ ControlBar files\nDELETED"]
end
subgraph CMake["CMakeLists.txt changes"]
CORE_CMAKE["Core CMakeLists:\nUncommented ControlBar entries"]
GEN_CMAKE["Generals CMakeLists:\nCommented out ControlBar entries"]
ZH_CMAKE["GeneralsMD CMakeLists:\nCommented out ControlBar entries"]
end
ZH -->|"git rename R100"| CORE
GEN -->|"deleted"| GEN_DEL
CORE_EMPTY -->|"replaced"| CORE
CORE --> CORE_CMAKE
GEN_DEL --> GEN_CMAKE
CORE --> ZH_CMAKE
subgraph PopupDiff["ControlBarPopupDescription.cpp additions"]
P1["+ Hide cost widget when costToBuild == 0"]
P2["+ missingScience check for upgrade prerequisites"]
P3["+ Building-specific max-count tooltip with fallback"]
end
CORE --> PopupDiff
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
subgraph Before["Before this PR"]
GEN["Generals/Code/GameEngine/\nControlBar headers + sources"]
ZH["GeneralsMD/Code/GameEngine/\nControlBar headers + sources"]
CORE_EMPTY["Core/GameEngine/\nControlBar (commented out in CMake)"]
end
subgraph After["After this PR"]
CORE["Core/GameEngine/\nControlBar headers + sources\n(active in CMake)"]
GEN_DEL["Generals/ ControlBar files\nDELETED"]
end
subgraph CMake["CMakeLists.txt changes"]
CORE_CMAKE["Core CMakeLists:\nUncommented ControlBar entries"]
GEN_CMAKE["Generals CMakeLists:\nCommented out ControlBar entries"]
ZH_CMAKE["GeneralsMD CMakeLists:\nCommented out ControlBar entries"]
end
ZH -->|"git rename R100"| CORE
GEN -->|"deleted"| GEN_DEL
CORE_EMPTY -->|"replaced"| CORE
CORE --> CORE_CMAKE
GEN_DEL --> GEN_CMAKE
CORE --> ZH_CMAKE
subgraph PopupDiff["ControlBarPopupDescription.cpp additions"]
P1["+ Hide cost widget when costToBuild == 0"]
P2["+ missingScience check for upgrade prerequisites"]
P3["+ Building-specific max-count tooltip with fallback"]
end
CORE --> PopupDiff
Reviews (4): Last reviewed commit: "unify(controlbar): Move ControlBar files..." | Re-trigger Greptile
xezon
left a comment
There was a problem hiding this comment.
Fixed a Base Generals HUD regression where the Generals Powers shortcut bar could disappear
How did Generals regress?
This was already fixed in #2680, removed from description |
da28ca7 to
acdcd4d
Compare
acdcd4d to
e5c1950
Compare
e5c1950 to
4c1c2fb
Compare
Merge by rebase
Rebased and diffs checked in WinMerge. Re-applied the move with the script.
Changes to Generals
FROM_COMMAND_CENTERtoFROM_SHORTCUT)Showed building-specific max-count tooltip text.Todo