mirror of https://github.com/OpenTTD/OpenTTD
(svn r21570) -Add: Allow to select a vehicle and the following chain with a keyboard shortcut.
parent
ea7c33ca6d
commit
884b44990a
|
@ -3131,7 +3131,7 @@ STR_REFIT_CAPTION :{WHITE}{VEHICLE
|
||||||
STR_REFIT_TITLE :{GOLD}Select cargo type to carry:
|
STR_REFIT_TITLE :{GOLD}Select cargo type to carry:
|
||||||
STR_REFIT_NEW_CAPACITY_COST_OF_REFIT :{BLACK}New capacity: {GOLD}{CARGO}{}{BLACK}Cost of refit: {GOLD}{CURRENCY}
|
STR_REFIT_NEW_CAPACITY_COST_OF_REFIT :{BLACK}New capacity: {GOLD}{CARGO}{}{BLACK}Cost of refit: {GOLD}{CURRENCY}
|
||||||
STR_REFIT_NEW_CAPACITY_COST_OF_AIRCRAFT_REFIT :{BLACK}New capacity: {GOLD}{CARGO}, {GOLD}{CARGO}{}{BLACK}Cost of refit: {GOLD}{CURRENCY}
|
STR_REFIT_NEW_CAPACITY_COST_OF_AIRCRAFT_REFIT :{BLACK}New capacity: {GOLD}{CARGO}, {GOLD}{CARGO}{}{BLACK}Cost of refit: {GOLD}{CURRENCY}
|
||||||
STR_REFIT_SELECT_VEHICLES_TOOLTIP :{BLACK}Select the vehicles to refit. Dragging with the mouse allows to select multiple vehicles. Clicking on an empty space will select the whole vehicle
|
STR_REFIT_SELECT_VEHICLES_TOOLTIP :{BLACK}Select the vehicles to refit. Dragging with the mouse allows to select multiple vehicles. Clicking on an empty space will select the whole vehicle. Ctrl+Click will select a vehicle and the following chain
|
||||||
|
|
||||||
STR_REFIT_TRAIN_LIST_TOOLTIP :{BLACK}Select type of cargo for train to carry
|
STR_REFIT_TRAIN_LIST_TOOLTIP :{BLACK}Select type of cargo for train to carry
|
||||||
STR_REFIT_ROAD_VEHICLE_LIST_TOOLTIP :{BLACK}Select type of cargo for road vehicle to carry
|
STR_REFIT_ROAD_VEHICLE_LIST_TOOLTIP :{BLACK}Select type of cargo for road vehicle to carry
|
||||||
|
|
|
@ -766,7 +766,10 @@ struct RefitWindow : public Window {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If the selection is not correct, clear it. */
|
/* 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 */
|
/* FALL THROUGH */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -787,7 +790,7 @@ struct RefitWindow : public Window {
|
||||||
this->click_x = GetClickPosition(pt.x - nwi->pos_x);
|
this->click_x = GetClickPosition(pt.x - nwi->pos_x);
|
||||||
this->SetSelectedVehicles(pt.x - nwi->pos_x);
|
this->SetSelectedVehicles(pt.x - nwi->pos_x);
|
||||||
this->SetWidgetDirty(VRW_VEHICLE_PANEL_DISPLAY);
|
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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue