Implement change timetable waiting time for all stations.
Loosely based on http://www.tt-forums.net/viewtopic.php?f=32&t=50274
This commit is contained in:
@@ -170,6 +170,7 @@ struct TimetableWindow : Window {
|
||||
Scrollbar *vscroll;
|
||||
bool query_is_speed_query; ///< The currently open query window is a speed query and not a time query.
|
||||
bool set_start_date_all; ///< Set start date using minutes text entry: this is a set all vehicle (ctrl-click) action
|
||||
bool set_wait_time_all; ///< Set wait time for all timetable entries (ctrl-click) action
|
||||
|
||||
TimetableWindow(WindowDesc *desc, WindowNumber window_number) :
|
||||
Window(desc),
|
||||
@@ -601,6 +602,7 @@ struct TimetableWindow : Window {
|
||||
}
|
||||
|
||||
this->query_is_speed_query = false;
|
||||
this->set_wait_time_all = (order != NULL) && (selected % 2 == 0) && _ctrl_pressed;
|
||||
ShowQueryString(current, STR_TIMETABLE_CHANGE_TIME, 31, this, CS_NUMERAL, QSF_ACCEPT_UNCHANGED);
|
||||
break;
|
||||
}
|
||||
@@ -691,7 +693,7 @@ struct TimetableWindow : Window {
|
||||
|
||||
uint32 p2 = minu(val, UINT16_MAX);
|
||||
|
||||
DoCommandP(0, p1, p2, CMD_CHANGE_TIMETABLE | CMD_MSG(STR_ERROR_CAN_T_TIMETABLE_VEHICLE));
|
||||
DoCommandP(0, p1, p2, (this->set_wait_time_all ? CMD_BULK_CHANGE_TIMETABLE : CMD_CHANGE_TIMETABLE) | CMD_MSG(STR_ERROR_CAN_T_TIMETABLE_VEHICLE));
|
||||
break;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user