mirror of https://github.com/OpenTTD/OpenTTD
(svn r19216) -Feature: Scroll to current order destination when ctrl+clicking the start/stop bar.
parent
3222ace3e1
commit
e0171330c1
|
@ -2904,10 +2904,10 @@ STR_VEHICLE_VIEW_ROAD_VEHICLE_SHOW_DETAILS_TOOLTIP :{BLACK}Show roa
|
||||||
STR_VEHICLE_VIEW_SHIP_SHOW_DETAILS_TOOLTIP :{BLACK}Show ship details
|
STR_VEHICLE_VIEW_SHIP_SHOW_DETAILS_TOOLTIP :{BLACK}Show ship details
|
||||||
STR_VEHICLE_VIEW_AIRCRAFT_SHOW_DETAILS_TOOLTIP :{BLACK}Show aircraft details
|
STR_VEHICLE_VIEW_AIRCRAFT_SHOW_DETAILS_TOOLTIP :{BLACK}Show aircraft details
|
||||||
|
|
||||||
STR_VEHICLE_VIEW_TRAIN_STATE_START_STOP_TOOLTIP :{BLACK}Current train action - click here to stop/start train
|
STR_VEHICLE_VIEW_TRAIN_STATE_START_STOP_TOOLTIP :{BLACK}Current train action - click to stop/start train. Ctrl+Click to scroll to destination
|
||||||
STR_VEHICLE_VIEW_ROAD_VEHICLE_STATE_START_STOP_TOOLTIP :{BLACK}Current vehicle action - click here to stop/start vehicle
|
STR_VEHICLE_VIEW_ROAD_VEHICLE_STATE_START_STOP_TOOLTIP :{BLACK}Current vehicle action - click to stop/start vehicle. Ctrl+Click to scroll to destination
|
||||||
STR_VEHICLE_VIEW_SHIP_STATE_START_STOP_TOOLTIP :{BLACK}Current ship action - click here to stop/start ship
|
STR_VEHICLE_VIEW_SHIP_STATE_START_STOP_TOOLTIP :{BLACK}Current ship action - click to stop/start ship. Ctrl+Click to scroll to destination
|
||||||
STR_VEHICLE_VIEW_AIRCRAFT_STATE_START_STOP_TOOLTIP :{BLACK}Current aircraft action - click here to stop/start aircraft
|
STR_VEHICLE_VIEW_AIRCRAFT_STATE_START_STOP_TOOLTIP :{BLACK}Current aircraft action - click to stop/start aircraft. Ctrl+Click to scroll to destination
|
||||||
|
|
||||||
# Messages in the start stop button in the vehicle view
|
# Messages in the start stop button in the vehicle view
|
||||||
STR_VEHICLE_STATUS_LOADING_UNLOADING :{LTBLUE}Loading / Unloading
|
STR_VEHICLE_STATUS_LOADING_UNLOADING :{LTBLUE}Loading / Unloading
|
||||||
|
|
|
@ -2043,8 +2043,15 @@ public:
|
||||||
|
|
||||||
switch (widget) {
|
switch (widget) {
|
||||||
case VVW_WIDGET_START_STOP_VEH: // start stop
|
case VVW_WIDGET_START_STOP_VEH: // start stop
|
||||||
DoCommandP(v->tile, v->index, 0,
|
if (_ctrl_pressed) {
|
||||||
_vehicle_command_translation_table[VCT_CMD_START_STOP][v->type]);
|
/* Scroll to current order destination */
|
||||||
|
TileIndex tile = v->current_order.GetLocation(v);
|
||||||
|
if (tile != INVALID_TILE) ScrollMainWindowToTile(tile);
|
||||||
|
} else {
|
||||||
|
/* Start/Stop */
|
||||||
|
DoCommandP(v->tile, v->index, 0,
|
||||||
|
_vehicle_command_translation_table[VCT_CMD_START_STOP][v->type]);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case VVW_WIDGET_CENTER_MAIN_VIEH: {// center main view
|
case VVW_WIDGET_CENTER_MAIN_VIEH: {// center main view
|
||||||
const Window *mainwindow = FindWindowById(WC_MAIN_WINDOW, 0);
|
const Window *mainwindow = FindWindowById(WC_MAIN_WINDOW, 0);
|
||||||
|
|
Loading…
Reference in New Issue