1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-19 12:39:11 +00:00

Feature: [UI] Split AI/Game Script configuration windows and add them to world gen window (#10058)

This commit is contained in:
Artin Alavi
2022-11-10 12:39:09 -08:00
committed by GitHub
parent fd4f148c62
commit cbac243216
15 changed files with 679 additions and 162 deletions

View File

@@ -19,6 +19,7 @@ add_files(
error_widget.h
fios_widget.h
framerate_widget.h
game_widget.h
genworld_widget.h
goal_widget.h
graph_widget.h

View File

@@ -38,7 +38,6 @@ enum AIConfigWidgets {
WID_AIC_DECREASE, ///< Decrease the number of AIs.
WID_AIC_INCREASE, ///< Increase the number of AIs.
WID_AIC_NUMBER, ///< Number of AIs.
WID_AIC_GAMELIST, ///< List with current selected GameScript.
WID_AIC_LIST, ///< List with currently selected AIs.
WID_AIC_SCROLLBAR, ///< Scrollbar to scroll through the selected AIs.
WID_AIC_MOVE_UP, ///< Move up button.

28
src/widgets/game_widget.h Normal file
View File

@@ -0,0 +1,28 @@
/*
* This file is part of OpenTTD.
* 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.
* 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.
* 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/>.
*/
/** @file ai_widget.h Types related to the ai widgets. */
#ifndef WIDGETS_GS_WIDGET_H
#define WIDGETS_GS_WIDGET_H
#include "../textfile_type.h"
/** Widgets of the #GSConfigWindow class. */
enum GSConfigWidgets {
WID_GSC_BACKGROUND, ///< Window background.
WID_GSC_GSLIST, ///< List with current selected Game Script.
WID_GSC_SETTINGS, ///< Panel to draw the Game Script settings on
WID_GSC_SCROLLBAR, ///< Scrollbar to scroll through the selected AIs.
WID_GSC_CHANGE, ///< Select another Game Script button.
WID_GSC_TEXTFILE, ///< Open GS readme, changelog (+1) or license (+2).
WID_GSC_CONTENT_DOWNLOAD = WID_GSC_TEXTFILE + TFT_END, ///< Download content button.
WID_GSC_ACCEPT, ///< Accept ("Close") button
WID_GSC_RESET, ///< Reset button.
};
#endif /* WIDGETS_GS_WIDGET_H */

View File

@@ -60,6 +60,10 @@ enum GenerateLandscapeWidgets {
WID_GL_WATER_SE, ///< SE 'Water'/'Freeform'.
WID_GL_WATER_SW, ///< SW 'Water'/'Freeform'.
WID_GL_AI_BUTTON, ///< 'AI Settings' button.
WID_GL_GS_BUTTON, ///< 'Game Script Settings' button.
WID_GL_NEWGRF_BUTTON, ///< 'NewGRF Settings' button.
WID_GL_CLIMATE_SEL_LABEL, ///< NWID_SELECTION for snow or desert coverage label
WID_GL_CLIMATE_SEL_SELECTOR, ///< NWID_SELECTION for snow or desert coverage selector
};

View File

@@ -32,6 +32,7 @@ enum SelectGameIntroWidgets {
WID_SGI_GRF_SETTINGS, ///< NewGRF button.
WID_SGI_CONTENT_DOWNLOAD, ///< Content Download button.
WID_SGI_AI_SETTINGS, ///< AI button.
WID_SGI_GS_SETTINGS, ///< Game Script button.
WID_SGI_EXIT, ///< Exit button.
};