Fix: Set TC_NO_SHADE only for shaded engine in purchase list.

Additionally use TC_FORCE to prevent additional colours in the shaded text.
This commit is contained in:
Peter Nelson 2023-04-28 21:16:13 +01:00 committed by PeterN
parent 23c46e1abf
commit 1a24016964
1 changed files with 1 additions and 1 deletions

View File

@ -1036,7 +1036,7 @@ void DrawEngineList(VehicleType type, const Rect &r, const GUIEngineList &eng_li
const Engine *e = Engine::Get(item.engine_id);
bool hidden = HasBit(e->company_hidden, _local_company);
StringID str = hidden ? STR_HIDDEN_ENGINE_NAME : STR_ENGINE_NAME;
TextColour tc = (item.engine_id == selected_id) ? TC_WHITE : (TC_NO_SHADE | ((hidden | shaded) ? TC_GREY : TC_BLACK));
TextColour tc = (item.engine_id == selected_id) ? TC_WHITE : ((hidden | shaded) ? (TC_GREY | TC_FORCED | TC_NO_SHADE) : TC_BLACK);
if (show_count) {
/* relies on show_count to find 'Vehicle in use' panel of autoreplace window */