(svn r24131) -Add [FS#1952]: Ctrl-Clicking to change colour of all colour schemes at once. (Roest)

This commit is contained in:
michi_cc
2012-04-17 19:43:38 +00:00
parent e3588ac916
commit d78c4d9ee3
2 changed files with 4 additions and 3 deletions

View File

@@ -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);
}
}