Codechange: Use std::initializer_list for NWidgetPart data. (#14749)
Avoids using C/C++ arrays.
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
|
||||
|
||||
/** Widgets for the configure AI window. */
|
||||
static constexpr NWidgetPart _nested_ai_config_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_ai_config_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_MAUVE),
|
||||
NWidget(WWT_CAPTION, COLOUR_MAUVE), SetStringTip(STR_AI_CONFIG_CAPTION_AI, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
|
||||
@@ -205,7 +205,7 @@ struct BuildAirToolbarWindow : Window {
|
||||
}, AirportToolbarGlobalHotkeys};
|
||||
};
|
||||
|
||||
static constexpr NWidgetPart _nested_air_toolbar_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_air_toolbar_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
|
||||
NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetStringTip(STR_TOOLBAR_AIRCRAFT_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
@@ -590,7 +590,7 @@ public:
|
||||
}};
|
||||
};
|
||||
|
||||
static constexpr NWidgetPart _nested_build_airport_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_build_airport_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
|
||||
NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetStringTip(STR_STATION_BUILD_AIRPORT_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
|
||||
@@ -720,7 +720,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
static constexpr NWidgetPart _nested_replace_rail_vehicle_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_replace_rail_vehicle_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY, WID_RV_CAPTION),
|
||||
@@ -784,7 +784,7 @@ static WindowDesc _replace_rail_vehicle_desc(
|
||||
_nested_replace_rail_vehicle_widgets
|
||||
);
|
||||
|
||||
static constexpr NWidgetPart _nested_replace_road_vehicle_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_replace_road_vehicle_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY, WID_RV_CAPTION),
|
||||
@@ -842,7 +842,7 @@ static WindowDesc _replace_road_vehicle_desc(
|
||||
_nested_replace_road_vehicle_widgets
|
||||
);
|
||||
|
||||
static constexpr NWidgetPart _nested_replace_vehicle_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_replace_vehicle_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY, WID_RV_CAPTION), SetMinimalSize(433, 14),
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#include "safeguards.h"
|
||||
|
||||
/** Widgets for the background window to prevent smearing. */
|
||||
static constexpr NWidgetPart _background_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _background_widgets = {
|
||||
NWidget(WWT_PANEL, COLOUR_DARK_BLUE, WID_BB_BACKGROUND), SetResize(1, 1),
|
||||
EndContainer(),
|
||||
};
|
||||
@@ -66,7 +66,7 @@ public:
|
||||
};
|
||||
|
||||
/** Nested widgets for the error window. */
|
||||
static constexpr NWidgetPart _nested_bootstrap_errmsg_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_bootstrap_errmsg_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY, WID_BEM_CAPTION), SetStringTip(STR_MISSING_GRAPHICS_ERROR_TITLE),
|
||||
EndContainer(),
|
||||
@@ -123,7 +123,7 @@ public:
|
||||
};
|
||||
|
||||
/** Nested widgets for the download window. */
|
||||
static constexpr NWidgetPart _nested_bootstrap_download_status_window_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_bootstrap_download_status_window_widgets = {
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY), SetStringTip(STR_CONTENT_DOWNLOAD_TITLE, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
NWidget(WWT_PANEL, COLOUR_GREY),
|
||||
NWidget(NWID_VERTICAL), SetPIP(0, WidgetDimensions::unscaled.vsep_wide, 0), SetPadding(WidgetDimensions::unscaled.modalpopup),
|
||||
@@ -174,7 +174,7 @@ public:
|
||||
};
|
||||
|
||||
/** The widgets for the query. It has no close box as that sprite does not exist yet. */
|
||||
static constexpr NWidgetPart _bootstrap_query_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _bootstrap_query_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY), SetStringTip(STR_MISSING_GRAPHICS_SET_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
EndContainer(),
|
||||
|
||||
@@ -314,7 +314,7 @@ const std::initializer_list<GUIBridgeList::SortFunction * const> BuildBridgeWind
|
||||
};
|
||||
|
||||
/** Widgets of the bridge gui. */
|
||||
static constexpr NWidgetPart _nested_build_bridge_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_build_bridge_widgets = {
|
||||
/* Header */
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
|
||||
|
||||
@@ -61,7 +61,7 @@ uint GetEngineListHeight(VehicleType type)
|
||||
return std::max<uint>(GetCharacterHeight(FS_NORMAL) + WidgetDimensions::scaled.matrix.Vertical(), GetVehicleImageCellSize(type, EIT_PURCHASE).height);
|
||||
}
|
||||
|
||||
static constexpr NWidgetPart _nested_build_vehicle_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_build_vehicle_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY, WID_BV_CAPTION), SetTextStyle(TC_WHITE),
|
||||
|
||||
@@ -219,7 +219,7 @@ static const CheatEntry _cheats_ui[] = {
|
||||
static_assert(CHT_NUM_CHEATS == lengthof(_cheats_ui));
|
||||
|
||||
/** Widget definitions of the cheat GUI. */
|
||||
static constexpr NWidgetPart _nested_cheat_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_cheat_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY), SetStringTip(STR_CHEATS, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
|
||||
@@ -289,7 +289,7 @@ static void DrawYearColumn(const Rect &r, TimerGameEconomy::Year year, const Exp
|
||||
DrawPrice(sum, r.left, r.right, y, TC_WHITE);
|
||||
}
|
||||
|
||||
static constexpr NWidgetPart _nested_company_finances_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_company_finances_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY, WID_CF_CAPTION),
|
||||
@@ -1065,7 +1065,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
static constexpr NWidgetPart _nested_select_company_livery_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_select_company_livery_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY, WID_SCL_CAPTION),
|
||||
@@ -1164,7 +1164,7 @@ void DrawCompanyManagerFace(const CompanyManagerFace &cmf, Colours colour, const
|
||||
}
|
||||
|
||||
/** Nested widget description for the company manager face selection dialog */
|
||||
static constexpr NWidgetPart _nested_select_company_manager_face_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_select_company_manager_face_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY, WID_SCMF_CAPTION), SetStringTip(STR_FACE_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
@@ -1539,7 +1539,7 @@ static void DoSelectCompanyManagerFace(Window *parent)
|
||||
new SelectCompanyManagerFaceWindow(_select_company_manager_face_desc, parent);
|
||||
}
|
||||
|
||||
static constexpr NWidgetPart _nested_company_infrastructure_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_company_infrastructure_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY, WID_CI_CAPTION),
|
||||
@@ -1843,7 +1843,7 @@ static void ShowCompanyInfrastructure(CompanyID company)
|
||||
AllocateWindowDescFront<CompanyInfrastructureWindow>(_company_infrastructure_desc, company);
|
||||
}
|
||||
|
||||
static constexpr NWidgetPart _nested_company_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_company_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY, WID_C_CAPTION),
|
||||
@@ -2462,7 +2462,7 @@ private:
|
||||
Money company_value{}; ///< The value of the company for which the user can buy it.
|
||||
};
|
||||
|
||||
static constexpr NWidgetPart _nested_buy_company_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_buy_company_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_LIGHT_BLUE),
|
||||
NWidget(WWT_CAPTION, COLOUR_LIGHT_BLUE, WID_BC_CAPTION),
|
||||
|
||||
@@ -133,7 +133,7 @@ static inline void IConsoleResetHistoryPos()
|
||||
static std::optional<std::string_view> IConsoleHistoryAdd(std::string_view cmd);
|
||||
static void IConsoleHistoryNavigate(int direction);
|
||||
|
||||
static constexpr NWidgetPart _nested_console_window_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_console_window_widgets = {
|
||||
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_C_BACKGROUND), SetResize(1, 1),
|
||||
};
|
||||
|
||||
|
||||
@@ -173,7 +173,7 @@ struct SetDateWindow : Window {
|
||||
};
|
||||
|
||||
/** Widgets for the date setting window. */
|
||||
static constexpr NWidgetPart _nested_set_date_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_set_date_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_BROWN),
|
||||
NWidget(WWT_CAPTION, COLOUR_BROWN), SetStringTip(STR_DATE_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
*/
|
||||
|
||||
/** Nested widget definition for train depots. */
|
||||
static constexpr NWidgetPart _nested_train_depot_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_train_depot_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(NWID_SELECTION, INVALID_COLOUR, WID_D_SHOW_RENAME), SetAspect(WidgetDimensions::ASPECT_RENAME), // rename button
|
||||
|
||||
@@ -350,7 +350,7 @@ struct BuildDocksToolbarWindow : Window {
|
||||
* Nested widget parts of docks toolbar, game version.
|
||||
* Position of #WID_DT_RIVER widget has changed.
|
||||
*/
|
||||
static constexpr NWidgetPart _nested_build_docks_toolbar_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_build_docks_toolbar_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
|
||||
NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetStringTip(STR_WATERWAYS_TOOLBAR_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
@@ -395,7 +395,7 @@ Window *ShowBuildDocksToolbar()
|
||||
* Nested widget parts of docks toolbar, scenario editor version.
|
||||
* Positions of #WID_DT_DEPOT, #WID_DT_STATION, and #WID_DT_BUOY widgets have changed.
|
||||
*/
|
||||
static constexpr NWidgetPart _nested_build_docks_scen_toolbar_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_build_docks_scen_toolbar_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
|
||||
NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetStringTip(STR_WATERWAYS_TOOLBAR_CAPTION_SE, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
@@ -501,7 +501,7 @@ public:
|
||||
};
|
||||
|
||||
/** Nested widget parts of a build dock station window. */
|
||||
static constexpr NWidgetPart _nested_build_dock_station_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_build_dock_station_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
|
||||
NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetStringTip(STR_STATION_BUILD_DOCK_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
@@ -602,7 +602,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
static constexpr NWidgetPart _nested_build_docks_depot_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_build_docks_depot_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
|
||||
NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetStringTip(STR_DEPOT_BUILD_SHIP_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
|
||||
@@ -61,7 +61,7 @@ std::unique_ptr<DropDownListItem> MakeDropDownListCheckedItem(bool checked, Stri
|
||||
return std::make_unique<DropDownListCheckedItem>(indent, checked, GetString(str), value, masked, shaded);
|
||||
}
|
||||
|
||||
static constexpr NWidgetPart _nested_dropdown_menu_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_dropdown_menu_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_PANEL, COLOUR_END, WID_DM_ITEMS), SetScrollbar(WID_DM_SCROLL), EndContainer(),
|
||||
NWidget(NWID_SELECTION, INVALID_COLOUR, WID_DM_SHOW_SCROLL),
|
||||
|
||||
@@ -54,7 +54,7 @@ StringID GetEngineCategoryName(EngineID engine)
|
||||
}
|
||||
}
|
||||
|
||||
static constexpr NWidgetPart _nested_engine_preview_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_engine_preview_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_LIGHT_BLUE),
|
||||
NWidget(WWT_CAPTION, COLOUR_LIGHT_BLUE), SetStringTip(STR_ENGINE_PREVIEW_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
#include "safeguards.h"
|
||||
|
||||
static constexpr NWidgetPart _nested_errmsg_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_errmsg_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_RED),
|
||||
NWidget(WWT_CAPTION, COLOUR_RED, WID_EM_CAPTION), SetStringTip(STR_ERROR_MESSAGE_CAPTION),
|
||||
@@ -50,7 +50,7 @@ static WindowDesc _errmsg_desc(
|
||||
_nested_errmsg_widgets
|
||||
);
|
||||
|
||||
static constexpr NWidgetPart _nested_errmsg_face_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_errmsg_face_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_RED),
|
||||
NWidget(WWT_CAPTION, COLOUR_RED, WID_EM_CAPTION),
|
||||
|
||||
@@ -65,7 +65,7 @@ void LoadCheckData::Clear()
|
||||
}
|
||||
|
||||
/** Load game/scenario with optional content download */
|
||||
static constexpr NWidgetPart _nested_load_dialog_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_load_dialog_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY, WID_SL_CAPTION),
|
||||
@@ -128,7 +128,7 @@ static constexpr NWidgetPart _nested_load_dialog_widgets[] = {
|
||||
};
|
||||
|
||||
/** Load heightmap with content download */
|
||||
static constexpr NWidgetPart _nested_load_heightmap_dialog_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_load_heightmap_dialog_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY, WID_SL_CAPTION),
|
||||
@@ -175,7 +175,7 @@ static constexpr NWidgetPart _nested_load_heightmap_dialog_widgets[] = {
|
||||
};
|
||||
|
||||
/** Load town data */
|
||||
static constexpr NWidgetPart _nested_load_town_data_dialog_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_load_town_data_dialog_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY, WID_SL_CAPTION),
|
||||
@@ -217,7 +217,7 @@ static constexpr NWidgetPart _nested_load_town_data_dialog_widgets[] = {
|
||||
};
|
||||
|
||||
/** Save game/scenario */
|
||||
static constexpr NWidgetPart _nested_save_dialog_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_save_dialog_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY, WID_SL_CAPTION),
|
||||
|
||||
@@ -377,7 +377,7 @@ static std::string_view GetAIName(int ai_index)
|
||||
}
|
||||
|
||||
/** @hideinitializer */
|
||||
static constexpr NWidgetPart _framerate_window_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _framerate_window_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY, WID_FRW_CAPTION),
|
||||
@@ -695,7 +695,7 @@ static WindowDesc _framerate_display_desc(
|
||||
|
||||
|
||||
/** @hideinitializer */
|
||||
static constexpr NWidgetPart _frametime_graph_window_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _frametime_graph_window_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY, WID_FGW_CAPTION), SetTextStyle(TC_WHITE),
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
|
||||
/** Widgets for the configure GS window. */
|
||||
static constexpr NWidgetPart _nested_gs_config_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_gs_config_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_MAUVE),
|
||||
NWidget(WWT_CAPTION, COLOUR_MAUVE), SetStringTip(STR_AI_CONFIG_CAPTION_GAMESCRIPT, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
|
||||
@@ -74,7 +74,7 @@ void SetNewLandscapeType(LandscapeType landscape)
|
||||
}
|
||||
|
||||
/** Widgets of GenerateLandscapeWindow when generating world */
|
||||
static constexpr NWidgetPart _nested_generate_landscape_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_generate_landscape_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_BROWN),
|
||||
NWidget(WWT_CAPTION, COLOUR_BROWN), SetStringTip(STR_MAPGEN_WORLD_GENERATION_CAPTION),
|
||||
@@ -198,7 +198,7 @@ static constexpr NWidgetPart _nested_generate_landscape_widgets[] = {
|
||||
};
|
||||
|
||||
/** Widgets of GenerateLandscapeWindow when loading heightmap */
|
||||
static constexpr NWidgetPart _nested_heightmap_load_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_heightmap_load_widgets = {
|
||||
/* Window header. */
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_BROWN),
|
||||
@@ -1244,7 +1244,7 @@ struct CreateScenarioWindow : public Window
|
||||
}
|
||||
};
|
||||
|
||||
static constexpr NWidgetPart _nested_create_scenario_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_create_scenario_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_BROWN),
|
||||
NWidget(WWT_CAPTION, COLOUR_BROWN), SetStringTip(STR_SE_MAPGEN_CAPTION),
|
||||
@@ -1317,7 +1317,7 @@ void ShowCreateScenario()
|
||||
new CreateScenarioWindow(_create_scenario_desc, GLWM_SCENARIO);
|
||||
}
|
||||
|
||||
static constexpr NWidgetPart _nested_generate_progress_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_generate_progress_widgets = {
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY), SetStringTip(STR_GENERATION_WORLD, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
NWidget(WWT_PANEL, COLOUR_GREY),
|
||||
NWidget(NWID_VERTICAL), SetPIP(0, WidgetDimensions::unscaled.vsep_wide, 0), SetPadding(WidgetDimensions::unscaled.modalpopup),
|
||||
|
||||
@@ -277,7 +277,7 @@ struct GoalListWindow : public Window {
|
||||
};
|
||||
|
||||
/** Widgets of the #GoalListWindow. */
|
||||
static constexpr NWidgetPart _nested_goals_list_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_goals_list_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_BROWN),
|
||||
NWidget(WWT_CAPTION, COLOUR_BROWN, WID_GOAL_CAPTION),
|
||||
|
||||
@@ -181,7 +181,7 @@ static std::unique_ptr<NWidgetBase> MakeNWidgetCompanyLines()
|
||||
return vert;
|
||||
}
|
||||
|
||||
static /* CM constexpr */ NWidgetPart _nested_graph_legend_widgets[] = {
|
||||
static NWidgetPart _nested_graph_legend_widgets[] = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_BROWN),
|
||||
NWidget(WWT_CAPTION, COLOUR_BROWN), SetStringTip(STR_GRAPH_KEY_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
@@ -1156,7 +1156,7 @@ struct OperatingProfitGraphWindow : BaseCompanyGraphWindow {
|
||||
}
|
||||
};
|
||||
|
||||
static /* CM constexpr */ NWidgetPart _nested_operating_profit_widgets[] = {
|
||||
static NWidgetPart _nested_operating_profit_widgets[] = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_BROWN),
|
||||
NWidget(WWT_CAPTION, COLOUR_BROWN), SetStringTip(STR_GRAPH_OPERATING_PROFIT_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
@@ -1227,7 +1227,7 @@ struct IncomeGraphWindow : citymania::BaseCompanyCargoGraphWindow {
|
||||
|
||||
};
|
||||
|
||||
static /* CM constexpr */ NWidgetPart _nested_income_graph_widgets[] = {
|
||||
static NWidgetPart _nested_income_graph_widgets[] = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_BROWN),
|
||||
NWidget(WWT_CAPTION, COLOUR_BROWN), SetStringTip(STR_GRAPH_INCOME_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
@@ -1316,7 +1316,7 @@ struct DeliveredCargoGraphWindow : citymania::BaseCompanyCargoGraphWindow {
|
||||
}
|
||||
};
|
||||
|
||||
static /* CM constexpr */ NWidgetPart _nested_delivered_cargo_graph_widgets[] = {
|
||||
static NWidgetPart _nested_delivered_cargo_graph_widgets[] = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_BROWN),
|
||||
NWidget(WWT_CAPTION, COLOUR_BROWN), SetStringTip(STR_GRAPH_CARGO_DELIVERED_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
@@ -1393,7 +1393,7 @@ struct PerformanceHistoryGraphWindow : BaseCompanyGraphWindow {
|
||||
}
|
||||
};
|
||||
|
||||
static /* CM constexpr */ NWidgetPart _nested_performance_history_widgets[] = {
|
||||
static NWidgetPart _nested_performance_history_widgets[] = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_BROWN),
|
||||
NWidget(WWT_CAPTION, COLOUR_BROWN), SetStringTip(STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
@@ -1446,7 +1446,7 @@ struct CompanyValueGraphWindow : BaseCompanyGraphWindow {
|
||||
}
|
||||
};
|
||||
|
||||
static /* CM constexpr */ NWidgetPart _nested_company_value_graph_widgets[] = {
|
||||
static NWidgetPart _nested_company_value_graph_widgets[] = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_BROWN),
|
||||
NWidget(WWT_CAPTION, COLOUR_BROWN), SetStringTip(STR_GRAPH_COMPANY_VALUES_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
@@ -1712,7 +1712,7 @@ struct PaymentRatesGraphWindow : BaseCargoGraphWindow {
|
||||
}
|
||||
};
|
||||
|
||||
static /* CM constexpr */ NWidgetPart _nested_cargo_payment_rates_widgets[] = {
|
||||
static NWidgetPart _nested_cargo_payment_rates_widgets[] = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_BROWN),
|
||||
NWidget(WWT_CAPTION, COLOUR_BROWN), SetStringTip(STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
@@ -2118,7 +2118,7 @@ struct IndustryProductionGraphWindow : BaseCargoGraphWindow {
|
||||
}
|
||||
};
|
||||
|
||||
static /* constexpr */ NWidgetPart _nested_industry_production_widgets[] = {
|
||||
static NWidgetPart _nested_industry_production_widgets[] = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_BROWN),
|
||||
NWidget(WWT_CAPTION, COLOUR_BROWN, WID_GRAPH_CAPTION),
|
||||
@@ -2263,7 +2263,7 @@ struct TownCargoGraphWindow : BaseCargoGraphWindow {
|
||||
}
|
||||
};
|
||||
|
||||
static /* CM constexpr */ NWidgetPart _nested_town_cargo_graph_widgets[] = {
|
||||
static NWidgetPart _nested_town_cargo_graph_widgets[] = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_BROWN),
|
||||
NWidget(WWT_CAPTION, COLOUR_BROWN, WID_GRAPH_CAPTION),
|
||||
@@ -2349,7 +2349,7 @@ std::unique_ptr<NWidgetBase> MakeCompanyButtonRowsGraphGUI()
|
||||
return MakeCompanyButtonRows(WID_PRD_COMPANY_FIRST, WID_PRD_COMPANY_LAST, CM_WINDOW_BG, 8, STR_PERFORMANCE_DETAIL_SELECT_COMPANY_TOOLTIP);
|
||||
}
|
||||
|
||||
static /* CM constexpr */ NWidgetPart _nested_performance_rating_detail_widgets[] = {
|
||||
static NWidgetPart _nested_performance_rating_detail_widgets[] = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_BROWN),
|
||||
NWidget(WWT_CAPTION, COLOUR_BROWN), SetStringTip(STR_PERFORMANCE_DETAIL, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
#include "safeguards.h"
|
||||
|
||||
static constexpr NWidgetPart _nested_group_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_group_widgets = {
|
||||
NWidget(NWID_HORIZONTAL), // Window header
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY, WID_GL_CAPTION),
|
||||
|
||||
@@ -175,7 +175,7 @@ private:
|
||||
}
|
||||
};
|
||||
|
||||
static constexpr NWidgetPart _nested_helpwin_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_helpwin_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
|
||||
NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetStringTip(STR_HELP_WINDOW_CAPTION),
|
||||
|
||||
@@ -217,7 +217,7 @@ struct HighScoreWindow : EndGameHighScoreBaseWindow {
|
||||
}
|
||||
};
|
||||
|
||||
static constexpr NWidgetPart _nested_highscore_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_highscore_widgets = {
|
||||
NWidget(WWT_PANEL, COLOUR_BROWN, WID_H_BACKGROUND), SetResize(1, 1), EndContainer(),
|
||||
};
|
||||
|
||||
|
||||
@@ -268,7 +268,7 @@ void SortIndustryTypes()
|
||||
std::sort(_sorted_industry_types.begin(), _sorted_industry_types.end(), IndustryTypeNameSorter);
|
||||
}
|
||||
|
||||
static constexpr NWidgetPart _nested_build_industry_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_build_industry_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
|
||||
NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetStringTip(STR_FUND_INDUSTRY_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
@@ -1300,7 +1300,7 @@ static void UpdateIndustryProduction(Industry *i)
|
||||
}
|
||||
|
||||
/** Widget definition of the view industry gui */
|
||||
static constexpr NWidgetPart _nested_industry_view_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_industry_view_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_CREAM),
|
||||
NWidget(WWT_CAPTION, COLOUR_CREAM, WID_IV_CAPTION),
|
||||
@@ -1338,7 +1338,7 @@ void ShowIndustryViewWindow(IndustryID industry)
|
||||
}
|
||||
|
||||
/** Widget definition of the industry directory gui */
|
||||
static constexpr NWidgetPart _nested_industry_directory_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_industry_directory_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_BROWN),
|
||||
NWidget(WWT_CAPTION, COLOUR_BROWN, WID_ID_CAPTION),
|
||||
@@ -2027,7 +2027,7 @@ void ShowIndustryDirectory()
|
||||
}
|
||||
|
||||
/** Widgets of the industry cargoes window. */
|
||||
static constexpr NWidgetPart _nested_industry_cargoes_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_industry_cargoes_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_BROWN),
|
||||
NWidget(WWT_CAPTION, COLOUR_BROWN, WID_IC_CAPTION),
|
||||
|
||||
@@ -345,7 +345,7 @@ struct SelectGameWindow : public Window {
|
||||
}
|
||||
};
|
||||
|
||||
static constexpr NWidgetPart _nested_select_game_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_select_game_widgets = {
|
||||
NWidget(WWT_CAPTION, COLOUR_BROWN), SetStringTip(STR_INTRO_CAPTION),
|
||||
NWidget(WWT_PANEL, COLOUR_BROWN),
|
||||
NWidget(NWID_VERTICAL), SetPIP(0, WidgetDimensions::unscaled.vsep_wide, 0), SetPadding(WidgetDimensions::unscaled.sparse),
|
||||
|
||||
@@ -182,7 +182,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
static constexpr NWidgetPart _nested_performance_league_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_performance_league_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_BROWN),
|
||||
NWidget(WWT_CAPTION, COLOUR_BROWN), SetStringTip(STR_COMPANY_LEAGUE_TABLE_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
@@ -418,7 +418,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
static constexpr NWidgetPart _nested_script_league_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_script_league_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_BROWN),
|
||||
NWidget(WWT_CAPTION, COLOUR_BROWN, WID_SLT_CAPTION),
|
||||
|
||||
@@ -498,7 +498,7 @@ std::unique_ptr<NWidgetBase> MakeCargoesLegendLinkGraphGUI()
|
||||
}
|
||||
|
||||
|
||||
static constexpr NWidgetPart _nested_linkgraph_legend_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_linkgraph_legend_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
|
||||
NWidget(WWT_CAPTION, COLOUR_DARK_GREEN, WID_LGL_CAPTION), SetStringTip(STR_LINKGRAPH_LEGEND_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
|
||||
@@ -187,7 +187,7 @@ void FixTitleGameZoom(int zoom_adjust)
|
||||
UpdateViewportSizeZoom(vp);
|
||||
}
|
||||
|
||||
static constexpr NWidgetPart _nested_main_window_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_main_window_widgets = {
|
||||
NWidget(NWID_VIEWPORT, INVALID_COLOUR, WID_M_VIEWPORT), SetResize(1, 1),
|
||||
};
|
||||
|
||||
|
||||
@@ -61,8 +61,10 @@ enum OskActivation : uint8_t {
|
||||
OSKA_IMMEDIATELY, ///< Focusing click already opens OSK.
|
||||
};
|
||||
|
||||
static const NWidgetPart _nested_land_info_widgets[] = {
|
||||
NWidget(WWT_PANEL, COLOUR_GREY, WID_LI_BACKGROUND), SetMinimalSize(64, 32), EndContainer(),
|
||||
static std::initializer_list<NWidgetPart> _nested_land_info_widgets = {
|
||||
NWidget(WWT_PANEL, COLOUR_GREY, WID_LI_BACKGROUND),
|
||||
SetMinimalSize(64, 32),
|
||||
EndContainer(),
|
||||
};
|
||||
|
||||
static WindowDesc _land_info_desc(
|
||||
@@ -356,7 +358,7 @@ void ShowLandInfo(TileIndex tile, TileIndex end_tile)
|
||||
new LandInfoWindow(tile, end_tile);
|
||||
}
|
||||
|
||||
static constexpr NWidgetPart _nested_about_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_about_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY), SetStringTip(STR_ABOUT_OPENTTD, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
@@ -623,7 +625,7 @@ void HideFillingPercent(TextEffectID *te_id)
|
||||
*te_id = INVALID_TE_ID;
|
||||
}
|
||||
|
||||
static constexpr NWidgetPart _nested_tooltips_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_tooltips_widgets = {
|
||||
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_TT_BACKGROUND),
|
||||
};
|
||||
|
||||
@@ -1012,7 +1014,7 @@ struct QueryStringWindow : public Window
|
||||
}
|
||||
};
|
||||
|
||||
static constexpr NWidgetPart _nested_query_string_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_query_string_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY, WID_QS_CAPTION), SetTextStyle(TC_WHITE),
|
||||
@@ -1150,7 +1152,7 @@ struct QueryWindow : public Window {
|
||||
}
|
||||
};
|
||||
|
||||
static constexpr NWidgetPart _nested_query_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_query_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_RED),
|
||||
NWidget(WWT_CAPTION, COLOUR_RED, WID_Q_CAPTION),
|
||||
|
||||
@@ -621,7 +621,7 @@ struct MusicTrackSelectionWindow : public Window {
|
||||
}
|
||||
};
|
||||
|
||||
static constexpr NWidgetPart _nested_music_track_selection_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_music_track_selection_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY, WID_MTS_CAPTION),
|
||||
@@ -857,7 +857,7 @@ struct MusicWindow : public Window {
|
||||
}
|
||||
};
|
||||
|
||||
static constexpr NWidgetPart _nested_music_window_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_music_window_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY), SetStringTip(STR_MUSIC_JAZZ_JUKEBOX_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
|
||||
@@ -411,7 +411,7 @@ struct NetworkChatWindow : public Window {
|
||||
};
|
||||
|
||||
/** The widgets of the chat window. */
|
||||
static constexpr NWidgetPart _nested_chat_window_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_chat_window_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY, WID_NC_CLOSE),
|
||||
NWidget(WWT_PANEL, COLOUR_GREY, WID_NC_BACKGROUND),
|
||||
|
||||
@@ -84,7 +84,7 @@ static void ShowContentTextfileWindow(Window *parent, TextfileType file_type, co
|
||||
}
|
||||
|
||||
/** Nested widgets for the download window. */
|
||||
static constexpr NWidgetPart _nested_network_content_download_status_window_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_network_content_download_status_window_widgets = {
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY), SetStringTip(STR_CONTENT_DOWNLOAD_TITLE, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
NWidget(WWT_PANEL, COLOUR_GREY),
|
||||
NWidget(NWID_VERTICAL), SetPIP(0, WidgetDimensions::unscaled.vsep_wide, 0), SetPadding(WidgetDimensions::unscaled.modalpopup),
|
||||
@@ -1025,7 +1025,7 @@ void BuildContentTypeStringList()
|
||||
}
|
||||
|
||||
/** The widgets for the content list. */
|
||||
static constexpr NWidgetPart _nested_network_content_list_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_network_content_list_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_LIGHT_BLUE),
|
||||
NWidget(WWT_CAPTION, COLOUR_LIGHT_BLUE), SetStringTip(STR_CONTENT_TITLE),
|
||||
|
||||
@@ -887,7 +887,7 @@ static std::unique_ptr<NWidgetBase> MakeResizableHeader()
|
||||
return std::make_unique<NWidgetServerListHeader>();
|
||||
}
|
||||
|
||||
static constexpr NWidgetPart _nested_network_game_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_network_game_widgets = {
|
||||
/* TOP */
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_LIGHT_BLUE),
|
||||
@@ -1172,7 +1172,7 @@ struct NetworkStartServerWindow : public Window {
|
||||
}
|
||||
};
|
||||
|
||||
static constexpr NWidgetPart _nested_network_start_server_window_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_network_start_server_window_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_LIGHT_BLUE),
|
||||
NWidget(WWT_CAPTION, COLOUR_LIGHT_BLUE), SetStringTip(STR_NETWORK_START_SERVER_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
@@ -1260,7 +1260,7 @@ static void ShowNetworkStartServerWindow()
|
||||
|
||||
// CM extern void DrawCompanyIcon(CompanyID cid, int x, int y);
|
||||
|
||||
static constexpr NWidgetPart _nested_client_list_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_client_list_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY), SetStringTip(STR_NETWORK_CLIENT_LIST_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
@@ -2202,7 +2202,7 @@ struct NetworkJoinStatusWindow : Window {
|
||||
}
|
||||
};
|
||||
|
||||
static constexpr NWidgetPart _nested_network_join_status_window_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_network_join_status_window_widgets = {
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY), SetStringTip(STR_NETWORK_CONNECTING_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
NWidget(WWT_PANEL, COLOUR_GREY),
|
||||
NWidget(NWID_VERTICAL), SetPIP(0, WidgetDimensions::unscaled.vsep_wide, 0), SetPadding(WidgetDimensions::unscaled.modalpopup),
|
||||
@@ -2303,7 +2303,7 @@ struct NetworkAskRelayWindow : public Window {
|
||||
}
|
||||
};
|
||||
|
||||
static constexpr NWidgetPart _nested_network_ask_relay_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_network_ask_relay_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_RED),
|
||||
NWidget(WWT_CAPTION, COLOUR_RED, WID_NAR_CAPTION), SetStringTip(STR_NETWORK_ASK_RELAY_CAPTION),
|
||||
@@ -2398,7 +2398,7 @@ struct NetworkAskSurveyWindow : public Window {
|
||||
}
|
||||
};
|
||||
|
||||
static constexpr NWidgetPart _nested_network_ask_survey_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_network_ask_survey_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY, WID_NAS_CAPTION), SetStringTip(STR_NETWORK_ASK_SURVEY_CAPTION),
|
||||
|
||||
@@ -627,7 +627,7 @@ struct NewGRFInspectWindow : Window {
|
||||
|
||||
/* static */ uint32_t NewGRFInspectWindow::var60params[GSF_FAKE_END][0x20] = { {0} }; // Use spec to have 0s in whole array
|
||||
|
||||
static constexpr NWidgetPart _nested_newgrf_inspect_chain_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_newgrf_inspect_chain_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY, WID_NGRFI_CAPTION), SetStringTip(STR_NEWGRF_INSPECT_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
@@ -651,7 +651,7 @@ static constexpr NWidgetPart _nested_newgrf_inspect_chain_widgets[] = {
|
||||
EndContainer(),
|
||||
};
|
||||
|
||||
static constexpr NWidgetPart _nested_newgrf_inspect_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_newgrf_inspect_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY, WID_NGRFI_CAPTION), SetStringTip(STR_NEWGRF_INSPECT_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
@@ -1122,7 +1122,7 @@ private:
|
||||
bool SpriteAlignerWindow::centre = true;
|
||||
bool SpriteAlignerWindow::crosshair = true;
|
||||
|
||||
static constexpr NWidgetPart _nested_sprite_aligner_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_sprite_aligner_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY, WID_SA_CAPTION),
|
||||
|
||||
@@ -500,7 +500,7 @@ struct NewGRFParametersWindow : public Window {
|
||||
GRFParameterInfo NewGRFParametersWindow::dummy_parameter_info(0);
|
||||
|
||||
|
||||
static constexpr NWidgetPart _nested_newgrf_parameter_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_newgrf_parameter_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_MAUVE),
|
||||
NWidget(WWT_CAPTION, COLOUR_MAUVE, WID_NP_CAPTION),
|
||||
@@ -1754,7 +1754,7 @@ public:
|
||||
const uint NWidgetNewGRFDisplay::MAX_EXTRA_INFO_WIDTH = 150;
|
||||
const uint NWidgetNewGRFDisplay::MIN_EXTRA_FOR_3_COLUMNS = 50;
|
||||
|
||||
static constexpr NWidgetPart _nested_newgrf_actives_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_newgrf_actives_widgets = {
|
||||
NWidget(NWID_VERTICAL), SetPIP(0, WidgetDimensions::unscaled.vsep_wide, 0),
|
||||
/* Left side, presets. */
|
||||
NWidget(NWID_VERTICAL),
|
||||
@@ -1809,7 +1809,7 @@ static constexpr NWidgetPart _nested_newgrf_actives_widgets[] = {
|
||||
EndContainer(),
|
||||
};
|
||||
|
||||
static constexpr NWidgetPart _nested_newgrf_availables_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_newgrf_availables_widgets = {
|
||||
NWidget(WWT_FRAME, COLOUR_MAUVE), SetStringTip(STR_NEWGRF_SETTINGS_INACTIVE_LIST), SetPIP(0, WidgetDimensions::unscaled.vsep_wide, 0),
|
||||
/* Left side, available grfs, filter edit box. */
|
||||
NWidget(NWID_HORIZONTAL), SetPIP(0, WidgetDimensions::unscaled.hsep_wide, 0),
|
||||
@@ -1842,7 +1842,7 @@ static constexpr NWidgetPart _nested_newgrf_availables_widgets[] = {
|
||||
EndContainer(),
|
||||
};
|
||||
|
||||
static constexpr NWidgetPart _nested_newgrf_infopanel_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_newgrf_infopanel_widgets = {
|
||||
NWidget(NWID_VERTICAL), SetPIP(0, WidgetDimensions::unscaled.vsep_wide, 0),
|
||||
/* Right side, info panel. */
|
||||
NWidget(WWT_PANEL, COLOUR_MAUVE),
|
||||
@@ -1897,7 +1897,7 @@ std::unique_ptr<NWidgetBase> NewGRFDisplay()
|
||||
}
|
||||
|
||||
/* Widget definition of the manage newgrfs window */
|
||||
static constexpr NWidgetPart _nested_newgrf_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_newgrf_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_MAUVE),
|
||||
NWidget(WWT_CAPTION, COLOUR_MAUVE), SetStringTip(STR_NEWGRF_SETTINGS_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
@@ -1981,7 +1981,7 @@ void ShowNewGRFSettings(bool editable, bool show_params, bool exec_changes, GRFC
|
||||
}
|
||||
|
||||
/** Widget parts of the save preset window. */
|
||||
static constexpr NWidgetPart _nested_save_preset_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_save_preset_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY), SetStringTip(STR_SAVE_PRESET_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
@@ -2134,7 +2134,7 @@ static void ShowSavePresetWindow(std::string_view initial_text)
|
||||
}
|
||||
|
||||
/** Widgets for the progress window. */
|
||||
static constexpr NWidgetPart _nested_scan_progress_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_scan_progress_widgets = {
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY), SetStringTip(STR_NEWGRF_SCAN_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
NWidget(WWT_PANEL, COLOUR_GREY),
|
||||
NWidget(NWID_VERTICAL), SetPIP(0, WidgetDimensions::unscaled.vsep_wide, 0), SetPadding(WidgetDimensions::unscaled.modalpopup),
|
||||
|
||||
@@ -104,7 +104,7 @@ static TileIndex GetReferenceTile(const NewsReference &reference)
|
||||
}
|
||||
|
||||
/* Normal news items. */
|
||||
static constexpr NWidgetPart _nested_normal_news_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_normal_news_widgets = {
|
||||
NWidget(WWT_PANEL, COLOUR_WHITE, WID_N_PANEL),
|
||||
NWidget(NWID_VERTICAL), SetPadding(WidgetDimensions::unscaled.fullbevel),
|
||||
NWidget(NWID_LAYER, INVALID_COLOUR),
|
||||
@@ -136,7 +136,7 @@ static WindowDesc _normal_news_desc(
|
||||
);
|
||||
|
||||
/* New vehicles news items. */
|
||||
static constexpr NWidgetPart _nested_vehicle_news_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_vehicle_news_widgets = {
|
||||
NWidget(WWT_PANEL, COLOUR_WHITE, WID_N_PANEL),
|
||||
NWidget(NWID_VERTICAL), SetPadding(WidgetDimensions::unscaled.fullbevel),
|
||||
NWidget(NWID_LAYER, INVALID_COLOUR),
|
||||
@@ -184,7 +184,7 @@ static WindowDesc _vehicle_news_desc(
|
||||
);
|
||||
|
||||
/* Company news items. */
|
||||
static constexpr NWidgetPart _nested_company_news_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_company_news_widgets = {
|
||||
NWidget(WWT_PANEL, COLOUR_WHITE, WID_N_PANEL),
|
||||
NWidget(NWID_VERTICAL), SetPadding(WidgetDimensions::unscaled.fullbevel),
|
||||
NWidget(NWID_LAYER, INVALID_COLOUR),
|
||||
@@ -229,7 +229,7 @@ static WindowDesc _company_news_desc(
|
||||
);
|
||||
|
||||
/* Thin news items. */
|
||||
static constexpr NWidgetPart _nested_thin_news_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_thin_news_widgets = {
|
||||
NWidget(WWT_PANEL, COLOUR_WHITE, WID_N_PANEL),
|
||||
NWidget(NWID_VERTICAL), SetPadding(WidgetDimensions::unscaled.fullbevel),
|
||||
NWidget(NWID_LAYER, INVALID_COLOUR),
|
||||
@@ -263,7 +263,7 @@ static WindowDesc _thin_news_desc(
|
||||
);
|
||||
|
||||
/* Small news items. */
|
||||
static constexpr NWidgetPart _nested_small_news_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_small_news_widgets = {
|
||||
/* Caption + close box. The caption is not WWT_CAPTION as the window shall not be moveable and so on. */
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_LIGHT_BLUE, WID_N_CLOSEBOX),
|
||||
@@ -1277,7 +1277,7 @@ struct MessageHistoryWindow : Window {
|
||||
}
|
||||
};
|
||||
|
||||
static constexpr NWidgetPart _nested_message_history[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_message_history = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_BROWN),
|
||||
NWidget(WWT_CAPTION, COLOUR_BROWN), SetStringTip(STR_MESSAGE_HISTORY, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
|
||||
@@ -393,7 +393,7 @@ public:
|
||||
}, BuildObjectGlobalHotkeys};
|
||||
};
|
||||
|
||||
static constexpr NWidgetPart _nested_build_object_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_build_object_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
|
||||
NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetStringTip(STR_OBJECT_BUILD_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
|
||||
@@ -1656,7 +1656,7 @@ public:
|
||||
};
|
||||
|
||||
/** Nested widget definition for "your" train orders. */
|
||||
static constexpr NWidgetPart _nested_orders_train_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_orders_train_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY, WID_O_CAPTION),
|
||||
@@ -1733,7 +1733,7 @@ static WindowDesc _orders_train_desc(
|
||||
);
|
||||
|
||||
/** Nested widget definition for "your" orders (non-train). */
|
||||
static constexpr NWidgetPart _nested_orders_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_orders_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY, WID_O_CAPTION), SetStringTip(STR_ORDERS_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
@@ -1806,7 +1806,7 @@ static WindowDesc _orders_desc(
|
||||
);
|
||||
|
||||
/** Nested widget definition for competitor orders. */
|
||||
static constexpr NWidgetPart _nested_other_orders_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_other_orders_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY, WID_O_CAPTION), SetStringTip(STR_ORDERS_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
|
||||
@@ -321,7 +321,7 @@ static std::unique_ptr<NWidgetBase> MakeSpacebarKeys()
|
||||
}
|
||||
|
||||
|
||||
static constexpr NWidgetPart _nested_osk_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_osk_widgets = {
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY, WID_OSK_CAPTION), SetTextStyle(TC_WHITE),
|
||||
NWidget(WWT_PANEL, COLOUR_GREY),
|
||||
NWidget(WWT_EDITBOX, COLOUR_GREY, WID_OSK_TEXT), SetMinimalSize(252, 0), SetPadding(2, 2, 2, 2),
|
||||
|
||||
@@ -742,7 +742,7 @@ void PickerWindow::EnsureSelectedTypeIsVisible()
|
||||
/** Create nested widgets for the class picker widgets. */
|
||||
std::unique_ptr<NWidgetBase> MakePickerClassWidgets()
|
||||
{
|
||||
static constexpr NWidgetPart picker_class_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> picker_class_widgets = {
|
||||
NWidget(NWID_SELECTION, INVALID_COLOUR, WID_PW_CLASS_SEL),
|
||||
NWidget(NWID_VERTICAL),
|
||||
NWidget(WWT_PANEL, COLOUR_DARK_GREEN),
|
||||
@@ -765,7 +765,7 @@ std::unique_ptr<NWidgetBase> MakePickerClassWidgets()
|
||||
/** Create nested widgets for the type picker widgets. */
|
||||
std::unique_ptr<NWidgetBase> MakePickerTypeWidgets()
|
||||
{
|
||||
static constexpr NWidgetPart picker_type_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> picker_type_widgets = {
|
||||
NWidget(NWID_SELECTION, INVALID_COLOUR, WID_PW_TYPE_SEL),
|
||||
NWidget(NWID_VERTICAL),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
|
||||
@@ -1047,7 +1047,7 @@ struct BuildRailToolbarWindow : Window {
|
||||
}, RailToolbarGlobalHotkeys};
|
||||
};
|
||||
|
||||
static constexpr NWidgetPart _nested_build_rail_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_build_rail_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
|
||||
NWidget(WWT_CAPTION, COLOUR_DARK_GREEN, WID_RAT_CAPTION), SetTextStyle(TC_WHITE),
|
||||
@@ -1591,7 +1591,7 @@ public:
|
||||
}, BuildRailStationGlobalHotkeys};
|
||||
};
|
||||
|
||||
static constexpr NWidgetPart _nested_station_builder_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_station_builder_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
|
||||
NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetStringTip(STR_STATION_BUILD_RAIL_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
@@ -1846,7 +1846,7 @@ public:
|
||||
};
|
||||
|
||||
/** Nested widget definition of the build signal window */
|
||||
static constexpr NWidgetPart _nested_signal_builder_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_signal_builder_widgets = {
|
||||
/* Title bar and buttons. */
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
|
||||
@@ -2019,7 +2019,7 @@ public:
|
||||
};
|
||||
|
||||
/** Nested widget definition of the build rail depot window */
|
||||
static constexpr NWidgetPart _nested_build_depot_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_build_depot_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
|
||||
NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetStringTip(STR_BUILD_DEPOT_TRAIN_ORIENTATION_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
@@ -2152,7 +2152,7 @@ struct BuildRailWaypointWindow : public PickerWindow {
|
||||
};
|
||||
|
||||
/** Nested widget definition for the build NewGRF rail waypoint window */
|
||||
static constexpr NWidgetPart _nested_build_waypoint_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_build_waypoint_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
|
||||
NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetStringTip(STR_WAYPOINT_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
|
||||
@@ -934,7 +934,7 @@ struct BuildRoadToolbarWindow : Window {
|
||||
}, TramToolbarGlobalHotkeys};
|
||||
};
|
||||
|
||||
static constexpr NWidgetPart _nested_build_road_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_build_road_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
|
||||
NWidget(WWT_CAPTION, COLOUR_DARK_GREEN, WID_ROT_CAPTION), SetTextStyle(TC_WHITE),
|
||||
@@ -981,7 +981,7 @@ static WindowDesc _build_road_desc(
|
||||
&BuildRoadToolbarWindow::road_hotkeys
|
||||
);
|
||||
|
||||
static constexpr NWidgetPart _nested_build_tramway_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_build_tramway_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
|
||||
NWidget(WWT_CAPTION, COLOUR_DARK_GREEN, WID_ROT_CAPTION), SetTextStyle(TC_WHITE),
|
||||
@@ -1044,7 +1044,7 @@ Window *ShowBuildRoadToolbar(RoadType roadtype)
|
||||
return AllocateWindowDescFront<BuildRoadToolbarWindow>(RoadTypeIsRoad(_cur_roadtype) ? _build_road_desc : _build_tramway_desc, TRANSPORT_ROAD);
|
||||
}
|
||||
|
||||
static constexpr NWidgetPart _nested_build_road_scen_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_build_road_scen_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
|
||||
NWidget(WWT_CAPTION, COLOUR_DARK_GREEN, WID_ROT_CAPTION), SetTextStyle(TC_WHITE),
|
||||
@@ -1083,7 +1083,7 @@ static WindowDesc _build_road_scen_desc(
|
||||
&BuildRoadToolbarWindow::road_hotkeys
|
||||
);
|
||||
|
||||
static constexpr NWidgetPart _nested_build_tramway_scen_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_build_tramway_scen_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
|
||||
NWidget(WWT_CAPTION, COLOUR_DARK_GREEN, WID_ROT_CAPTION), SetTextStyle(TC_WHITE),
|
||||
@@ -1236,7 +1236,7 @@ public:
|
||||
|
||||
};
|
||||
|
||||
static constexpr NWidgetPart _nested_build_road_depot_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_build_road_depot_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
|
||||
NWidget(WWT_CAPTION, COLOUR_DARK_GREEN, WID_BROD_CAPTION), SetStringTip(STR_BUILD_DEPOT_ROAD_ORIENTATION_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
@@ -1634,7 +1634,7 @@ public:
|
||||
};
|
||||
|
||||
/** Widget definition of the build road station window */
|
||||
static constexpr NWidgetPart _nested_road_station_picker_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_road_station_picker_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
|
||||
NWidget(WWT_CAPTION, COLOUR_DARK_GREEN, WID_BROS_CAPTION),
|
||||
@@ -1703,7 +1703,7 @@ static WindowDesc _road_station_picker_desc(
|
||||
);
|
||||
|
||||
/** Widget definition of the build tram station window */
|
||||
static constexpr NWidgetPart _nested_tram_station_picker_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_tram_station_picker_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
|
||||
NWidget(WWT_CAPTION, COLOUR_DARK_GREEN, WID_BROS_CAPTION),
|
||||
@@ -1848,7 +1848,7 @@ struct BuildRoadWaypointWindow : public PickerWindow {
|
||||
};
|
||||
|
||||
/** Nested widget definition for the build NewGRF road waypoint window */
|
||||
static constexpr NWidgetPart _nested_build_road_waypoint_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_build_road_waypoint_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
|
||||
NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetStringTip(STR_WAYPOINT_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
|
||||
@@ -47,7 +47,7 @@ struct ScreenshotWindow : Window {
|
||||
}
|
||||
};
|
||||
|
||||
static constexpr NWidgetPart _nested_screenshot[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_screenshot = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY), SetStringTip(STR_SCREENSHOT_CAPTION),
|
||||
|
||||
@@ -246,7 +246,7 @@ struct ScriptListWindow : public Window {
|
||||
};
|
||||
|
||||
/** Widgets for the AI list window. */
|
||||
static constexpr NWidgetPart _nested_script_list_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_script_list_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_MAUVE),
|
||||
NWidget(WWT_CAPTION, COLOUR_MAUVE, WID_SCRL_CAPTION),
|
||||
@@ -557,7 +557,7 @@ private:
|
||||
};
|
||||
|
||||
/** Widgets for the Script settings window. */
|
||||
static constexpr NWidgetPart _nested_script_settings_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_script_settings_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_MAUVE),
|
||||
NWidget(WWT_CAPTION, COLOUR_MAUVE, WID_SCRS_CAPTION),
|
||||
@@ -1202,7 +1202,7 @@ std::unique_ptr<NWidgetBase> MakeCompanyButtonRowsScriptDebug()
|
||||
}
|
||||
|
||||
/** Widgets for the Script debug window. */
|
||||
static constexpr NWidgetPart _nested_script_debug_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_script_debug_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY), SetStringTip(STR_AI_DEBUG, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
|
||||
@@ -205,7 +205,7 @@ static constexpr TextColour GAME_OPTIONS_LABEL = TC_LIGHT_BLUE;
|
||||
/** Colour for selected text of game options. */
|
||||
static constexpr TextColour GAME_OPTIONS_SELECTED = TC_WHITE;
|
||||
|
||||
static constexpr NWidgetPart _nested_social_plugins_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_social_plugins_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_FRAME, GAME_OPTIONS_BACKGROUND, WID_GO_SOCIAL_PLUGIN_TITLE), SetTextStyle(GAME_OPTIONS_FRAME),
|
||||
NWidget(NWID_HORIZONTAL), SetPIP(0, WidgetDimensions::unscaled.hsep_normal, 0),
|
||||
@@ -220,7 +220,7 @@ static constexpr NWidgetPart _nested_social_plugins_widgets[] = {
|
||||
EndContainer(),
|
||||
};
|
||||
|
||||
static constexpr NWidgetPart _nested_social_plugins_none_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_social_plugins_none_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_TEXT, INVALID_COLOUR), SetResize(1, 0), SetFill(1, 0), SetStringTip(STR_GAME_OPTIONS_SOCIAL_PLUGINS_NONE), SetTextStyle(GAME_OPTIONS_LABEL),
|
||||
EndContainer(),
|
||||
@@ -1607,7 +1607,7 @@ struct GameOptionsWindow : Window {
|
||||
}
|
||||
};
|
||||
|
||||
static constexpr NWidgetPart _nested_game_options_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_game_options_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, GAME_OPTIONS_BACKGROUND),
|
||||
NWidget(WWT_CAPTION, GAME_OPTIONS_BACKGROUND), SetStringTip(STR_GAME_OPTIONS_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
@@ -2147,7 +2147,7 @@ struct CustomCurrencyWindow : Window {
|
||||
}
|
||||
};
|
||||
|
||||
static constexpr NWidgetPart _nested_cust_currency_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_cust_currency_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY), SetStringTip(STR_CURRENCY_WINDOW, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
|
||||
@@ -331,7 +331,7 @@ struct SignListWindow : Window, SignList {
|
||||
}, SignListGlobalHotkeys};
|
||||
};
|
||||
|
||||
static constexpr NWidgetPart _nested_sign_list_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_sign_list_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_BROWN),
|
||||
NWidget(WWT_CAPTION, COLOUR_BROWN, WID_SIL_CAPTION),
|
||||
@@ -506,7 +506,7 @@ struct SignWindow : Window, SignList {
|
||||
}
|
||||
};
|
||||
|
||||
static constexpr NWidgetPart _nested_query_sign_edit_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_query_sign_edit_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY, WID_QES_CAPTION), SetTextStyle(TC_WHITE),
|
||||
|
||||
@@ -2024,14 +2024,14 @@ public:
|
||||
CityMania has its own smallmap
|
||||
|
||||
/** Widget parts of the smallmap display. */
|
||||
static constexpr NWidgetPart _nested_smallmap_display[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_smallmap_display = {
|
||||
NWidget(WWT_PANEL, COLOUR_BROWN, WID_SM_MAP_BORDER),
|
||||
NWidget(WWT_INSET, COLOUR_BROWN, WID_SM_MAP), SetMinimalSize(346, 140), SetResize(1, 1), SetPadding(2, 2, 2, 2), EndContainer(),
|
||||
EndContainer(),
|
||||
};
|
||||
|
||||
/** Widget parts of the smallmap legend bar + image buttons. */
|
||||
static constexpr NWidgetPart _nested_smallmap_bar[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_smallmap_bar = {
|
||||
NWidget(WWT_PANEL, COLOUR_BROWN),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SM_LEGEND), SetResize(1, 1),
|
||||
@@ -2081,7 +2081,7 @@ static std::unique_ptr<NWidgetBase> SmallMapDisplay()
|
||||
return map_display;
|
||||
}
|
||||
|
||||
static constexpr NWidgetPart _nested_smallmap_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_smallmap_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_BROWN),
|
||||
NWidget(WWT_CAPTION, COLOUR_BROWN, WID_SM_CAPTION),
|
||||
|
||||
@@ -787,7 +787,7 @@ const std::initializer_list<GUIStationList::SortFunction * const> CompanyStation
|
||||
&StationRatingMinSorter
|
||||
};
|
||||
|
||||
static constexpr NWidgetPart _nested_company_stations_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_company_stations_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY, WID_STL_CAPTION),
|
||||
@@ -839,7 +839,7 @@ void ShowCompanyStations(CompanyID company)
|
||||
AllocateWindowDescFront<CompanyStationsWindow>(_company_stations_desc, company);
|
||||
}
|
||||
|
||||
static constexpr NWidgetPart _nested_station_view_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_station_view_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, WID_SV_RENAME), SetAspect(WidgetDimensions::ASPECT_RENAME), SetSpriteTip(SPR_RENAME, STR_STATION_VIEW_RENAME_TOOLTIP),
|
||||
@@ -2321,7 +2321,7 @@ static void FindStationsNearby(TileArea ta, bool distant_join)
|
||||
}
|
||||
}
|
||||
|
||||
static constexpr NWidgetPart _nested_select_station_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_select_station_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
|
||||
NWidget(WWT_CAPTION, COLOUR_DARK_GREEN, WID_JS_CAPTION), SetStringTip(STR_JOIN_STATION_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
|
||||
@@ -238,7 +238,7 @@ struct StatusBarWindow : Window {
|
||||
}};
|
||||
};
|
||||
|
||||
static constexpr NWidgetPart _nested_main_status_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_main_status_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_PANEL, COLOUR_GREY, WID_S_LEFT), SetMinimalSize(140, 12), EndContainer(),
|
||||
NWidget(WWT_PUSHBTN, COLOUR_GREY, WID_S_MIDDLE), SetMinimalSize(40, 12), SetToolTip(STR_STATUSBAR_TOOLTIP_SHOW_LAST_NEWS), SetResize(1, 0),
|
||||
|
||||
@@ -939,7 +939,7 @@ const std::initializer_list<GUIStoryPageElementList::SortFunction * const> Story
|
||||
&PageElementOrderSorter,
|
||||
};
|
||||
|
||||
static constexpr NWidgetPart _nested_story_book_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_story_book_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_BROWN),
|
||||
NWidget(WWT_CAPTION, COLOUR_BROWN, WID_SB_CAPTION),
|
||||
|
||||
@@ -264,7 +264,7 @@ struct SubsidyListWindow : Window {
|
||||
}
|
||||
};
|
||||
|
||||
static constexpr NWidgetPart _nested_subsidies_list_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_subsidies_list_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_BROWN),
|
||||
NWidget(WWT_CAPTION, COLOUR_BROWN), SetStringTip(STR_SUBSIDIES_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
|
||||
@@ -399,7 +399,7 @@ struct TerraformToolbarWindow : Window {
|
||||
}, TerraformToolbarGlobalHotkeys};
|
||||
};
|
||||
|
||||
static constexpr NWidgetPart _nested_terraform_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_terraform_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
|
||||
NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetStringTip(STR_LANDSCAPING_TOOLBAR, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
@@ -530,7 +530,7 @@ static const int8_t _multi_terraform_coords[][2] = {
|
||||
{-28, 0}, {-24, -2}, {-20, -4}, {-16, -6}, {-12, -8}, { -8,-10}, { -4,-12}, { 0,-14}, { 4,-12}, { 8,-10}, { 12, -8}, { 16, -6}, { 20, -4}, { 24, -2}, { 28, 0},
|
||||
};
|
||||
|
||||
static constexpr NWidgetPart _nested_scen_edit_land_gen_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_scen_edit_land_gen_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
|
||||
NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetStringTip(STR_TERRAFORM_TOOLBAR_LAND_GENERATION_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
#include "safeguards.h"
|
||||
|
||||
/** Widgets for the textfile window. */
|
||||
static constexpr NWidgetPart _nested_textfile_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_textfile_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_MAUVE),
|
||||
NWidget(WWT_PUSHARROWBTN, COLOUR_MAUVE, WID_TF_NAVBACK), SetFill(0, 1), SetMinimalSize(15, 1), SetArrowWidgetTypeTip(AWV_DECREASE, STR_TEXTFILE_NAVBACK_TOOLTIP),
|
||||
|
||||
@@ -799,7 +799,7 @@ struct TimetableWindow : Window {
|
||||
}};
|
||||
};
|
||||
|
||||
static constexpr NWidgetPart _nested_timetable_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_timetable_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY, WID_VT_CAPTION),
|
||||
|
||||
@@ -2327,7 +2327,7 @@ static std::unique_ptr<NWidgetBase> MakeMainToolbar()
|
||||
return hor;
|
||||
}
|
||||
|
||||
static constexpr NWidgetPart _nested_toolbar_normal_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_toolbar_normal_widgets = {
|
||||
NWidgetFunction(MakeMainToolbar),
|
||||
};
|
||||
|
||||
@@ -2633,7 +2633,7 @@ struct ScenarioEditorToolbarWindow : Window {
|
||||
}};
|
||||
};
|
||||
|
||||
static constexpr NWidgetPart _nested_toolb_scen_inner_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_toolb_scen_inner_widgets = {
|
||||
NWidget(WWT_IMGBTN, COLOUR_GREY, WID_TE_PAUSE), SetSpriteTip(SPR_IMG_PAUSE, STR_TOOLBAR_TOOLTIP_PAUSE_GAME),
|
||||
NWidget(WWT_IMGBTN, COLOUR_GREY, WID_TE_FAST_FORWARD), SetSpriteTip(SPR_IMG_FASTFORWARD, STR_TOOLBAR_TOOLTIP_FORWARD),
|
||||
NWidget(WWT_IMGBTN, COLOUR_GREY, WID_TE_SETTINGS), SetSpriteTip(SPR_IMG_SETTINGS, STR_TOOLBAR_TOOLTIP_OPTIONS),
|
||||
@@ -2673,7 +2673,7 @@ static std::unique_ptr<NWidgetBase> MakeScenarioToolbar()
|
||||
return MakeNWidgets(_nested_toolb_scen_inner_widgets, std::make_unique<NWidgetScenarioToolbarContainer>());
|
||||
}
|
||||
|
||||
static constexpr NWidgetPart _nested_toolb_scen_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_toolb_scen_widgets = {
|
||||
NWidgetFunction(MakeScenarioToolbar),
|
||||
};
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ TownKdtree _town_local_authority_kdtree{};
|
||||
|
||||
typedef GUIList<const Town*, const bool &> GUITownList;
|
||||
|
||||
static constexpr NWidgetPart _nested_town_authority_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_town_authority_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_BROWN),
|
||||
NWidget(WWT_CAPTION, COLOUR_BROWN, WID_TA_CAPTION),
|
||||
@@ -673,7 +673,7 @@ public:
|
||||
}};
|
||||
};
|
||||
|
||||
static constexpr NWidgetPart _nested_town_game_view_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_town_game_view_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_BROWN),
|
||||
NWidget(WWT_PUSHIMGBTN, COLOUR_BROWN, WID_TV_CHANGE_NAME), SetAspect(WidgetDimensions::ASPECT_RENAME), SetSpriteTip(SPR_RENAME, STR_TOWN_VIEW_RENAME_TOOLTIP),
|
||||
@@ -706,7 +706,7 @@ static WindowDesc _town_game_view_desc(
|
||||
&TownViewWindow::hotkeys
|
||||
);
|
||||
|
||||
static constexpr NWidgetPart _nested_town_editor_view_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_town_editor_view_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_BROWN),
|
||||
NWidget(WWT_PUSHIMGBTN, COLOUR_BROWN, WID_TV_CHANGE_NAME), SetAspect(WidgetDimensions::ASPECT_RENAME), SetSpriteTip(SPR_RENAME, STR_TOWN_VIEW_RENAME_TOOLTIP),
|
||||
@@ -751,7 +751,7 @@ void ShowTownViewWindow(TownID town)
|
||||
}
|
||||
}
|
||||
|
||||
static constexpr NWidgetPart _nested_town_directory_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_town_directory_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_BROWN),
|
||||
NWidget(WWT_CAPTION, COLOUR_BROWN, WID_TD_CAPTION), SetStringTip(CM_STR_TOWN_DIRECTORY_CAPTION_EXTRA, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
@@ -1167,7 +1167,7 @@ void CcFoundRandomTown(Commands, const CommandCost &result, Money, TownID town_i
|
||||
if (result.Succeeded()) ScrollMainWindowToTile(Town::Get(town_id)->xy);
|
||||
}
|
||||
|
||||
static constexpr NWidgetPart _nested_found_town_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_found_town_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
|
||||
NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetStringTip(STR_FOUND_TOWN_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
@@ -1906,7 +1906,7 @@ struct BuildHouseWindow : public PickerWindow {
|
||||
};
|
||||
|
||||
/** Nested widget definition for the build NewGRF rail waypoint window */
|
||||
static constexpr NWidgetPart _nested_build_house_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_build_house_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
|
||||
NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetStringTip(STR_HOUSE_PICKER_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
|
||||
@@ -128,7 +128,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
static constexpr NWidgetPart _nested_transparency_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_transparency_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
|
||||
NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetStringTip(STR_TRANSPARENCY_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
|
||||
@@ -287,7 +287,7 @@ static std::unique_ptr<NWidgetBase> MakeTreeTypeButtons()
|
||||
return vstack;
|
||||
}
|
||||
|
||||
static constexpr NWidgetPart _nested_build_trees_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_build_trees_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
|
||||
NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetStringTip(STR_PLANT_TREE_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
|
||||
@@ -1312,7 +1312,7 @@ struct RefitWindow : public Window {
|
||||
}
|
||||
};
|
||||
|
||||
static constexpr NWidgetPart _nested_vehicle_refit_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_vehicle_refit_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY, WID_VR_CAPTION),
|
||||
@@ -1600,7 +1600,7 @@ void ChangeVehicleViewWindow(VehicleID from_index, VehicleID to_index)
|
||||
ChangeVehicleWindow(WC_VEHICLE_TIMETABLE, from_index, to_index);
|
||||
}
|
||||
|
||||
static constexpr NWidgetPart _nested_vehicle_list[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_vehicle_list = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(NWID_SELECTION, INVALID_COLOUR, WID_VL_CAPTION_SELECTION),
|
||||
@@ -2329,7 +2329,7 @@ static_assert(WID_VD_DETAILS_CAPACITY_OF_EACH == WID_VD_DETAILS_CARGO_CARRIED +
|
||||
static_assert(WID_VD_DETAILS_TOTAL_CARGO == WID_VD_DETAILS_CARGO_CARRIED + TDW_TAB_TOTALS );
|
||||
|
||||
/** Vehicle details widgets (other than train). */
|
||||
static constexpr NWidgetPart _nested_nontrain_vehicle_details_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_nontrain_vehicle_details_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY, WID_VD_CAPTION),
|
||||
@@ -2352,7 +2352,7 @@ static constexpr NWidgetPart _nested_nontrain_vehicle_details_widgets[] = {
|
||||
};
|
||||
|
||||
/** Train details widgets. */
|
||||
static constexpr NWidgetPart _nested_train_vehicle_details_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_train_vehicle_details_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY, WID_VD_CAPTION), SetStringTip(STR_VEHICLE_DETAILS_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
@@ -2825,7 +2825,7 @@ static void ShowVehicleDetailsWindow(const Vehicle *v)
|
||||
/* Unified vehicle GUI - Vehicle View Window */
|
||||
|
||||
/** Vehicle view widgets. */
|
||||
static constexpr NWidgetPart _nested_vehicle_view_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_vehicle_view_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, WID_VV_RENAME), SetAspect(WidgetDimensions::ASPECT_RENAME), SetSpriteTip(SPR_RENAME),
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include "safeguards.h"
|
||||
|
||||
/* Extra Viewport Window Stuff */
|
||||
static constexpr NWidgetPart _nested_extra_viewport_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_extra_viewport_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY, WID_EV_CAPTION),
|
||||
|
||||
@@ -187,7 +187,7 @@ public:
|
||||
};
|
||||
|
||||
/** The widgets of the waypoint view. */
|
||||
static constexpr NWidgetPart _nested_waypoint_view_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_waypoint_view_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, WID_W_RENAME), SetAspect(WidgetDimensions::ASPECT_RENAME), SetSpriteTip(SPR_RENAME, STR_BUOY_VIEW_RENAME_TOOLTIP),
|
||||
|
||||
Reference in New Issue
Block a user