summaryrefslogtreecommitdiff
path: root/src/genworld_gui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/genworld_gui.cpp')
-rw-r--r--src/genworld_gui.cpp247
1 files changed, 245 insertions, 2 deletions
diff --git a/src/genworld_gui.cpp b/src/genworld_gui.cpp
index 29f831763..8c4ad236a 100644
--- a/src/genworld_gui.cpp
+++ b/src/genworld_gui.cpp
@@ -192,6 +192,146 @@ static const Widget _generate_landscape_widgets[] = {
{ WIDGETS_END},
};
+static const NWidgetPart _nested_generate_landscape_widgets[] = {
+ NWidget(NWID_HORIZONTAL),
+ NWidget(WWT_CLOSEBOX, COLOUR_BROWN, GLAND_CLOSEBOX),
+ NWidget(WWT_CAPTION, COLOUR_BROWN, GLAND_TITLEBAR), SetDataTip(STR_WORLD_GENERATION_CAPTION, STR_NULL),
+ EndContainer(),
+ NWidget(WWT_PANEL, COLOUR_BROWN, GLAND_BACKGROUND),
+ NWidget(NWID_SPACER), SetMinimalSize(0, 10),
+ /* Landscape selection. */
+ NWidget(NWID_HORIZONTAL), SetPIP(10, 3, 11),
+ NWidget(WWT_IMGBTN_2, COLOUR_ORANGE, GLAND_TEMPERATE), SetMinimalSize(77, 55), SetDataTip(SPR_SELECT_TEMPERATE, STR_030E_SELECT_TEMPERATE_LANDSCAPE),
+ NWidget(WWT_IMGBTN_2, COLOUR_ORANGE, GLAND_ARCTIC), SetMinimalSize(77, 55), SetDataTip(SPR_SELECT_SUB_ARCTIC, STR_030F_SELECT_SUB_ARCTIC_LANDSCAPE),
+ NWidget(WWT_IMGBTN_2, COLOUR_ORANGE, GLAND_TROPICAL), SetMinimalSize(77, 55), SetDataTip(SPR_SELECT_SUB_TROPICAL, STR_0310_SELECT_SUB_TROPICAL_LANDSCAPE),
+ NWidget(WWT_IMGBTN_2, COLOUR_ORANGE, GLAND_TOYLAND), SetMinimalSize(77, 55), SetDataTip(SPR_SELECT_TOYLAND, STR_0311_SELECT_TOYLAND_LANDSCAPE),
+ EndContainer(),
+ NWidget(NWID_SPACER), SetMinimalSize(0, 11),
+ NWidget(NWID_HORIZONTAL),
+ NWidget(NWID_SPACER), SetMinimalSize(12, 0),
+ /* Left column with labels. */
+ NWidget(NWID_VERTICAL),
+ NWidget(NWID_SPACER), SetMinimalSize(0, 1),
+ NWidget(WWT_TEXT, COLOUR_ORANGE, GLAND_MAPSIZE_X_TEXT), SetMinimalSize(99, 11), SetDataTip(STR_MAPSIZE, STR_NULL),
+ NWidget(NWID_SPACER), SetMinimalSize(0, 11),
+ NWidget(WWT_TEXT, COLOUR_ORANGE, GLAND_TOWN_TEXT), SetMinimalSize(99, 11), SetDataTip(STR_NUMBER_OF_TOWNS, STR_NULL),
+ NWidget(NWID_SPACER), SetMinimalSize(0, 7),
+ NWidget(WWT_TEXT, COLOUR_ORANGE, GLAND_INDUSTRY_TEXT), SetMinimalSize(99, 11), SetDataTip(STR_NUMBER_OF_INDUSTRIES, STR_NULL),
+ NWidget(NWID_SPACER), SetMinimalSize(0, 11),
+ NWidget(WWT_TEXT, COLOUR_ORANGE, GLAND_RANDOM_TEXT), SetMinimalSize(99, 11), SetDataTip(STR_RANDOM_SEED, STR_NULL),
+ NWidget(NWID_SPACER), SetMinimalSize(0, 11),
+ NWidget(WWT_TEXT, COLOUR_ORANGE, GLAND_LANDSCAPE_TEXT), SetMinimalSize(99, 11), SetDataTip(STR_LAND_GENERATOR, STR_NULL),
+ NWidget(NWID_SPACER), SetMinimalSize(0, 7),
+ NWidget(WWT_TEXT, COLOUR_ORANGE, GLAND_TREE_TEXT), SetMinimalSize(99, 11), SetDataTip(STR_TREE_PLACER, STR_NULL),
+ NWidget(NWID_SPACER), SetMinimalSize(0, 7),
+ NWidget(WWT_TEXT, COLOUR_ORANGE, GLAND_TERRAIN_TEXT), SetMinimalSize(99, 11), SetDataTip(STR_TERRAIN_TYPE, STR_NULL),
+ NWidget(NWID_SPACER), SetMinimalSize(0, 7),
+ NWidget(WWT_TEXT, COLOUR_ORANGE, GLAND_WATER_TEXT), SetMinimalSize(99, 11), SetDataTip(STR_QUANTITY_OF_SEA_LAKES, STR_NULL),
+ NWidget(NWID_SPACER), SetMinimalSize(0, 7),
+ NWidget(WWT_TEXT, COLOUR_ORANGE, GLAND_SMOOTHNESS_TEXT), SetMinimalSize(99, 11), SetDataTip(STR_SMOOTHNESS, STR_NULL),
+ NWidget(NWID_SPACER), SetMinimalSize(0, 7),
+ NWidget(WWT_TEXT, COLOUR_ORANGE, GLAND_BORDER_TYPES), SetMinimalSize(99, 11), SetDataTip(STR_BORDER_TYPE, STR_NULL),
+ EndContainer(),
+ NWidget(NWID_SPACER), SetMinimalSize(3, 0),
+ /* Widgets at the right of the labels. */
+ NWidget(NWID_VERTICAL),
+ /* Mapsize X * Y. */
+ NWidget(NWID_HORIZONTAL),
+ NWidget(WWT_DROPDOWN, COLOUR_ORANGE, GLAND_MAPSIZE_X_PULLDOWN), SetMinimalSize(48, 12), SetDataTip(STR_NUM_1, STR_NULL),
+ NWidget(NWID_SPACER), SetMinimalSize(6, 0),
+ NWidget(WWT_TEXT, COLOUR_ORANGE, GLAND_MAPSIZE_Y_TEXT), SetMinimalSize(9, 11), SetDataTip(STR_BY, STR_NULL), SetPadding(1, 0, 0, 0),
+ NWidget(NWID_SPACER), SetMinimalSize(3, 0),
+ NWidget(WWT_DROPDOWN, COLOUR_ORANGE, GLAND_MAPSIZE_Y_PULLDOWN), SetMinimalSize(48, 12), SetDataTip(STR_NUM_2, STR_NULL),
+ NWidget(NWID_SPACER), SetFill(1, 0),
+ EndContainer(),
+ NWidget(NWID_SPACER), SetMinimalSize(0, 10), SetFill(1, 0),
+ NWidget(NWID_HORIZONTAL),
+ /* Number of towns. */
+ NWidget(WWT_DROPDOWN, COLOUR_ORANGE, GLAND_TOWN_PULLDOWN), SetMinimalSize(62, 12), SetDataTip(0x0, STR_NULL),
+ NWidget(NWID_SPACER), SetMinimalSize(6, 0),
+ /* Starting date. */
+ NWidget(WWT_TEXT, COLOUR_ORANGE, GLAND_START_DATE_TEXT1), SetMinimalSize(31, 11), SetDataTip(STR_DATE, STR_NULL), SetPadding(1, 0, 0, 0),
+ NWidget(NWID_SPACER), SetMinimalSize(3, 0),
+ NWidget(WWT_IMGBTN, COLOUR_ORANGE, GLAND_START_DATE_DOWN), SetMinimalSize(12, 12), SetDataTip(SPR_ARROW_DOWN, STR_029E_MOVE_THE_STARTING_DATE),
+ NWidget(WWT_TEXTBTN, COLOUR_ORANGE, GLAND_START_DATE_TEXT), SetMinimalSize(87, 12), SetDataTip(STR_GENERATE_DATE, STR_NULL),
+ NWidget(WWT_IMGBTN, COLOUR_ORANGE, GLAND_START_DATE_UP), SetMinimalSize(12, 12), SetDataTip(SPR_ARROW_UP, STR_029F_MOVE_THE_STARTING_DATE),
+ NWidget(NWID_SPACER), SetFill(1, 0),
+ EndContainer(),
+ NWidget(NWID_SPACER), SetMinimalSize(0, 6), SetFill(1, 0),
+ NWidget(NWID_HORIZONTAL),
+ /* Number of industries. */
+ NWidget(WWT_DROPDOWN, COLOUR_ORANGE, GLAND_INDUSTRY_PULLDOWN), SetMinimalSize(62, 12), SetDataTip(0x0, STR_NULL),
+ NWidget(NWID_SPACER), SetMinimalSize(6, 0),
+ /* Snow line. */
+ NWidget(WWT_TEXT, COLOUR_ORANGE, GLAND_SNOW_LEVEL_TEXT1), SetMinimalSize(97, 11),
+ SetDataTip(STR_SNOW_LINE_HEIGHT, STR_NULL), SetPadding(1, 0, 0, 0),
+ NWidget(NWID_SPACER), SetMinimalSize(3, 0),
+ NWidget(WWT_IMGBTN, COLOUR_ORANGE, GLAND_SNOW_LEVEL_DOWN), SetMinimalSize(12, 12), SetDataTip(SPR_ARROW_DOWN, STR_SNOW_LINE_DOWN),
+ NWidget(WWT_TEXTBTN, COLOUR_ORANGE, GLAND_SNOW_LEVEL_TEXT), SetMinimalSize(21, 12), SetDataTip(STR_NUM_3, STR_NULL),
+ NWidget(WWT_IMGBTN, COLOUR_ORANGE, GLAND_SNOW_LEVEL_UP), SetMinimalSize(12, 12), SetDataTip(SPR_ARROW_UP, STR_SNOW_LINE_UP),
+ NWidget(NWID_SPACER), SetFill(1, 0),
+ EndContainer(),
+ NWidget(NWID_SPACER), SetMinimalSize(0, 10), SetFill(1, 0),
+ NWidget(NWID_HORIZONTAL),
+ /* Edit box for seed. */
+ NWidget(WWT_EDITBOX, COLOUR_WHITE, GLAND_RANDOM_EDITBOX), SetMinimalSize(94, 12), SetDataTip(STR_RANDOM_SEED_OSKTITLE, STR_RANDOM_SEED_HELP),
+ NWidget(NWID_SPACER), SetMinimalSize(8, 0),
+ NWidget(WWT_TEXTBTN, COLOUR_ORANGE, GLAND_RANDOM_BUTTON), SetMinimalSize(111, 12), SetDataTip(STR_RANDOM, STR_RANDOM_HELP),
+ NWidget(NWID_SPACER), SetFill(1, 0),
+ EndContainer(),
+ NWidget(NWID_HORIZONTAL),
+ NWidget(NWID_VERTICAL),
+ NWidget(NWID_SPACER), SetMinimalSize(0, 10),
+ /* Dropdown buttons. */
+ NWidget(WWT_DROPDOWN, COLOUR_ORANGE, GLAND_LANDSCAPE_PULLDOWN), SetMinimalSize(118, 12),
+ NWidget(NWID_SPACER), SetMinimalSize(0, 6),
+ NWidget(WWT_DROPDOWN, COLOUR_ORANGE, GLAND_TREE_PULLDOWN), SetMinimalSize(118, 12),
+ NWidget(NWID_SPACER), SetMinimalSize(0, 6),
+ NWidget(WWT_DROPDOWN, COLOUR_ORANGE, GLAND_TERRAIN_PULLDOWN), SetMinimalSize(118, 12),
+ NWidget(NWID_SPACER), SetMinimalSize(0, 6),
+ NWidget(WWT_DROPDOWN, COLOUR_ORANGE, GLAND_WATER_PULLDOWN), SetMinimalSize(118, 12),
+ NWidget(NWID_SPACER), SetMinimalSize(0, 6),
+ NWidget(WWT_DROPDOWN, COLOUR_ORANGE, GLAND_SMOOTHNESS_PULLDOWN), SetMinimalSize(118, 12),
+ NWidget(NWID_SPACER), SetMinimalSize(0, 6),
+ NWidget(WWT_PUSHTXTBTN, COLOUR_ORANGE, GLAND_BORDERS_RANDOM), SetMinimalSize(118, 12), SetDataTip(STR_BORDER_RANDOMIZE, STR_NULL),
+ EndContainer(),
+ NWidget(NWID_VERTICAL),
+ NWidget(WWT_TEXTBTN, COLOUR_GREEN, GLAND_GENERATE_BUTTON), SetMinimalSize(84,30),
+ SetDataTip(STR_GENERATE, STR_NULL), SetPadding(64, 0, 0, 11),
+ NWidget(NWID_SPACER), SetFill(0, 1),
+ EndContainer(),
+ NWidget(NWID_SPACER), SetFill(1, 0),
+ EndContainer(),
+ NWidget(NWID_SPACER), SetFill(1, 1),
+ EndContainer(),
+ EndContainer(),
+ NWidget(NWID_SPACER), SetMinimalSize(0, 4),
+ /* Map borders buttons for each edge. */
+ NWidget(NWID_HORIZONTAL),
+ NWidget(NWID_VERTICAL),
+ NWidget(WWT_TEXT, COLOUR_ORANGE, GLAND_WATER_NW_TEXT), SetMinimalSize(84, 11), SetDataTip(STR_NORTHWEST, STR_NULL), SetPadding(2, 0, 0, 12),
+ NWidget(WWT_TEXT, COLOUR_ORANGE, GLAND_WATER_SW_TEXT), SetMinimalSize(84, 11), SetDataTip(STR_SOUTHWEST, STR_NULL), SetPadding(1, 0, 0, 12),
+ EndContainer(),
+ NWidget(NWID_VERTICAL),
+ NWidget(NWID_HORIZONTAL),
+ NWidget(WWT_PUSHTXTBTN, COLOUR_ORANGE, GLAND_WATER_NW), SetMinimalSize(73, 12), SetDataTip(0x0, STR_NORTHWEST), SetPadding(0, 0, 0, 4),
+ NWidget(WWT_PUSHTXTBTN, COLOUR_ORANGE, GLAND_WATER_NE), SetMinimalSize(73, 12), SetDataTip(0x0, STR_NORTHEAST),
+ EndContainer(),
+ NWidget(NWID_HORIZONTAL),
+ NWidget(WWT_PUSHTXTBTN, COLOUR_ORANGE, GLAND_WATER_SW), SetMinimalSize(73, 12), SetDataTip(0x0, STR_SOUTHWEST), SetPadding(0, 0, 0, 4),
+ NWidget(WWT_PUSHTXTBTN, COLOUR_ORANGE, GLAND_WATER_SE), SetMinimalSize(73, 12), SetDataTip(0x0, STR_SOUTHEAST),
+ EndContainer(),
+ EndContainer(),
+ NWidget(NWID_VERTICAL),
+ NWidget(WWT_TEXT, COLOUR_ORANGE, GLAND_WATER_NE_TEXT), SetMinimalSize(77, 11), SetDataTip(STR_NORTHEAST, STR_NULL), SetPadding(2, 0, 0, 4),
+ NWidget(WWT_TEXT, COLOUR_ORANGE, GLAND_WATER_SE_TEXT), SetMinimalSize(77, 11), SetDataTip(STR_SOUTHEAST, STR_NULL), SetPadding(1, 0, 0, 4),
+ EndContainer(),
+ NWidget(NWID_SPACER), SetFill(1, 0),
+ EndContainer(),
+ NWidget(NWID_SPACER), SetMinimalSize(0, 9),
+ EndContainer(),
+};
+
static const Widget _heightmap_load_widgets[] = {
{ WWT_CLOSEBOX, RESIZE_NONE, COLOUR_BROWN, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, // GLAND_CLOSEBOX
{ WWT_CAPTION, RESIZE_NONE, COLOUR_BROWN, 11, 337, 0, 13, STR_WORLD_GENERATION_CAPTION, STR_NULL}, // GLAND_TITLEBAR
@@ -249,6 +389,109 @@ static const Widget _heightmap_load_widgets[] = {
{ WIDGETS_END},
};
+static const NWidgetPart _nested_heightmap_load_widgets[] = {
+ /* Window header. */
+ NWidget(NWID_HORIZONTAL),
+ NWidget(WWT_CLOSEBOX, COLOUR_BROWN, GLAND_CLOSEBOX),
+ NWidget(WWT_CAPTION, COLOUR_BROWN, GLAND_TITLEBAR), SetDataTip(STR_WORLD_GENERATION_CAPTION, STR_NULL),
+ EndContainer(),
+ NWidget(WWT_PANEL, COLOUR_BROWN, GLAND_BACKGROUND),
+ NWidget(NWID_SPACER), SetMinimalSize(0, 10),
+ /* Landscape selection. */
+ NWidget(NWID_HORIZONTAL), SetPIP(10, 3, 11),
+ NWidget(WWT_IMGBTN_2, COLOUR_ORANGE, GLAND_TEMPERATE), SetMinimalSize(77, 55), SetDataTip(SPR_SELECT_TEMPERATE, STR_030E_SELECT_TEMPERATE_LANDSCAPE),
+ NWidget(WWT_IMGBTN_2, COLOUR_ORANGE, GLAND_ARCTIC), SetMinimalSize(77, 55), SetDataTip(SPR_SELECT_SUB_ARCTIC, STR_030F_SELECT_SUB_ARCTIC_LANDSCAPE),
+ NWidget(WWT_IMGBTN_2, COLOUR_ORANGE, GLAND_TROPICAL), SetMinimalSize(77, 55), SetDataTip(SPR_SELECT_SUB_TROPICAL, STR_0310_SELECT_SUB_TROPICAL_LANDSCAPE),
+ NWidget(WWT_IMGBTN_2, COLOUR_ORANGE, GLAND_TOYLAND), SetMinimalSize(77, 55), SetDataTip(SPR_SELECT_TOYLAND, STR_0311_SELECT_TOYLAND_LANDSCAPE),
+ EndContainer(),
+ NWidget(NWID_SPACER), SetMinimalSize(0, 33), SetFill(0,1),
+ NWidget(NWID_HORIZONTAL),
+ NWidget(NWID_SPACER), SetMinimalSize(12, 0),
+ /* Labels at the left side. */
+ NWidget(NWID_VERTICAL),
+ NWidget(NWID_SPACER), SetMinimalSize(0, 1),
+ NWidget(WWT_TEXT, COLOUR_ORANGE, GLAND_MAPSIZE_X_TEXT), SetMinimalSize(99, 11), SetDataTip(STR_MAPSIZE, STR_NULL),
+ NWidget(NWID_SPACER), SetMinimalSize(0, 11),
+ NWidget(WWT_TEXT, COLOUR_ORANGE, GLAND_TOWN_TEXT), SetMinimalSize(99, 11), SetDataTip(STR_NUMBER_OF_TOWNS, STR_NULL),
+ NWidget(NWID_SPACER), SetMinimalSize(0, 7),
+ NWidget(WWT_TEXT, COLOUR_ORANGE, GLAND_INDUSTRY_TEXT), SetMinimalSize(99, 11), SetDataTip(STR_NUMBER_OF_INDUSTRIES, STR_NULL),
+ NWidget(NWID_SPACER), SetMinimalSize(0, 11),
+ NWidget(WWT_TEXT, COLOUR_ORANGE, GLAND_RANDOM_TEXT), SetMinimalSize(99, 11), SetDataTip(STR_RANDOM_SEED, STR_NULL),
+ NWidget(NWID_SPACER), SetMinimalSize(0, 11),
+ NWidget(WWT_TEXT, COLOUR_ORANGE, GLAND_TREE_TEXT), SetMinimalSize(99, 11), SetDataTip(STR_TREE_PLACER, STR_NULL),
+ NWidget(NWID_SPACER), SetMinimalSize(0, 7),
+ NWidget(WWT_TEXT, COLOUR_ORANGE, GLAND_HEIGHTMAP_ROTATION_TEXT), SetMinimalSize(99, 11), SetDataTip(STR_HEIGHTMAP_ROTATION, STR_NULL),
+ NWidget(NWID_SPACER), SetMinimalSize(0, 10),
+ NWidget(NWID_SPACER), SetFill(0, 1),
+ EndContainer(),
+ NWidget(NWID_SPACER), SetMinimalSize(3, 0),
+ /* Widgets at the right of the labels. */
+ NWidget(NWID_VERTICAL),
+ /* Mapsize X * Y. */
+ NWidget(NWID_HORIZONTAL),
+ NWidget(WWT_DROPDOWN, COLOUR_ORANGE, GLAND_MAPSIZE_X_PULLDOWN), SetMinimalSize(48, 12), SetDataTip(STR_NUM_1, STR_NULL),
+ NWidget(NWID_SPACER), SetMinimalSize(6, 0),
+ NWidget(WWT_TEXT, COLOUR_ORANGE, GLAND_MAPSIZE_Y_TEXT), SetMinimalSize(9, 11), SetDataTip(STR_BY, STR_NULL), SetPadding(1, 0, 0, 0),
+ NWidget(NWID_SPACER), SetMinimalSize(3, 0),
+ NWidget(WWT_DROPDOWN, COLOUR_ORANGE, GLAND_MAPSIZE_Y_PULLDOWN), SetMinimalSize(48, 12), SetDataTip(STR_NUM_2, STR_NULL),
+ NWidget(NWID_SPACER), SetFill(1, 0),
+ EndContainer(),
+ NWidget(NWID_SPACER), SetMinimalSize(0, 10),
+ NWidget(NWID_HORIZONTAL),
+ /* Number of towns. */
+ NWidget(WWT_DROPDOWN, COLOUR_ORANGE, GLAND_TOWN_PULLDOWN), SetMinimalSize(62, 12), SetDataTip(0x0, STR_NULL),
+ NWidget(NWID_SPACER), SetMinimalSize(6, 0),
+ /* Starting date. */
+ NWidget(WWT_TEXT, COLOUR_ORANGE, GLAND_START_DATE_TEXT1), SetMinimalSize(31, 11), SetDataTip(STR_DATE, STR_NULL), SetPadding(1, 0, 0, 0),
+ NWidget(NWID_SPACER), SetMinimalSize(3, 0),
+ NWidget(WWT_IMGBTN, COLOUR_ORANGE, GLAND_START_DATE_DOWN), SetMinimalSize(12, 12), SetDataTip(SPR_ARROW_DOWN, STR_029E_MOVE_THE_STARTING_DATE),
+ NWidget(WWT_TEXTBTN, COLOUR_ORANGE, GLAND_START_DATE_TEXT), SetMinimalSize(87, 12), SetDataTip(STR_GENERATE_DATE, STR_NULL),
+ NWidget(WWT_IMGBTN, COLOUR_ORANGE, GLAND_START_DATE_UP), SetMinimalSize(12, 12), SetDataTip(SPR_ARROW_UP, STR_029F_MOVE_THE_STARTING_DATE),
+ NWidget(NWID_SPACER), SetFill(1, 0),
+ EndContainer(),
+ NWidget(NWID_SPACER), SetMinimalSize(0, 6),
+ NWidget(NWID_HORIZONTAL),
+ /* Number of industries. */
+ NWidget(WWT_DROPDOWN, COLOUR_ORANGE, GLAND_INDUSTRY_PULLDOWN), SetMinimalSize(62, 12), SetDataTip(0x0, STR_NULL),
+ NWidget(NWID_SPACER), SetMinimalSize(6, 0),
+ /* Snow line. */
+ NWidget(WWT_TEXT, COLOUR_ORANGE, GLAND_SNOW_LEVEL_TEXT1), SetMinimalSize(97, 11),
+ SetDataTip(STR_SNOW_LINE_HEIGHT, STR_NULL), SetPadding(1, 0, 0, 0),
+ NWidget(NWID_SPACER), SetMinimalSize(3, 0),
+ NWidget(WWT_IMGBTN, COLOUR_ORANGE, GLAND_SNOW_LEVEL_DOWN), SetMinimalSize(12, 12), SetDataTip(SPR_ARROW_DOWN, STR_SNOW_LINE_DOWN),
+ NWidget(WWT_TEXTBTN, COLOUR_ORANGE, GLAND_SNOW_LEVEL_TEXT), SetMinimalSize(21, 12), SetDataTip(STR_NUM_3, STR_NULL),
+ NWidget(WWT_IMGBTN, COLOUR_ORANGE, GLAND_SNOW_LEVEL_UP), SetMinimalSize(12, 12), SetDataTip(SPR_ARROW_UP, STR_SNOW_LINE_UP),
+ NWidget(NWID_SPACER), SetFill(1, 0),
+ EndContainer(),
+ NWidget(NWID_SPACER), SetMinimalSize(0, 10),
+ NWidget(NWID_HORIZONTAL),
+ /* Edit box for seed. */
+ NWidget(WWT_EDITBOX, COLOUR_WHITE, GLAND_RANDOM_EDITBOX), SetMinimalSize(94, 12), SetDataTip(STR_RANDOM_SEED_OSKTITLE, STR_RANDOM_SEED_HELP),
+ NWidget(NWID_SPACER), SetMinimalSize(8, 0),
+ NWidget(WWT_TEXTBTN, COLOUR_ORANGE, GLAND_RANDOM_BUTTON), SetMinimalSize(111, 12), SetDataTip(STR_RANDOM, STR_RANDOM_HELP),
+ NWidget(NWID_SPACER), SetFill(1, 0),
+ EndContainer(),
+ NWidget(NWID_SPACER), SetMinimalSize(0, 10),
+ NWidget(NWID_HORIZONTAL),
+ NWidget(NWID_VERTICAL),
+ /* Tree placer. */
+ NWidget(WWT_DROPDOWN, COLOUR_ORANGE, GLAND_TREE_PULLDOWN), SetMinimalSize(118, 12), SetDataTip(STR_0225, STR_NULL),
+ NWidget(NWID_SPACER), SetMinimalSize(0, 6),
+ /* Heightmap rotation. */
+ NWidget(WWT_DROPDOWN, COLOUR_ORANGE, GLAND_HEIGHTMAP_ROTATION_PULLDOWN), SetMinimalSize(118, 12), SetDataTip(STR_0225, STR_NULL),
+ EndContainer(),
+ NWidget(NWID_SPACER), SetMinimalSize(11, 0),
+ /* Generate button. */
+ NWidget(WWT_TEXTBTN, COLOUR_GREEN, GLAND_GENERATE_BUTTON), SetMinimalSize(84, 30), SetDataTip(STR_GENERATE, STR_NULL),
+ NWidget(NWID_SPACER), SetFill(1, 0),
+ EndContainer(),
+ NWidget(NWID_SPACER), SetFill(0, 1),
+ EndContainer(),
+ NWidget(NWID_SPACER), SetFill(1, 0),
+ EndContainer(),
+ EndContainer(),
+};
+
void StartGeneratingLandscape(glwp_modes mode)
{
DeleteAllNonVitalWindows();
@@ -642,14 +885,14 @@ static const WindowDesc _generate_landscape_desc(
WDP_CENTER, WDP_CENTER, 338, 313, 338, 313,
WC_GENERATE_LANDSCAPE, WC_NONE,
WDF_STD_TOOLTIPS | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS,
- _generate_landscape_widgets
+ _generate_landscape_widgets, _nested_generate_landscape_widgets, lengthof(_nested_generate_landscape_widgets)
);
static const WindowDesc _heightmap_load_desc(
WDP_CENTER, WDP_CENTER, 338, 236, 338, 236,
WC_GENERATE_LANDSCAPE, WC_NONE,
WDF_STD_TOOLTIPS | WDF_DEF_WIDGET | WDF_STD_BTN | WDF_UNCLICK_BUTTONS,
- _heightmap_load_widgets
+ _heightmap_load_widgets, _nested_heightmap_load_widgets, lengthof(_nested_heightmap_load_widgets)
);
static void _ShowGenerateLandscape(glwp_modes mode)