(svn r21570) -Add: Allow to select a vehicle and the following chain with a keyboard shortcut.

This commit is contained in:
terkhen
2010-12-21 14:01:44 +00:00
parent ea7c33ca6d
commit 884b44990a
2 changed files with 6 additions and 3 deletions

View File

@@ -766,7 +766,10 @@ struct RefitWindow : public Window {
}
/* If the selection is not correct, clear it. */
if (this->num_vehicles != 0) break;
if (this->num_vehicles != 0) {
if (_ctrl_pressed) this->num_vehicles = UINT8_MAX;
break;
}
/* FALL THROUGH */
}
@@ -787,7 +790,7 @@ struct RefitWindow : public Window {
this->click_x = GetClickPosition(pt.x - nwi->pos_x);
this->SetSelectedVehicles(pt.x - nwi->pos_x);
this->SetWidgetDirty(VRW_VEHICLE_PANEL_DISPLAY);
SetObjectToPlaceWnd(SPR_CURSOR_MOUSE, PAL_NONE, HT_DRAG, this);
if (!_ctrl_pressed) SetObjectToPlaceWnd(SPR_CURSOR_MOUSE, PAL_NONE, HT_DRAG, this);
break;
}