From 32ab630bda765ba6eb7283d06df88d783ce17865 Mon Sep 17 00:00:00 2001 From: michi_cc Date: Tue, 17 Apr 2012 19:43:38 +0000 Subject: (svn r24131) -Add [FS#1952]: Ctrl-Clicking to change colour of all colour schemes at once. (Roest) --- src/company_gui.cpp | 3 ++- src/lang/english.txt | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/company_gui.cpp b/src/company_gui.cpp index 6804e98d1..654eb94e6 100644 --- a/src/company_gui.cpp +++ b/src/company_gui.cpp @@ -781,7 +781,8 @@ public: virtual void OnDropdownSelect(int widget, int index) { for (LiveryScheme scheme = LS_DEFAULT; scheme < LS_END; scheme++) { - if (HasBit(this->sel, scheme)) { + /* Changed colour for the selected scheme, or all visible schemes if CTRL is pressed. */ + if (HasBit(this->sel, scheme) || (_ctrl_pressed && _livery_class[scheme] == this->livery_class && HasBit(_loaded_newgrf_features.used_liveries, scheme))) { DoCommandP(0, scheme | (widget == WID_SCL_PRI_COL_DROPDOWN ? 0 : 256), index, CMD_SET_COMPANY_COLOUR); } } diff --git a/src/lang/english.txt b/src/lang/english.txt index fba9c9790..4575df7c9 100644 --- a/src/lang/english.txt +++ b/src/lang/english.txt @@ -1484,8 +1484,8 @@ STR_LIVERY_TRAIN_TOOLTIP :{BLACK}Show tra STR_LIVERY_ROAD_VEHICLE_TOOLTIP :{BLACK}Show road vehicle colour schemes STR_LIVERY_SHIP_TOOLTIP :{BLACK}Show ship colour schemes STR_LIVERY_AIRCRAFT_TOOLTIP :{BLACK}Show aircraft colour schemes -STR_LIVERY_PRIMARY_TOOLTIP :{BLACK}Choose the primary colour for the selected scheme -STR_LIVERY_SECONDARY_TOOLTIP :{BLACK}Choose the secondary colour for the selected scheme +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_DEFAULT :Standard Livery -- cgit v1.2.3-70-g09d2