Feature: Button to toggle showing advanced signal types (#9617)

This commit is contained in:
Charles Pigott 2021-10-17 19:24:50 +01:00 committed by GitHub
parent 3b7daca832
commit 0853c1979b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 0 deletions

View File

@ -2674,6 +2674,7 @@ STR_STATION_CLASS_WAYP :Waypoints
# Signal window
STR_BUILD_SIGNAL_CAPTION :{WHITE}Signal Selection
STR_BUILD_SIGNAL_TOGGLE_ADVANCED_SIGNAL_TOOLTIP :{BLACK}Toggle showing advanced signal types
STR_BUILD_SIGNAL_SEMAPHORE_NORM_TOOLTIP :{BLACK}Block Signal (semaphore){}This is the most basic type of signal, allowing only one train to be in the same block at the same time
STR_BUILD_SIGNAL_SEMAPHORE_ENTRY_TOOLTIP :{BLACK}Entry Signal (semaphore){}Green as long as there is one or more green exit-signal from the following section of track. Otherwise it shows red
STR_BUILD_SIGNAL_SEMAPHORE_EXIT_TOOLTIP :{BLACK}Exit Signal (semaphore){}Behaves in the same way as a block signal but is necessary to trigger the correct colour on entry & combo pre-signals

View File

@ -1823,6 +1823,12 @@ public:
}
break;
case WID_BS_TOGGLE_SIZE:
_settings_client.gui.signal_gui_mode = (_settings_client.gui.signal_gui_mode == SIGNAL_GUI_ALL) ? SIGNAL_GUI_PATH : SIGNAL_GUI_ALL;
this->SetSignalUIMode();
this->ReInit();
break;
default: break;
}
@ -1851,6 +1857,7 @@ static const NWidgetPart _nested_signal_builder_widgets[] = {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
NWidget(WWT_CAPTION, COLOUR_DARK_GREEN, WID_BS_CAPTION), SetDataTip(STR_BUILD_SIGNAL_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_BS_TOGGLE_SIZE), SetDataTip(SPR_LARGE_SMALL_WINDOW, STR_BUILD_SIGNAL_TOGGLE_ADVANCED_SIGNAL_TOOLTIP),
EndContainer(),
NWidget(NWID_VERTICAL, NC_EQUALSIZE),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),

View File

@ -79,6 +79,7 @@ enum BuildRailStationWidgets {
/** Widgets of the #BuildSignalWindow class. */
enum BuildSignalWidgets {
WID_BS_CAPTION, ///< Caption for the Signal Selection window.
WID_BS_TOGGLE_SIZE, ///< Toggle showing advanced signal types.
WID_BS_SEMAPHORE_NORM, ///< Build a semaphore normal block signal.
WID_BS_SEMAPHORE_ENTRY, ///< Build a semaphore entry block signal.
WID_BS_SEMAPHORE_EXIT, ///< Build a semaphore exit block signal.