OpenTTD
|
Functions/types etc. More...
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. More... | |
void | ReinitGuiAfterToggleElrail (bool disable) |
Re-initialize rail-build toolbar after toggling support for electric trains. More... | |
bool | ResetSignalVariant (int32=0) |
Updates the current signal variant used in the signal GUI to the one adequate to current year. More... | |
void | InitializeRailGUI () |
Resets the rail GUI - sets default railtype to build and resets the signal GUI. | |
DropDownList * | GetRailTypeDropDownList (bool for_replacement=false, bool all_option=false) |
Create a drop down list for all the rail types of the local company. More... | |
DropDownList* GetRailTypeDropDownList | ( | bool | for_replacement, |
bool | all_option | ||
) |
Create a drop down list for all the rail types of the local company.
for_replacement | Whether this list is for the replacement window. |
all_option | Whether to add an 'all types' item. |
Definition at line 1988 of file rail_gui.cpp.
References RAILTYPES_NONE.
Referenced by ReplaceVehicleWindow::OnClick().
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 1891 of file rail_gui.cpp.
bool ResetSignalVariant | ( | int32 | p | ) |
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 1953 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, SIG_SEMAPHORE, WC_BUILD_SIGNAL, WID_BS_ELECTRIC_NORM, and WID_BS_SEMAPHORE_NORM.
Referenced by ClickChangeDateCheat().
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 867 of file rail_gui.cpp.
References _cur_railtype, _local_company, _remove_button_clicked, DeleteWindowByClass(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_company_pool >::IsValidID(), ValParamRailtype(), and WC_BUILD_TOOLBAR.