tweak(gui): Show Money Per Minute in Player Info List#2738
Conversation
|
| Filename | Overview |
|---|---|
| Generals/Code/GameEngine/Include/GameClient/InGameUI.h | Adds LabelType_MoneyPerMinute and ValueType_MoneyPerMinute enum entries in the correct position between Money and Rank; LastValues array size updates automatically via LabelType_Count. |
| Generals/Code/GameEngine/Source/GameClient/InGameUI.cpp | Adds moneyPerMinuteValue computation and wires it into currentValues[], label init, and conditional column skip during layout and draw; logic is correct and lastValues tracking covers all columns regardless of visibility. |
| GeneralsMD/Code/GameEngine/Include/GameClient/InGameUI.h | Mirror of Generals header change — adds LabelType_MoneyPerMinute and ValueType_MoneyPerMinute with identical placement and correct enum ordering for Zero Hour. |
| GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp | Mirror of Generals .cpp change — identical logic applied to Zero Hour codebase, no discrepancies with the Generals counterpart. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[drawPlayerInfoList] --> B[Read showMoneyPerMinute flag]
B --> C[For each active player slot]
C --> D[Get money pointer]
D --> E[Compute teamValue, moneyValue, moneyPerMinuteValue, rankValue, xpValue]
E --> F[Update lastValues and display strings for all 5 columns]
F --> G[Compute maxValueWidths for all columns]
G --> H{More slots?}
H -- yes --> C
H -- no --> I[Layout label columns]
I --> J{column == MoneyPerMinute?}
J -- yes, showMoneyPerMinute=false --> K[skip column]
J -- no or showMoneyPerMinute=true --> L[Set columnLabelX and advance labelX]
K --> M{More columns?}
L --> M
M -- yes --> J
M -- no --> N[For each row: draw labels and values]
N --> O{column == MoneyPerMinute?}
O -- yes, showMoneyPerMinute=false --> P[skip drawing]
O -- no or showMoneyPerMinute=true --> Q[Draw label and value]
P --> R{More columns?}
Q --> R
R -- yes --> O
R -- no --> S[Draw player name]
Reviews (1): Last reviewed commit: "tweak(gui): Show Money Per Minute in Pla..." | Re-trigger Greptile
|
It would be nice if the $/min was more concise, but it is tricky. Chat Gippy brainstorms: Some compact alternatives to
If this is for a game UI, these are common readable patterns:
You could also abbreviate the unit:
For very compact HUDs:
If you want, I can also suggest:
|
|
Yeah. I think +5500 is good. |
This change show Money Per Minute in Player Info List for match Observers in Generals and Zero Hour.
It is only shown when
ShowMoneyPerMinute = yesbecause some players may prefer the original Gentool replication or because the extra column takes additional space now.