From 3436b5f0903b7fb07f9a9074144fbec22d54de5f Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Fri, 22 Dec 2023 23:58:25 +0000 Subject: [PATCH] Change: Show a message in livery window if vehicle type has no groups. --- src/company_gui.cpp | 6 ++++++ src/lang/english.txt | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/src/company_gui.cpp b/src/company_gui.cpp index 5ab64659e5..0b55641d17 100644 --- a/src/company_gui.cpp +++ b/src/company_gui.cpp @@ -942,6 +942,12 @@ public: SetDParam(0, g->index); draw_livery(STR_GROUP_NAME, livery_set ? g->livery : c->livery[LS_DEFAULT], this->sel == g->index, livery_set, this->indents[i] * WidgetDimensions::scaled.hsep_indent); } + + if (this->vscroll->GetCount() == 0) { + const StringID empty_labels[] = { STR_LIVERY_TRAIN_GROUP_EMPTY, STR_LIVERY_ROAD_VEHICLE_GROUP_EMPTY, STR_LIVERY_SHIP_GROUP_EMPTY, STR_LIVERY_AIRCRAFT_GROUP_EMPTY }; + VehicleType vtype = (VehicleType)(this->livery_class - LC_GROUP_RAIL); + DrawString(ir.left, ir.right, y + text_offs, empty_labels[vtype], TC_BLACK); + } } } diff --git a/src/lang/english.txt b/src/lang/english.txt index 6904e795ac..95143d81bc 100644 --- a/src/lang/english.txt +++ b/src/lang/english.txt @@ -2203,6 +2203,10 @@ STR_LIVERY_AIRCRAFT_GROUP_TOOLTIP :{BLACK}Show col STR_LIVERY_PRIMARY_TOOLTIP :{BLACK}Choose the primary colour for the selected scheme. Ctrl+Click will set this colour for every scheme STR_LIVERY_SECONDARY_TOOLTIP :{BLACK}Choose the secondary colour for the selected scheme. Ctrl+Click will set this colour for every scheme STR_LIVERY_PANEL_TOOLTIP :{BLACK}Select a colour scheme to change, or multiple schemes with Ctrl+Click. Click on the box to toggle use of the scheme +STR_LIVERY_TRAIN_GROUP_EMPTY :No train groups are set up +STR_LIVERY_ROAD_VEHICLE_GROUP_EMPTY :No road vehicle groups are set up +STR_LIVERY_SHIP_GROUP_EMPTY :No ship groups are set up +STR_LIVERY_AIRCRAFT_GROUP_EMPTY :No aircraft groups are set up ###length 23 STR_LIVERY_DEFAULT :Standard Livery