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/>.
8 /** @file newgrf_widget.h Types related to the newgrf widgets. */
10 #ifndef WIDGETS_NEWGRF_WIDGET_H
11 #define WIDGETS_NEWGRF_WIDGET_H
13 #include "../newgrf_config.h"
14 #include "../textfile_type.h"
16 /** Widgets of the #NewGRFParametersWindow class. */
17 enum NewGRFParametersWidgets
: WidgetID
{
18 WID_NP_CAPTION
, ///< Caption of the window.
19 WID_NP_SHOW_NUMPAR
, ///< #NWID_SELECTION to optionally display #WID_NP_NUMPAR.
20 WID_NP_NUMPAR_DEC
, ///< Button to decrease number of parameters.
21 WID_NP_NUMPAR_INC
, ///< Button to increase number of parameters.
22 WID_NP_NUMPAR
, ///< Optional number of parameters.
23 WID_NP_NUMPAR_TEXT
, ///< Text description.
24 WID_NP_BACKGROUND
, ///< Panel to draw the settings on.
25 WID_NP_SCROLLBAR
, ///< Scrollbar to scroll through all settings.
26 WID_NP_ACCEPT
, ///< Accept button.
27 WID_NP_RESET
, ///< Reset button.
28 WID_NP_SHOW_DESCRIPTION
, ///< #NWID_SELECTION to optionally display parameter descriptions.
29 WID_NP_DESCRIPTION
, ///< Multi-line description of a parameter.
31 WID_NP_SETTING_DROPDOWN
= -1, ///< Dynamically created dropdown for changing setting value.
34 /** Widgets of the #NewGRFWindow class. */
35 enum NewGRFStateWidgets
: WidgetID
{
36 WID_NS_PRESET_LIST
, ///< Active NewGRF preset.
37 WID_NS_PRESET_SAVE
, ///< Save list of active NewGRFs as presets.
38 WID_NS_PRESET_DELETE
, ///< Delete active preset.
39 WID_NS_ADD
, ///< Add NewGRF to active list.
40 WID_NS_REMOVE
, ///< Remove NewGRF from active list.
41 WID_NS_MOVE_UP
, ///< Move NewGRF up in active list.
42 WID_NS_MOVE_DOWN
, ///< Move NewGRF down in active list.
43 WID_NS_UPGRADE
, ///< Upgrade NewGRFs that have a newer version available.
44 WID_NS_FILTER
, ///< Filter list of available NewGRFs.
45 WID_NS_FILE_LIST
, ///< List window of active NewGRFs.
46 WID_NS_SCROLLBAR
, ///< Scrollbar for active NewGRF list.
47 WID_NS_AVAIL_LIST
, ///< List window of available NewGRFs.
48 WID_NS_SCROLL2BAR
, ///< Scrollbar for available NewGRF list.
49 WID_NS_NEWGRF_INFO_TITLE
, ///< Title for Info on selected NewGRF.
50 WID_NS_NEWGRF_INFO
, ///< Panel for Info on selected NewGRF.
51 WID_NS_OPEN_URL
, ///< Open URL of NewGRF.
52 WID_NS_NEWGRF_TEXTFILE
, ///< Open NewGRF readme, changelog (+1) or license (+2).
53 WID_NS_SET_PARAMETERS
= WID_NS_NEWGRF_TEXTFILE
+ TFT_CONTENT_END
, ///< Open Parameters Window for selected NewGRF for editing parameters.
54 WID_NS_VIEW_PARAMETERS
, ///< Open Parameters Window for selected NewGRF for viewing parameters.
55 WID_NS_TOGGLE_PALETTE
, ///< Toggle Palette of selected, active NewGRF.
56 WID_NS_APPLY_CHANGES
, ///< Apply changes to NewGRF config.
57 WID_NS_RESCAN_FILES
, ///< Rescan files (available NewGRFs).
58 WID_NS_RESCAN_FILES2
, ///< Rescan files (active NewGRFs).
59 WID_NS_CONTENT_DOWNLOAD
, ///< Open content download (available NewGRFs).
60 WID_NS_CONTENT_DOWNLOAD2
, ///< Open content download (active NewGRFs).
61 WID_NS_SHOW_REMOVE
, ///< Select active list buttons (0 = normal, 1 = simple layout).
62 WID_NS_SHOW_APPLY
, ///< Select display of the buttons below the 'details'.
65 /** Widgets of the #SavePresetWindow class. */
66 enum SavePresetWidgets
: WidgetID
{
67 WID_SVP_PRESET_LIST
, ///< List with available preset names.
68 WID_SVP_SCROLLBAR
, ///< Scrollbar for the list available preset names.
69 WID_SVP_EDITBOX
, ///< Edit box for changing the preset name.
70 WID_SVP_CANCEL
, ///< Button to cancel saving the preset.
71 WID_SVP_SAVE
, ///< Button to save the preset.
74 /** Widgets of the #ScanProgressWindow class. */
75 enum ScanProgressWidgets
: WidgetID
{
76 WID_SP_PROGRESS_BAR
, ///< Simple progress bar.
77 WID_SP_PROGRESS_TEXT
, ///< Text explaining what is happening.
80 #endif /* WIDGETS_NEWGRF_WIDGET_H */