OpenTTD Source: src/widgets/settings_widget.h Source File

OpenTTD Source 15.0-RC2

settings_widget.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 <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
6 */
7
10#ifndef WIDGETS_SETTINGS_WIDGET_H
11#define WIDGETS_SETTINGS_WIDGET_H
12
14 enum GameOptionsWidgets : WidgetID {
15 WID_GO_TAB_GENERAL,
16 WID_GO_TAB_GRAPHICS,
17 WID_GO_TAB_SOUND,
18 WID_GO_TAB_SOCIAL,
19 WID_GO_TAB_ADVANCED,
20 WID_GO_TAB_SELECTION,
21 WID_GO_CURRENCY_DROPDOWN,
22 WID_GO_DISTANCE_DROPDOWN,
23 WID_GO_AUTOSAVE_DROPDOWN,
24 WID_GO_LANG_DROPDOWN,
25 WID_GO_RESOLUTION_DROPDOWN,
26 WID_GO_FULLSCREEN_BUTTON,
27 WID_GO_FULLSCREEN_TEXT,
28 WID_GO_GUI_SCALE,
29 WID_GO_GUI_SCALE_AUTO,
30 WID_GO_GUI_SCALE_AUTO_TEXT,
31 WID_GO_GUI_SCALE_BEVEL_BUTTON,
32 WID_GO_GUI_SCALE_BEVEL_TEXT,
33 WID_GO_GUI_FONT_SPRITE,
34 WID_GO_GUI_FONT_SPRITE_TEXT,
35 WID_GO_GUI_FONT_AA,
36 WID_GO_GUI_FONT_AA_TEXT,
37 WID_GO_BASE_GRF_DROPDOWN,
38 WID_GO_BASE_GRF_PARAMETERS,
39 WID_GO_BASE_GRF_CONTENT_DOWNLOAD,
40 WID_GO_BASE_GRF_OPEN_URL,
41 WID_GO_BASE_GRF_TEXTFILE,
42 WID_GO_BASE_GRF_DESCRIPTION = WID_GO_BASE_GRF_TEXTFILE + TFT_CONTENT_END,
43 WID_GO_BASE_SFX_DROPDOWN,
44 WID_GO_BASE_SFX_CONTENT_DOWNLOAD,
45 WID_GO_TEXT_SFX_VOLUME,
46 WID_GO_BASE_SFX_VOLUME,
47 WID_GO_BASE_SFX_OPEN_URL,
48 WID_GO_BASE_SFX_TEXTFILE,
49 WID_GO_BASE_SFX_DESCRIPTION = WID_GO_BASE_SFX_TEXTFILE + TFT_CONTENT_END,
50 WID_GO_BASE_MUSIC_DROPDOWN,
51 WID_GO_BASE_MUSIC_CONTENT_DOWNLOAD,
52 WID_GO_TEXT_MUSIC_VOLUME,
53 WID_GO_BASE_MUSIC_VOLUME,
54 WID_GO_BASE_MUSIC_JUKEBOX,
55 WID_GO_BASE_MUSIC_OPEN_URL,
56 WID_GO_BASE_MUSIC_TEXTFILE,
57 WID_GO_BASE_MUSIC_DESCRIPTION = WID_GO_BASE_MUSIC_TEXTFILE + TFT_CONTENT_END,
58 WID_GO_VIDEO_ACCEL_BUTTON,
59 WID_GO_VIDEO_ACCEL_TEXT,
60 WID_GO_VIDEO_VSYNC_BUTTON,
61 WID_GO_VIDEO_VSYNC_TEXT,
62 WID_GO_REFRESH_RATE_DROPDOWN,
63 WID_GO_VIDEO_DRIVER_INFO,
64 WID_GO_SURVEY_SEL,
65 WID_GO_SURVEY_PARTICIPATE_BUTTON,
66 WID_GO_SURVEY_PARTICIPATE_TEXT,
67 WID_GO_SURVEY_LINK_BUTTON,
68 WID_GO_SURVEY_PREVIEW_BUTTON,
69 WID_GO_SOCIAL_PLUGINS,
70 WID_GO_SOCIAL_PLUGIN_TITLE,
71 WID_GO_SOCIAL_PLUGIN_PLATFORM,
72 WID_GO_SOCIAL_PLUGIN_STATE,
73
74 WID_GO_FILTER,
75 WID_GO_OPTIONSPANEL,
76 WID_GO_SCROLLBAR,
77 WID_GO_SETTING_PROPERTIES,
78 WID_GO_HELP_TEXT,
79 WID_GO_HELP_TEXT_SCROLL,
80 WID_GO_EXPAND_ALL,
81 WID_GO_COLLAPSE_ALL,
82 WID_GO_RESET_ALL,
83 WID_GO_RESTRICT_CATEGORY,
84 WID_GO_RESTRICT_TYPE,
85 WID_GO_RESTRICT_DROPDOWN,
86 WID_GO_TYPE_DROPDOWN,
87
88 WID_GO_SETTING_DROPDOWN = INVALID_WIDGET,
89};
90
92 enum CustomCurrencyWidgets : WidgetID {
93 WID_CC_RATE_DOWN,
94 WID_CC_RATE_UP,
95 WID_CC_RATE,
96 WID_CC_SEPARATOR_EDIT,
97 WID_CC_SEPARATOR,
98 WID_CC_PREFIX_EDIT,
99 WID_CC_PREFIX,
100 WID_CC_SUFFIX_EDIT,
101 WID_CC_SUFFIX,
102 WID_CC_YEAR_DOWN,
103 WID_CC_YEAR_UP,
104 WID_CC_YEAR,
105 WID_CC_PREVIEW,
106};
107
108#endif /* WIDGETS_SETTINGS_WIDGET_H */
GameOptionsWidgets
GameOptionsWidgets
Widgets of the GameOptionsWindow class.
Definition settings_widget.h:14
WID_GO_BASE_SFX_OPEN_URL
@ WID_GO_BASE_SFX_OPEN_URL
Open base SFX URL.
Definition settings_widget.h:47
WID_GO_SETTING_DROPDOWN
@ WID_GO_SETTING_DROPDOWN
Dynamically created dropdown for changing setting value.
Definition settings_widget.h:88
WID_GO_BASE_MUSIC_DESCRIPTION
@ WID_GO_BASE_MUSIC_DESCRIPTION
Description of selected base music set.
Definition settings_widget.h:57
WID_GO_BASE_MUSIC_CONTENT_DOWNLOAD
@ WID_GO_BASE_MUSIC_CONTENT_DOWNLOAD
'Get Content' button for base music.
Definition settings_widget.h:51
WID_GO_RESTRICT_DROPDOWN
@ WID_GO_RESTRICT_DROPDOWN
The drop down box to restrict the list of settings.
Definition settings_widget.h:85
WID_GO_RESOLUTION_DROPDOWN
@ WID_GO_RESOLUTION_DROPDOWN
Dropdown for the resolution.
Definition settings_widget.h:25
WID_GO_COLLAPSE_ALL
@ WID_GO_COLLAPSE_ALL
Collapse all button.
Definition settings_widget.h:81
WID_GO_CURRENCY_DROPDOWN
@ WID_GO_CURRENCY_DROPDOWN
Currency dropdown.
Definition settings_widget.h:21
WID_GO_BASE_GRF_DESCRIPTION
@ WID_GO_BASE_GRF_DESCRIPTION
Description of selected base GRF.
Definition settings_widget.h:42
WID_GO_BASE_SFX_DESCRIPTION
@ WID_GO_BASE_SFX_DESCRIPTION
Description of selected base SFX.
Definition settings_widget.h:49
WID_GO_GUI_FONT_AA_TEXT
@ WID_GO_GUI_FONT_AA_TEXT
Text for anti-alias toggle.
Definition settings_widget.h:36
WID_GO_DISTANCE_DROPDOWN
@ WID_GO_DISTANCE_DROPDOWN
Measuring unit dropdown.
Definition settings_widget.h:22
WID_GO_RESET_ALL
@ WID_GO_RESET_ALL
Reset all button.
Definition settings_widget.h:82
WID_GO_GUI_SCALE_BEVEL_BUTTON
@ WID_GO_GUI_SCALE_BEVEL_BUTTON
Toggle for chunky bevels.
Definition settings_widget.h:31
WID_GO_GUI_SCALE
@ WID_GO_GUI_SCALE
GUI Scale slider.
Definition settings_widget.h:28
WID_GO_BASE_SFX_TEXTFILE
@ WID_GO_BASE_SFX_TEXTFILE
Open base SFX readme, changelog (+1) or license (+2).
Definition settings_widget.h:48
WID_GO_TAB_ADVANCED
@ WID_GO_TAB_ADVANCED
Advanced tab.
Definition settings_widget.h:19
WID_GO_GUI_FONT_SPRITE
@ WID_GO_GUI_FONT_SPRITE
Toggle whether to prefer the sprite font over TTF fonts.
Definition settings_widget.h:33
WID_GO_GUI_SCALE_AUTO
@ WID_GO_GUI_SCALE_AUTO
Autodetect GUI scale button.
Definition settings_widget.h:29
WID_GO_SOCIAL_PLUGINS
@ WID_GO_SOCIAL_PLUGINS
Main widget handling the social plugins.
Definition settings_widget.h:69
WID_GO_BASE_GRF_CONTENT_DOWNLOAD
@ WID_GO_BASE_GRF_CONTENT_DOWNLOAD
'Get Content' button for base GRF.
Definition settings_widget.h:39
WID_GO_FILTER
@ WID_GO_FILTER
Text filter.
Definition settings_widget.h:74
WID_GO_BASE_GRF_TEXTFILE
@ WID_GO_BASE_GRF_TEXTFILE
Open base GRF readme, changelog (+1) or license (+2).
Definition settings_widget.h:41
WID_GO_TAB_GENERAL
@ WID_GO_TAB_GENERAL
General tab.
Definition settings_widget.h:15
WID_GO_VIDEO_VSYNC_TEXT
@ WID_GO_VIDEO_VSYNC_TEXT
Text for video vsync toggle.
Definition settings_widget.h:61
WID_GO_BASE_GRF_DROPDOWN
@ WID_GO_BASE_GRF_DROPDOWN
Use to select a base GRF.
Definition settings_widget.h:37
WID_GO_BASE_MUSIC_VOLUME
@ WID_GO_BASE_MUSIC_VOLUME
Change music volume.
Definition settings_widget.h:53
WID_GO_GUI_FONT_SPRITE_TEXT
@ WID_GO_GUI_FONT_SPRITE_TEXT
Text for sprite font toggle.
Definition settings_widget.h:34
WID_GO_BASE_SFX_VOLUME
@ WID_GO_BASE_SFX_VOLUME
Change sound effects volume.
Definition settings_widget.h:46
WID_GO_BASE_GRF_PARAMETERS
@ WID_GO_BASE_GRF_PARAMETERS
Base GRF parameters.
Definition settings_widget.h:38
WID_GO_LANG_DROPDOWN
@ WID_GO_LANG_DROPDOWN
Language dropdown.
Definition settings_widget.h:24
WID_GO_VIDEO_ACCEL_TEXT
@ WID_GO_VIDEO_ACCEL_TEXT
Text for video acceleration toggle.
Definition settings_widget.h:59
WID_GO_GUI_FONT_AA
@ WID_GO_GUI_FONT_AA
Toggle whether to anti-alias fonts.
Definition settings_widget.h:35
WID_GO_VIDEO_VSYNC_BUTTON
@ WID_GO_VIDEO_VSYNC_BUTTON
Toggle for video vsync.
Definition settings_widget.h:60
WID_GO_SURVEY_LINK_BUTTON
@ WID_GO_SURVEY_LINK_BUTTON
Button to open browser to go to the survey website.
Definition settings_widget.h:67
WID_GO_SURVEY_PARTICIPATE_TEXT
@ WID_GO_SURVEY_PARTICIPATE_TEXT
Text for automated survey toggle.
Definition settings_widget.h:66
WID_GO_OPTIONSPANEL
@ WID_GO_OPTIONSPANEL
Panel widget containing the option lists.
Definition settings_widget.h:75
WID_GO_TAB_SELECTION
@ WID_GO_TAB_SELECTION
Background of the tab selection.
Definition settings_widget.h:20
WID_GO_SURVEY_PARTICIPATE_BUTTON
@ WID_GO_SURVEY_PARTICIPATE_BUTTON
Toggle for participating in the automated survey.
Definition settings_widget.h:65
WID_GO_AUTOSAVE_DROPDOWN
@ WID_GO_AUTOSAVE_DROPDOWN
Dropdown to say how often to autosave.
Definition settings_widget.h:23
WID_GO_TAB_GRAPHICS
@ WID_GO_TAB_GRAPHICS
Graphics tab.
Definition settings_widget.h:16
WID_GO_HELP_TEXT_SCROLL
@ WID_GO_HELP_TEXT_SCROLL
Scrollbar for setting description.
Definition settings_widget.h:79
WID_GO_SCROLLBAR
@ WID_GO_SCROLLBAR
Scrollbar.
Definition settings_widget.h:76
WID_GO_GUI_SCALE_AUTO_TEXT
@ WID_GO_GUI_SCALE_AUTO_TEXT
Text for Autodetect GUI scale.
Definition settings_widget.h:30
WID_GO_TEXT_MUSIC_VOLUME
@ WID_GO_TEXT_MUSIC_VOLUME
Music volume label.
Definition settings_widget.h:52
WID_GO_GUI_SCALE_BEVEL_TEXT
@ WID_GO_GUI_SCALE_BEVEL_TEXT
Text for chunky bevels.
Definition settings_widget.h:32
WID_GO_BASE_MUSIC_JUKEBOX
@ WID_GO_BASE_MUSIC_JUKEBOX
Open the jukebox.
Definition settings_widget.h:54
WID_GO_SOCIAL_PLUGIN_STATE
@ WID_GO_SOCIAL_PLUGIN_STATE
State of the social plugin.
Definition settings_widget.h:72
WID_GO_SETTING_PROPERTIES
@ WID_GO_SETTING_PROPERTIES
Information area to display setting type and default value.
Definition settings_widget.h:77
WID_GO_SURVEY_SEL
@ WID_GO_SURVEY_SEL
Selection to hide survey if no JSON library is compiled in.
Definition settings_widget.h:64
WID_GO_REFRESH_RATE_DROPDOWN
@ WID_GO_REFRESH_RATE_DROPDOWN
Dropdown for all available refresh rates.
Definition settings_widget.h:62
WID_GO_EXPAND_ALL
@ WID_GO_EXPAND_ALL
Expand all button.
Definition settings_widget.h:80
WID_GO_SOCIAL_PLUGIN_TITLE
@ WID_GO_SOCIAL_PLUGIN_TITLE
Title of the frame of the social plugin.
Definition settings_widget.h:70
WID_GO_BASE_GRF_OPEN_URL
@ WID_GO_BASE_GRF_OPEN_URL
Open base GRF URL.
Definition settings_widget.h:40
WID_GO_BASE_MUSIC_TEXTFILE
@ WID_GO_BASE_MUSIC_TEXTFILE
Open base music readme, changelog (+1) or license (+2).
Definition settings_widget.h:56
WID_GO_RESTRICT_CATEGORY
@ WID_GO_RESTRICT_CATEGORY
Label upfront to the category drop-down box to restrict the list of settings to show.
Definition settings_widget.h:83
WID_GO_VIDEO_ACCEL_BUTTON
@ WID_GO_VIDEO_ACCEL_BUTTON
Toggle for video acceleration.
Definition settings_widget.h:58
WID_GO_TAB_SOCIAL
@ WID_GO_TAB_SOCIAL
Social tab.
Definition settings_widget.h:18
WID_GO_FULLSCREEN_TEXT
@ WID_GO_FULLSCREEN_TEXT
Text for toggle fullscreen.
Definition settings_widget.h:27
WID_GO_HELP_TEXT
@ WID_GO_HELP_TEXT
Information area to display help text of the selected option.
Definition settings_widget.h:78
WID_GO_SURVEY_PREVIEW_BUTTON
@ WID_GO_SURVEY_PREVIEW_BUTTON
Button to open a preview window with the survey results.
Definition settings_widget.h:68
WID_GO_BASE_SFX_CONTENT_DOWNLOAD
@ WID_GO_BASE_SFX_CONTENT_DOWNLOAD
'Get Content' button for base SFX.
Definition settings_widget.h:44
WID_GO_SOCIAL_PLUGIN_PLATFORM
@ WID_GO_SOCIAL_PLUGIN_PLATFORM
Platform of the social plugin.
Definition settings_widget.h:71
WID_GO_BASE_MUSIC_DROPDOWN
@ WID_GO_BASE_MUSIC_DROPDOWN
Use to select a base music set.
Definition settings_widget.h:50
WID_GO_BASE_MUSIC_OPEN_URL
@ WID_GO_BASE_MUSIC_OPEN_URL
Open base music URL.
Definition settings_widget.h:55
WID_GO_TYPE_DROPDOWN
@ WID_GO_TYPE_DROPDOWN
The drop down box to choose client/game/company/all settings.
Definition settings_widget.h:86
WID_GO_FULLSCREEN_BUTTON
@ WID_GO_FULLSCREEN_BUTTON
Toggle fullscreen.
Definition settings_widget.h:26
WID_GO_TAB_SOUND
@ WID_GO_TAB_SOUND
Sound tab.
Definition settings_widget.h:17
WID_GO_BASE_SFX_DROPDOWN
@ WID_GO_BASE_SFX_DROPDOWN
Use to select a base SFX.
Definition settings_widget.h:43
WID_GO_TEXT_SFX_VOLUME
@ WID_GO_TEXT_SFX_VOLUME
Sound effects volume label.
Definition settings_widget.h:45
WID_GO_VIDEO_DRIVER_INFO
@ WID_GO_VIDEO_DRIVER_INFO
Label showing details about the current video driver.
Definition settings_widget.h:63
WID_GO_RESTRICT_TYPE
@ WID_GO_RESTRICT_TYPE
Label upfront to the type drop-down box to restrict the list of settings to show.
Definition settings_widget.h:84
CustomCurrencyWidgets
CustomCurrencyWidgets
Widgets of the CustomCurrencyWindow class.
Definition settings_widget.h:92
WID_CC_YEAR_DOWN
@ WID_CC_YEAR_DOWN
Down button.
Definition settings_widget.h:102
WID_CC_YEAR
@ WID_CC_YEAR
Year of introduction.
Definition settings_widget.h:104
WID_CC_SUFFIX_EDIT
@ WID_CC_SUFFIX_EDIT
Suffix edit button.
Definition settings_widget.h:100
WID_CC_SEPARATOR_EDIT
@ WID_CC_SEPARATOR_EDIT
Separator edit button.
Definition settings_widget.h:96
WID_CC_RATE_DOWN
@ WID_CC_RATE_DOWN
Down button.
Definition settings_widget.h:93
WID_CC_RATE_UP
@ WID_CC_RATE_UP
Up button.
Definition settings_widget.h:94
WID_CC_PREVIEW
@ WID_CC_PREVIEW
Preview.
Definition settings_widget.h:105
WID_CC_PREFIX
@ WID_CC_PREFIX
Current prefix.
Definition settings_widget.h:99
WID_CC_PREFIX_EDIT
@ WID_CC_PREFIX_EDIT
Prefix edit button.
Definition settings_widget.h:98
WID_CC_SUFFIX
@ WID_CC_SUFFIX
Current suffix.
Definition settings_widget.h:101
WID_CC_YEAR_UP
@ WID_CC_YEAR_UP
Up button.
Definition settings_widget.h:103
WID_CC_SEPARATOR
@ WID_CC_SEPARATOR
Current separator.
Definition settings_widget.h:97
WID_CC_RATE
@ WID_CC_RATE
Rate of currency.
Definition settings_widget.h:95
WidgetID
int WidgetID
Widget ID.
Definition window_type.h:20
INVALID_WIDGET
static constexpr WidgetID INVALID_WIDGET
An invalid widget index.
Definition window_type.h:23