Functions/types etc. More...
#include "rail_type.h"
Go to the source code of this file.
Functions | |
struct Window * | ShowBuildRailToolbar (RailType railtype) |
Open the build rail toolbar window for a specific rail type. | |
void | ReinitGuiAfterToggleElrail (bool disable) |
Re-initialize rail-build toolbar after toggling support for electric trains. | |
bool | ResetSignalVariant (int32=0) |
Updates the current signal variant used in the signal GUI to the one adequate to current year. | |
void | InitializeRailGUI () |
Resets the rail GUI - sets default railtype to build and resets the signal GUI. |
Functions/types etc.
related to the rail GUI.
Definition in file rail_gui.h.
void ReinitGuiAfterToggleElrail | ( | bool | disable | ) |
Re-initialize rail-build toolbar after toggling support for electric trains.
disable | Boolean whether electric trains are disabled (removed from the game) |
Definition at line 1792 of file rail_gui.cpp.
References _cur_railtype, FindWindowById(), MarkWholeScreenDirty(), BuildRailToolbarWindow::ModifyRailType(), RAILTYPE_ELECTRIC, RAILTYPE_RAIL, and TRANSPORT_RAIL.
Referenced by SettingsDisableElrail().
bool ResetSignalVariant | ( | int32 | p = 0 |
) |
Updates the current signal variant used in the signal GUI to the one adequate to current year.
p | needed to be called when a setting changes |
Definition at line 1854 of file rail_gui.cpp.
References _cur_signal_type, _cur_signal_variant, _cur_year, _settings_client, FindWindowById(), ClientSettings::gui, Window::RaiseWidget(), GUISettings::semaphore_build_before, Window::SetDirty(), SIG_ELECTRIC, and SIG_SEMAPHORE.
Referenced by ClickChangeDateCheat(), InitializeRailGUI(), and OnNewYear().
Open the build rail toolbar window for a specific rail type.
If the terraform toolbar is linked to the toolbar, that window is also opened.
railtype | Rail type to open the window for |
Definition at line 839 of file rail_gui.cpp.
References _cur_railtype, _local_company, _remove_button_clicked, DeleteWindowByClass(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tcache, Tzero >::PoolItem<&_company_pool >::IsValidID(), TRANSPORT_RAIL, and ValParamRailtype().
Referenced by MainToolbarWindow::OnKeyPress().