OpenTTD Source: src/rail_gui.h Source File

OpenTTD Source 15.0-beta1

rail_gui.h
Go to the documentation of this file.
1/*
2 * This file is part of OpenTTD.
3 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
4 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
5 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
6 */
7
10#ifndef RAIL_GUI_H
11#define RAIL_GUI_H
12
13#include "rail_type.h"
14#include "dropdown_type.h"
15
16struct Window *ShowBuildRailToolbar(RailType railtype);
17void ReinitGuiAfterToggleElrail(bool disable);
18void ResetSignalVariant(int32_t = 0);
19void InitializeRailGUI();
20 DropDownList GetRailTypeDropDownList(bool for_replacement = false, bool all_option = false);
21
23 enum SignalGUISettings : uint8_t {
24 SIGNAL_GUI_PATH = 0,
25 SIGNAL_GUI_ALL = 1,
26};
27
29 enum SignalCycleSettings : uint8_t {
30 SIGNAL_CYCLE_GROUP = 0,
31 SIGNAL_CYCLE_ALL = 1,
32};
33
34#endif /* RAIL_GUI_H */
dropdown_type.h
Types related to the drop down widget.
DropDownList
std::vector< std::unique_ptr< const DropDownListItem > > DropDownList
A drop down list is a collection of drop down list items.
Definition dropdown_type.h:50
GetRailTypeDropDownList
DropDownList GetRailTypeDropDownList(bool for_replacement=false, bool all_option=false)
Create a drop down list for all the rail types of the local company.
Definition rail_gui.cpp:2011
SignalGUISettings
SignalGUISettings
Settings for which signals are shown by the signal GUI.
Definition rail_gui.h:23
SIGNAL_GUI_ALL
@ SIGNAL_GUI_ALL
Show all signals, including block and presignals.
Definition rail_gui.h:25
SIGNAL_GUI_PATH
@ SIGNAL_GUI_PATH
Show path signals only.
Definition rail_gui.h:24
SignalCycleSettings
SignalCycleSettings
Settings for which signals are cycled through by control-clicking on the signal with the signal tool.
Definition rail_gui.h:29
SIGNAL_CYCLE_GROUP
@ SIGNAL_CYCLE_GROUP
Cycle through current signal group (block or path) only.
Definition rail_gui.h:30
SIGNAL_CYCLE_ALL
@ SIGNAL_CYCLE_ALL
Cycle through all signals visible to the player.
Definition rail_gui.h:31
ResetSignalVariant
void ResetSignalVariant(int32_t=0)
Updates the current signal variant used in the signal GUI to the one adequate to current year.
Definition rail_gui.cpp:1971
ShowBuildRailToolbar
struct Window * ShowBuildRailToolbar(RailType railtype)
Open the build rail toolbar window for a specific rail type.
Definition rail_gui.cpp:918
ReinitGuiAfterToggleElrail
void ReinitGuiAfterToggleElrail(bool disable)
Re-initialize rail-build toolbar after toggling support for electric trains.
Definition rail_gui.cpp:1908
InitializeRailGUI
void InitializeRailGUI()
Resets the rail GUI - sets default railtype to build and resets the signal GUI.
Definition rail_gui.cpp:1996
rail_type.h
The different types of rail.
RailType
RailType
Enumeration for all possible railtypes.
Definition rail_type.h:27
Window
Data structure for an opened window.
Definition window_gui.h:273
Window::GetWidget
const NWID * GetWidget(WidgetID widnum) const
Get the nested widget with number widnum from the nested widget tree.
Definition window_gui.h:977