(svn r23528) -Codechange: move widget enums to widgets/NNN_type.h

This commit is contained in:
truebrain
2011-12-15 22:22:55 +00:00
parent 16ccb8f246
commit 49e88dcbf0
111 changed files with 3165 additions and 1624 deletions

View File

@@ -34,6 +34,8 @@
#include "ai/ai.hpp"
#include "language.h"
#include "widgets/settings_widget.h"
#include "table/sprites.h"
#include "table/strings.h"
#include <map>
@@ -103,28 +105,6 @@ static int GetCurRes()
return i;
}
/** Widgets of the game options menu */
enum GameOptionsWidgets {
GOW_BACKGROUND, ///< Background of the window
GOW_CURRENCY_DROPDOWN, ///< Currency dropdown
GOW_DISTANCE_DROPDOWN, ///< Measuring unit dropdown
GOW_ROADSIDE_DROPDOWN, ///< Dropdown to select the road side (to set the right side ;))
GOW_TOWNNAME_DROPDOWN, ///< Town name dropdown
GOW_AUTOSAVE_DROPDOWN, ///< Dropdown to say how often to autosave
GOW_LANG_DROPDOWN, ///< Language dropdown
GOW_RESOLUTION_DROPDOWN, ///< Dropdown for the resolution
GOW_FULLSCREEN_BUTTON, ///< Toggle fullscreen
GOW_SCREENSHOT_DROPDOWN, ///< Select the screenshot type... please use PNG!
GOW_BASE_GRF_DROPDOWN, ///< Use to select a base GRF
GOW_BASE_GRF_STATUS, ///< Info about missing files etc.
GOW_BASE_GRF_DESCRIPTION, ///< Description of selected base GRF
GOW_BASE_SFX_DROPDOWN, ///< Use to select a base SFX
GOW_BASE_SFX_DESCRIPTION, ///< Description of selected base SFX
GOW_BASE_MUSIC_DROPDOWN, ///< Use to select a base music set
GOW_BASE_MUSIC_STATUS, ///< Info about corrupted files etc.
GOW_BASE_MUSIC_DESCRIPTION, ///< Description of selected base music set
};
static void ShowCustCurrency();
template <class T>
@@ -629,20 +609,6 @@ void ShowGameOptions()
extern void StartupEconomy();
/* Names of the game difficulty settings window */
enum GameDifficultyWidgets {
GDW_LVL_EASY,
GDW_LVL_MEDIUM,
GDW_LVL_HARD,
GDW_LVL_CUSTOM,
GDW_HIGHSCORE,
GDW_ACCEPT,
GDW_CANCEL,
GDW_OPTIONS_START,
};
void SetDifficultyLevel(int mode, DifficultySettings *gm_opt);
class GameDifficultyWindow : public Window {
@@ -1596,12 +1562,6 @@ static SettingEntry _settings_main[] = {
/** Main page, holding all advanced settings */
static SettingsPage _settings_main_page = {_settings_main, lengthof(_settings_main)};
/** Widget numbers of settings window */
enum GameSettingsWidgets {
SETTINGSEL_OPTIONSPANEL, ///< Panel widget containing the option lists
SETTINGSEL_SCROLLBAR, ///< Scrollbar
};
struct GameSettingsWindow : Window {
static const int SETTINGTREE_LEFT_OFFSET = 5; ///< Position of left edge of setting values
static const int SETTINGTREE_RIGHT_OFFSET = 5; ///< Position of right edge of setting values
@@ -1866,23 +1826,6 @@ void DrawArrowButtons(int x, int y, Colours button_colour, byte state, bool clic
}
}
/** Widget numbers of the custom currency window. */
enum CustomCurrencyWidgets {
CUSTCURR_RATE_DOWN,
CUSTCURR_RATE_UP,
CUSTCURR_RATE,
CUSTCURR_SEPARATOR_EDIT,
CUSTCURR_SEPARATOR,
CUSTCURR_PREFIX_EDIT,
CUSTCURR_PREFIX,
CUSTCURR_SUFFIX_EDIT,
CUSTCURR_SUFFIX,
CUSTCURR_YEAR_DOWN,
CUSTCURR_YEAR_UP,
CUSTCURR_YEAR,
CUSTCURR_PREVIEW,
};
struct CustomCurrencyWindow : Window {
int query_widget;