diff --git a/src/lang/english.txt b/src/lang/english.txt index e0a343294e..ea3d66e805 100644 --- a/src/lang/english.txt +++ b/src/lang/english.txt @@ -5631,16 +5631,20 @@ STR_TIMETABLE_STARTING_DATE :{BLACK}Start da STR_TIMETABLE_STARTING_DATE_TOOLTIP :{BLACK}Select a date as starting point of this timetable. Ctrl+Click sets the starting point of this timetable and distributes all vehicles sharing this order evenly based on their relative order, if the order is completely timetabled STR_TIMETABLE_CHANGE_TIME :{BLACK}Change Time -STR_TIMETABLE_WAIT_TIME_TOOLTIP :{BLACK}Change the amount of time that the highlighted order should take (Ctrl+Click sets waiting time for all orders) +STR_TIMETABLE_WAIT_TIME_TOOLTIP :{BLACK}Change the amount of time that the highlighted order should take +STR_TIMETABLE_WAIT_TIME_TOOLTIP_EXTRA :{BLACK}{STRING} (Ctrl+Click sets the time for all orders) STR_TIMETABLE_CLEAR_TIME :{BLACK}Clear Time -STR_TIMETABLE_CLEAR_TIME_TOOLTIP :{BLACK}Clear the amount of time for the highlighted order (Ctrl+Click clears the amount of time for all orders) +STR_TIMETABLE_CLEAR_TIME_TOOLTIP :{BLACK}Clear the amount of time for the highlighted order +STR_TIMETABLE_CLEAR_TIME_TOOLTIP_EXTRA :{BLACK}{STRING} (Ctrl+Click clears the time for all orders) STR_TIMETABLE_CHANGE_SPEED :{BLACK}Change Speed Limit -STR_TIMETABLE_CHANGE_SPEED_TOOLTIP :{BLACK}Change the maximum travel speed of the highlighted order (Ctrl+Click set the speed for all orders) +STR_TIMETABLE_CHANGE_SPEED_TOOLTIP :{BLACK}Change the maximum travel speed of the highlighted order +STR_TIMETABLE_CHANGE_SPEED_TOOLTIP_EXTRA :{BLACK}{STRING} (Ctrl+Click sets the speed for all orders) STR_TIMETABLE_CLEAR_SPEED :{BLACK}Clear Speed Limit -STR_TIMETABLE_CLEAR_SPEED_TOOLTIP :{BLACK}Clear the maximum travel speed of the highlighted order (Ctrl+Click clears the speed for all orders) +STR_TIMETABLE_CLEAR_SPEED_TOOLTIP :{BLACK}Clear the maximum travel speed of the highlighted order +STR_TIMETABLE_CLEAR_SPEED_TOOLTIP_EXTRA :{BLACK}{STRING} (Ctrl+Click clears the speed for all orders) STR_TIMETABLE_RESET_LATENESS :{BLACK}Reset Late Counter STR_TIMETABLE_RESET_LATENESS_TOOLTIP :{BLACK}Reset the lateness counter, so the vehicle will be on time diff --git a/src/timetable_gui.cpp b/src/timetable_gui.cpp index 51ecd7e7a4..ad172be05f 100644 --- a/src/timetable_gui.cpp +++ b/src/timetable_gui.cpp @@ -517,6 +517,38 @@ struct TimetableWindow : Window { } } + bool OnTooltip(Point pt, int widget, TooltipCloseCondition close_cond) override + { + switch (widget) { + case WID_VT_CHANGE_TIME: { + uint64 params[1]; + params[0] = STR_TIMETABLE_WAIT_TIME_TOOLTIP; + GuiShowTooltips(this, STR_TIMETABLE_WAIT_TIME_TOOLTIP_EXTRA, 1, params, close_cond); + return true; + } + case WID_VT_CLEAR_TIME: { + uint64 params[1]; + params[0] = STR_TIMETABLE_CLEAR_TIME_TOOLTIP; + GuiShowTooltips(this, STR_TIMETABLE_CLEAR_TIME_TOOLTIP_EXTRA, 1, params, close_cond); + return true; + } + case WID_VT_CHANGE_SPEED: { + uint64 params[1]; + params[0] = STR_TIMETABLE_CHANGE_SPEED_TOOLTIP; + GuiShowTooltips(this, STR_TIMETABLE_CHANGE_SPEED_TOOLTIP_EXTRA, 1, params, close_cond); + return true; + } + case WID_VT_CLEAR_SPEED: { + uint64 params[1]; + params[0] = STR_TIMETABLE_CLEAR_SPEED_TOOLTIP; + GuiShowTooltips(this, STR_TIMETABLE_CLEAR_SPEED_TOOLTIP_EXTRA, 1, params, close_cond); + return true; + } + default: + return false; + } + } + void DrawWidget(const Rect &r, int widget) const override { const Vehicle *v = this->vehicle;