Changeset - r28324:c59891bdc82f
[Not reviewed]
master
0 2 0
Peter Nelson - 11 months ago 2023-12-22 23:58:25
peter1138@openttd.org
Change: Show a message in livery window if vehicle type has no groups.
2 files changed with 10 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/company_gui.cpp
Show inline comments
 
@@ -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);
 
			}
 
		}
 
	}
 

	
src/lang/english.txt
Show inline comments
 
@@ -2203,6 +2203,10 @@ STR_LIVERY_AIRCRAFT_GROUP_TOOLTIP       
 
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
0 comments (0 inline, 0 general)