mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-10-31 15:20:10 +00:00
parent
9c49a61249
commit
71c2878799
@ -1026,7 +1026,15 @@ void DrawEngineList(VehicleType type, const Rect &r, const GUIEngineList &eng_li
|
||||
int count_width = 0;
|
||||
if (show_count) {
|
||||
replace_icon = GetSpriteSize(SPR_GROUP_REPLACE_ACTIVE);
|
||||
SetDParamMaxDigits(0, 3, FS_SMALL);
|
||||
|
||||
uint biggest_num_engines = 0;
|
||||
for (auto i = min; i < max; i++) {
|
||||
const auto &item = eng_list[i];
|
||||
const uint num_engines = GetGroupNumEngines(_local_company, selected_group, item.engine_id);
|
||||
biggest_num_engines = std::max(biggest_num_engines, num_engines);
|
||||
}
|
||||
|
||||
SetDParam(0, biggest_num_engines);
|
||||
count_width = GetStringBoundingBox(STR_JUST_COMMA, FS_SMALL).width;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user