mirror of https://github.com/OpenTTD/OpenTTD
Change: Merge Game Options and Game Settings together.
Game Settings is now an additional 'Advanced' tab in the Game Options window.pull/14086/head
parent
6f056283f2
commit
a4dc7249ee
|
@ -25,7 +25,6 @@ void InitializeGUI();
|
|||
|
||||
/* settings_gui.cpp */
|
||||
void ShowGameOptions();
|
||||
void ShowGameSettings();
|
||||
|
||||
/* train_gui.cpp */
|
||||
void ShowOrdersWindow(const Vehicle *v);
|
||||
|
|
|
@ -351,7 +351,6 @@ struct SelectGameWindow : public Window {
|
|||
case WID_SGI_OPTIONS: ShowGameOptions(); break;
|
||||
case WID_SGI_HIGHSCORE: ShowHighscoreTable(); break;
|
||||
case WID_SGI_HELP: ShowHelpWindow(); break;
|
||||
case WID_SGI_SETTINGS_OPTIONS:ShowGameSettings(); break;
|
||||
case WID_SGI_GRF_SETTINGS: ShowNewGRFSettings(true, true, false, _grfconfig_newgame); break;
|
||||
case WID_SGI_CONTENT_DOWNLOAD:
|
||||
if (!_network_available) {
|
||||
|
@ -414,10 +413,7 @@ static constexpr NWidgetPart _nested_select_game_widgets[] = {
|
|||
|
||||
NWidget(NWID_VERTICAL), SetPIP(0, WidgetDimensions::unscaled.vsep_sparse, 0),
|
||||
/* 'Game Options' and 'Settings' buttons */
|
||||
NWidget(NWID_HORIZONTAL, NWidContainerFlag::EqualSize),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_ORANGE, WID_SGI_OPTIONS), SetStringTip(STR_INTRO_GAME_OPTIONS, STR_INTRO_TOOLTIP_GAME_OPTIONS), SetFill(1, 0),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_ORANGE, WID_SGI_SETTINGS_OPTIONS), SetStringTip(STR_INTRO_CONFIG_SETTINGS_TREE, STR_INTRO_TOOLTIP_CONFIG_SETTINGS_TREE), SetFill(1, 0),
|
||||
EndContainer(),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_ORANGE, WID_SGI_OPTIONS), SetStringTip(STR_INTRO_GAME_OPTIONS, STR_INTRO_TOOLTIP_GAME_OPTIONS), SetFill(1, 0),
|
||||
|
||||
/* 'AI Settings' and 'Game Script Settings' buttons */
|
||||
NWidget(NWID_HORIZONTAL, NWidContainerFlag::EqualSize),
|
||||
|
|
|
@ -444,7 +444,6 @@ STR_SCENEDIT_TOWN_MENU_PACE_HOUSE :Place houses
|
|||
|
||||
# Settings menu
|
||||
STR_SETTINGS_MENU_GAME_OPTIONS :Game options
|
||||
STR_SETTINGS_MENU_CONFIG_SETTINGS_TREE :Settings
|
||||
STR_SETTINGS_MENU_AI_SETTINGS :AI settings
|
||||
STR_SETTINGS_MENU_GAMESCRIPT_SETTINGS :Game script settings
|
||||
STR_SETTINGS_MENU_NEWGRF_SETTINGS :NewGRF settings
|
||||
|
@ -966,6 +965,8 @@ STR_GAME_OPTIONS_TAB_SOUND :Sound
|
|||
STR_GAME_OPTIONS_TAB_SOUND_TOOLTIP :{BLACK}Choose sound and music settings
|
||||
STR_GAME_OPTIONS_TAB_SOCIAL :Social
|
||||
STR_GAME_OPTIONS_TAB_SOCIAL_TOOLTIP :{BLACK}Choose social integration settings
|
||||
STR_GAME_OPTIONS_TAB_ADVANCED :Advanced
|
||||
STR_GAME_OPTIONS_TAB_ADVANCED_TOOLTIP :{BLACK}Change advanced settings
|
||||
|
||||
STR_GAME_OPTIONS_VOLUME :Volume
|
||||
STR_GAME_OPTIONS_SFX_VOLUME :Sound effects
|
||||
|
@ -1219,8 +1220,7 @@ STR_CITY_APPROVAL_PERMISSIVE :Permissive (no
|
|||
|
||||
STR_WARNING_NO_SUITABLE_AI :{WHITE}No suitable AIs available...{}{}You can download several AIs via the 'Online Content' system
|
||||
|
||||
# Settings tree window
|
||||
STR_CONFIG_SETTING_TREE_CAPTION :{WHITE}Settings
|
||||
# Settings tree in the Game Options window
|
||||
STR_CONFIG_SETTING_FILTER_TITLE :{BLACK}Filter:
|
||||
STR_CONFIG_SETTING_EXPAND_ALL :{BLACK}Expand all
|
||||
STR_CONFIG_SETTING_COLLAPSE_ALL :{BLACK}Collapse all
|
||||
|
@ -2203,7 +2203,6 @@ STR_INTRO_MULTIPLAYER :{BLACK}Multipla
|
|||
STR_INTRO_GAME_OPTIONS :{BLACK}Game Options
|
||||
STR_INTRO_HIGHSCORE :{BLACK}Highscore Table
|
||||
STR_INTRO_HELP :{BLACK}Help & Manuals
|
||||
STR_INTRO_CONFIG_SETTINGS_TREE :{BLACK}Settings
|
||||
STR_INTRO_NEWGRF_SETTINGS :{BLACK}NewGRF Settings
|
||||
STR_INTRO_ONLINE_CONTENT :{BLACK}Online Content
|
||||
STR_INTRO_AI_SETTINGS :{BLACK}AI Settings
|
||||
|
@ -2225,7 +2224,6 @@ STR_INTRO_TOOLTIP_TOYLAND_LANDSCAPE :{BLACK}Select '
|
|||
STR_INTRO_TOOLTIP_GAME_OPTIONS :{BLACK}Open game options
|
||||
STR_INTRO_TOOLTIP_HIGHSCORE :{BLACK}Open highscore table
|
||||
STR_INTRO_TOOLTIP_HELP :{BLACK}Get access to documentation and online resources
|
||||
STR_INTRO_TOOLTIP_CONFIG_SETTINGS_TREE :{BLACK}Open settings
|
||||
STR_INTRO_TOOLTIP_NEWGRF_SETTINGS :{BLACK}Open NewGRF settings
|
||||
STR_INTRO_TOOLTIP_ONLINE_CONTENT :{BLACK}Check for new and updated content to download
|
||||
STR_INTRO_TOOLTIP_AI_SETTINGS :{BLACK}Open AI settings
|
||||
|
|
1225
src/settings_gui.cpp
1225
src/settings_gui.cpp
File diff suppressed because it is too large
Load Diff
|
@ -228,7 +228,6 @@ static CallBackFunction ToolbarFastForwardClick(Window *)
|
|||
*/
|
||||
enum OptionMenuEntries : uint8_t {
|
||||
OME_GAMEOPTIONS,
|
||||
OME_SETTINGS,
|
||||
OME_AI_SETTINGS,
|
||||
OME_GAMESCRIPT_SETTINGS,
|
||||
OME_NEWGRFSETTINGS,
|
||||
|
@ -261,7 +260,6 @@ static CallBackFunction ToolbarOptionsClick(Window *w)
|
|||
{
|
||||
DropDownList list;
|
||||
list.push_back(MakeDropDownListStringItem(STR_SETTINGS_MENU_GAME_OPTIONS, OME_GAMEOPTIONS));
|
||||
list.push_back(MakeDropDownListStringItem(STR_SETTINGS_MENU_CONFIG_SETTINGS_TREE, OME_SETTINGS));
|
||||
/* Changes to the per-AI settings don't get send from the server to the clients. Clients get
|
||||
* the settings once they join but never update it. As such don't show the window at all
|
||||
* to network clients. */
|
||||
|
@ -306,7 +304,6 @@ static CallBackFunction MenuClickSettings(int index)
|
|||
{
|
||||
switch (index) {
|
||||
case OME_GAMEOPTIONS: ShowGameOptions(); return CBF_NONE;
|
||||
case OME_SETTINGS: ShowGameSettings(); return CBF_NONE;
|
||||
case OME_AI_SETTINGS: ShowAIConfigWindow(); return CBF_NONE;
|
||||
case OME_GAMESCRIPT_SETTINGS: ShowGSConfigWindow(); return CBF_NONE;
|
||||
case OME_NEWGRFSETTINGS: ShowNewGRFSettings(!_networking && _settings_client.gui.UserIsAllowedToChangeNewGRFs(), true, true, _grfconfig); return CBF_NONE;
|
||||
|
|
|
@ -29,7 +29,6 @@ enum SelectGameIntroWidgets : WidgetID {
|
|||
WID_SGI_OPTIONS, ///< Options button.
|
||||
WID_SGI_HIGHSCORE, ///< Highscore button.
|
||||
WID_SGI_HELP, ///< Help and manuals button.
|
||||
WID_SGI_SETTINGS_OPTIONS, ///< Settings button.
|
||||
WID_SGI_GRF_SETTINGS, ///< NewGRF button.
|
||||
WID_SGI_CONTENT_DOWNLOAD, ///< Content Download button.
|
||||
WID_SGI_AI_SETTINGS, ///< AI button.
|
||||
|
|
|
@ -16,6 +16,7 @@ enum GameOptionsWidgets : WidgetID {
|
|||
WID_GO_TAB_GRAPHICS, ///< Graphics tab.
|
||||
WID_GO_TAB_SOUND, ///< Sound tab.
|
||||
WID_GO_TAB_SOCIAL, ///< Social tab.
|
||||
WID_GO_TAB_ADVANCED, ///< Advanced tab.
|
||||
WID_GO_TAB_SELECTION, ///< Background of the tab selection.
|
||||
WID_GO_CURRENCY_DROPDOWN, ///< Currency dropdown.
|
||||
WID_GO_DISTANCE_DROPDOWN, ///< Measuring unit dropdown.
|
||||
|
@ -61,23 +62,20 @@ enum GameOptionsWidgets : WidgetID {
|
|||
WID_GO_SOCIAL_PLUGIN_TITLE, ///< Title of the frame of the social plugin.
|
||||
WID_GO_SOCIAL_PLUGIN_PLATFORM, ///< Platform of the social plugin.
|
||||
WID_GO_SOCIAL_PLUGIN_STATE, ///< State of the social plugin.
|
||||
};
|
||||
|
||||
/** Widgets of the #GameSettingsWindow class. */
|
||||
enum GameSettingsWidgets : WidgetID {
|
||||
WID_GS_FILTER, ///< Text filter.
|
||||
WID_GS_OPTIONSPANEL, ///< Panel widget containing the option lists.
|
||||
WID_GS_SCROLLBAR, ///< Scrollbar.
|
||||
WID_GS_HELP_TEXT, ///< Information area to display help text of the selected option.
|
||||
WID_GS_EXPAND_ALL, ///< Expand all button.
|
||||
WID_GS_COLLAPSE_ALL, ///< Collapse all button.
|
||||
WID_GS_RESET_ALL, ///< Reset all button.
|
||||
WID_GS_RESTRICT_CATEGORY, ///< Label upfront to the category drop-down box to restrict the list of settings to show
|
||||
WID_GS_RESTRICT_TYPE, ///< Label upfront to the type drop-down box to restrict the list of settings to show
|
||||
WID_GS_RESTRICT_DROPDOWN, ///< The drop down box to restrict the list of settings
|
||||
WID_GS_TYPE_DROPDOWN, ///< The drop down box to choose client/game/company/all settings
|
||||
WID_GO_FILTER, ///< Text filter.
|
||||
WID_GO_OPTIONSPANEL, ///< Panel widget containing the option lists.
|
||||
WID_GO_SCROLLBAR, ///< Scrollbar.
|
||||
WID_GO_HELP_TEXT, ///< Information area to display help text of the selected option.
|
||||
WID_GO_EXPAND_ALL, ///< Expand all button.
|
||||
WID_GO_COLLAPSE_ALL, ///< Collapse all button.
|
||||
WID_GO_RESET_ALL, ///< Reset all button.
|
||||
WID_GO_RESTRICT_CATEGORY, ///< Label upfront to the category drop-down box to restrict the list of settings to show
|
||||
WID_GO_RESTRICT_TYPE, ///< Label upfront to the type drop-down box to restrict the list of settings to show
|
||||
WID_GO_RESTRICT_DROPDOWN, ///< The drop down box to restrict the list of settings
|
||||
WID_GO_TYPE_DROPDOWN, ///< The drop down box to choose client/game/company/all settings
|
||||
|
||||
WID_GS_SETTING_DROPDOWN = -1, ///< Dynamically created dropdown for changing setting value.
|
||||
WID_GO_SETTING_DROPDOWN = -1, ///< Dynamically created dropdown for changing setting value.
|
||||
};
|
||||
|
||||
/** Widgets of the #CustomCurrencyWindow class. */
|
||||
|
|
Loading…
Reference in New Issue