1
0
Fork 0

Codechange: Use EnumBitSet for WindowDefaultFlags.

pull/13405/head
Peter Nelson 2025-01-29 23:36:47 +00:00 committed by Peter Nelson
parent efb05396a7
commit d30e8dd1c1
63 changed files with 184 additions and 183 deletions

View File

@ -85,7 +85,7 @@ static constexpr NWidgetPart _nested_ai_config_widgets[] = {
static WindowDesc _ai_config_desc( static WindowDesc _ai_config_desc(
WDP_CENTER, nullptr, 0, 0, WDP_CENTER, nullptr, 0, 0,
WC_GAME_OPTIONS, WC_NONE, WC_GAME_OPTIONS, WC_NONE,
0, {},
_nested_ai_config_widgets _nested_ai_config_widgets
); );

View File

@ -211,7 +211,7 @@ static constexpr NWidgetPart _nested_air_toolbar_widgets[] = {
static WindowDesc _air_toolbar_desc( static WindowDesc _air_toolbar_desc(
WDP_ALIGN_TOOLBAR, "toolbar_air", 0, 0, WDP_ALIGN_TOOLBAR, "toolbar_air", 0, 0,
WC_BUILD_TOOLBAR, WC_NONE, WC_BUILD_TOOLBAR, WC_NONE,
WDF_CONSTRUCTION, WindowDefaultFlag::Construction,
_nested_air_toolbar_widgets, _nested_air_toolbar_widgets,
&BuildAirToolbarWindow::hotkeys &BuildAirToolbarWindow::hotkeys
); );
@ -620,7 +620,7 @@ static constexpr NWidgetPart _nested_build_airport_widgets[] = {
static WindowDesc _build_airport_desc( static WindowDesc _build_airport_desc(
WDP_AUTO, nullptr, 0, 0, WDP_AUTO, nullptr, 0, 0,
WC_BUILD_STATION, WC_BUILD_TOOLBAR, WC_BUILD_STATION, WC_BUILD_TOOLBAR,
WDF_CONSTRUCTION, WindowDefaultFlag::Construction,
_nested_build_airport_widgets _nested_build_airport_widgets
); );

View File

@ -764,7 +764,7 @@ static constexpr NWidgetPart _nested_replace_rail_vehicle_widgets[] = {
static WindowDesc _replace_rail_vehicle_desc( static WindowDesc _replace_rail_vehicle_desc(
WDP_AUTO, "replace_vehicle_train", 500, 140, WDP_AUTO, "replace_vehicle_train", 500, 140,
WC_REPLACE_VEHICLE, WC_NONE, WC_REPLACE_VEHICLE, WC_NONE,
WDF_CONSTRUCTION, WindowDefaultFlag::Construction,
_nested_replace_rail_vehicle_widgets _nested_replace_rail_vehicle_widgets
); );
@ -822,7 +822,7 @@ static constexpr NWidgetPart _nested_replace_road_vehicle_widgets[] = {
static WindowDesc _replace_road_vehicle_desc( static WindowDesc _replace_road_vehicle_desc(
WDP_AUTO, "replace_vehicle_road", 500, 140, WDP_AUTO, "replace_vehicle_road", 500, 140,
WC_REPLACE_VEHICLE, WC_NONE, WC_REPLACE_VEHICLE, WC_NONE,
WDF_CONSTRUCTION, WindowDefaultFlag::Construction,
_nested_replace_road_vehicle_widgets _nested_replace_road_vehicle_widgets
); );
@ -876,7 +876,7 @@ static constexpr NWidgetPart _nested_replace_vehicle_widgets[] = {
static WindowDesc _replace_vehicle_desc( static WindowDesc _replace_vehicle_desc(
WDP_AUTO, "replace_vehicle", 456, 118, WDP_AUTO, "replace_vehicle", 456, 118,
WC_REPLACE_VEHICLE, WC_NONE, WC_REPLACE_VEHICLE, WC_NONE,
WDF_CONSTRUCTION, WindowDefaultFlag::Construction,
_nested_replace_vehicle_widgets _nested_replace_vehicle_widgets
); );

View File

@ -43,7 +43,7 @@ static constexpr NWidgetPart _background_widgets[] = {
static WindowDesc _background_desc( static WindowDesc _background_desc(
WDP_MANUAL, nullptr, 0, 0, WDP_MANUAL, nullptr, 0, 0,
WC_BOOTSTRAP, WC_NONE, WC_BOOTSTRAP, WC_NONE,
WDF_NO_CLOSE, WindowDefaultFlag::NoClose,
_background_widgets _background_widgets
); );
@ -79,7 +79,7 @@ static constexpr NWidgetPart _nested_bootstrap_errmsg_widgets[] = {
static WindowDesc _bootstrap_errmsg_desc( static WindowDesc _bootstrap_errmsg_desc(
WDP_CENTER, nullptr, 0, 0, WDP_CENTER, nullptr, 0, 0,
WC_BOOTSTRAP, WC_NONE, WC_BOOTSTRAP, WC_NONE,
WDF_MODAL | WDF_NO_CLOSE, {WindowDefaultFlag::Modal, WindowDefaultFlag::NoClose},
_nested_bootstrap_errmsg_widgets _nested_bootstrap_errmsg_widgets
); );
@ -136,7 +136,7 @@ static constexpr NWidgetPart _nested_bootstrap_download_status_window_widgets[]
static WindowDesc _bootstrap_download_status_window_desc( static WindowDesc _bootstrap_download_status_window_desc(
WDP_CENTER, nullptr, 0, 0, WDP_CENTER, nullptr, 0, 0,
WC_NETWORK_STATUS_WINDOW, WC_NONE, WC_NETWORK_STATUS_WINDOW, WC_NONE,
WDF_MODAL | WDF_NO_CLOSE, {WindowDefaultFlag::Modal, WindowDefaultFlag::NoClose},
_nested_bootstrap_download_status_window_widgets _nested_bootstrap_download_status_window_widgets
); );
@ -188,7 +188,7 @@ static constexpr NWidgetPart _bootstrap_query_widgets[] = {
static WindowDesc _bootstrap_query_desc( static WindowDesc _bootstrap_query_desc(
WDP_CENTER, nullptr, 0, 0, WDP_CENTER, nullptr, 0, 0,
WC_CONFIRM_POPUP_QUERY, WC_NONE, WC_CONFIRM_POPUP_QUERY, WC_NONE,
WDF_NO_CLOSE, WindowDefaultFlag::NoClose,
_bootstrap_query_widgets _bootstrap_query_widgets
); );

View File

@ -337,7 +337,7 @@ static constexpr NWidgetPart _nested_build_bridge_widgets[] = {
static WindowDesc _build_bridge_desc( static WindowDesc _build_bridge_desc(
WDP_AUTO, "build_bridge", 200, 114, WDP_AUTO, "build_bridge", 200, 114,
WC_BUILD_BRIDGE, WC_BUILD_TOOLBAR, WC_BUILD_BRIDGE, WC_BUILD_TOOLBAR,
WDF_CONSTRUCTION, WindowDefaultFlag::Construction,
_nested_build_bridge_widgets _nested_build_bridge_widgets
); );

View File

@ -1921,7 +1921,7 @@ struct BuildVehicleWindow : Window {
static WindowDesc _build_vehicle_desc( static WindowDesc _build_vehicle_desc(
WDP_AUTO, "build_vehicle", 240, 268, WDP_AUTO, "build_vehicle", 240, 268,
WC_BUILD_VEHICLE, WC_NONE, WC_BUILD_VEHICLE, WC_NONE,
WDF_CONSTRUCTION, WindowDefaultFlag::Construction,
_nested_build_vehicle_widgets, _nested_build_vehicle_widgets,
&BuildVehicleWindow::hotkeys &BuildVehicleWindow::hotkeys
); );

View File

@ -644,7 +644,7 @@ struct CheatWindow : Window {
static WindowDesc _cheats_desc( static WindowDesc _cheats_desc(
WDP_AUTO, "cheats", 0, 0, WDP_AUTO, "cheats", 0, 0,
WC_CHEATS, WC_NONE, WC_CHEATS, WC_NONE,
0, {},
_nested_cheat_widgets _nested_cheat_widgets
); );

View File

@ -556,7 +556,7 @@ Money CompanyFinancesWindow::max_money = INT32_MAX;
static WindowDesc _company_finances_desc( static WindowDesc _company_finances_desc(
WDP_AUTO, "company_finances", 0, 0, WDP_AUTO, "company_finances", 0, 0,
WC_FINANCES, WC_NONE, WC_FINANCES, WC_NONE,
0, {},
_nested_company_finances_widgets _nested_company_finances_widgets
); );
@ -1103,7 +1103,7 @@ static constexpr NWidgetPart _nested_select_company_livery_widgets[] = {
static WindowDesc _select_company_livery_desc( static WindowDesc _select_company_livery_desc(
WDP_AUTO, "company_color_scheme", 0, 0, WDP_AUTO, "company_color_scheme", 0, 0,
WC_COMPANY_COLOUR, WC_NONE, WC_COMPANY_COLOUR, WC_NONE,
0, {},
_nested_select_company_livery_widgets _nested_select_company_livery_widgets
); );
@ -1728,7 +1728,7 @@ public:
static WindowDesc _select_company_manager_face_desc( static WindowDesc _select_company_manager_face_desc(
WDP_AUTO, nullptr, 0, 0, WDP_AUTO, nullptr, 0, 0,
WC_COMPANY_MANAGER_FACE, WC_NONE, WC_COMPANY_MANAGER_FACE, WC_NONE,
WDF_CONSTRUCTION, WindowDefaultFlag::Construction,
_nested_select_company_manager_face_widgets _nested_select_company_manager_face_widgets
); );
@ -2105,7 +2105,7 @@ struct CompanyInfrastructureWindow : Window
static WindowDesc _company_infrastructure_desc( static WindowDesc _company_infrastructure_desc(
WDP_AUTO, "company_infrastructure", 0, 0, WDP_AUTO, "company_infrastructure", 0, 0,
WC_COMPANY_INFRASTRUCTURE, WC_NONE, WC_COMPANY_INFRASTRUCTURE, WC_NONE,
0, {},
_nested_company_infrastructure_widgets _nested_company_infrastructure_widgets
); );
@ -2584,7 +2584,7 @@ struct CompanyWindow : Window
static WindowDesc _company_desc( static WindowDesc _company_desc(
WDP_AUTO, "company", 0, 0, WDP_AUTO, "company", 0, 0,
WC_COMPANY, WC_NONE, WC_COMPANY, WC_NONE,
0, {},
_nested_company_widgets _nested_company_widgets
); );
@ -2718,7 +2718,7 @@ static constexpr NWidgetPart _nested_buy_company_widgets[] = {
static WindowDesc _buy_company_desc( static WindowDesc _buy_company_desc(
WDP_AUTO, nullptr, 0, 0, WDP_AUTO, nullptr, 0, 0,
WC_BUY_COMPANY, WC_NONE, WC_BUY_COMPANY, WC_NONE,
WDF_CONSTRUCTION, WindowDefaultFlag::Construction,
_nested_buy_company_widgets _nested_buy_company_widgets
); );

View File

@ -139,7 +139,7 @@ static constexpr NWidgetPart _nested_console_window_widgets[] = {
static WindowDesc _console_window_desc( static WindowDesc _console_window_desc(
WDP_MANUAL, nullptr, 0, 0, WDP_MANUAL, nullptr, 0, 0,
WC_CONSOLE, WC_NONE, WC_CONSOLE, WC_NONE,
0, {},
_nested_console_window_widgets _nested_console_window_widgets
); );

View File

@ -199,7 +199,7 @@ static constexpr NWidgetPart _nested_set_date_widgets[] = {
static WindowDesc _set_date_desc( static WindowDesc _set_date_desc(
WDP_CENTER, nullptr, 0, 0, WDP_CENTER, nullptr, 0, 0,
WC_SET_DATE, WC_NONE, WC_SET_DATE, WC_NONE,
0, {},
_nested_set_date_widgets _nested_set_date_widgets
); );

View File

@ -88,28 +88,28 @@ static constexpr NWidgetPart _nested_train_depot_widgets[] = {
static WindowDesc _train_depot_desc( static WindowDesc _train_depot_desc(
WDP_AUTO, "depot_train", 362, 123, WDP_AUTO, "depot_train", 362, 123,
WC_VEHICLE_DEPOT, WC_NONE, WC_VEHICLE_DEPOT, WC_NONE,
0, {},
_nested_train_depot_widgets _nested_train_depot_widgets
); );
static WindowDesc _road_depot_desc( static WindowDesc _road_depot_desc(
WDP_AUTO, "depot_roadveh", 316, 97, WDP_AUTO, "depot_roadveh", 316, 97,
WC_VEHICLE_DEPOT, WC_NONE, WC_VEHICLE_DEPOT, WC_NONE,
0, {},
_nested_train_depot_widgets _nested_train_depot_widgets
); );
static WindowDesc _ship_depot_desc( static WindowDesc _ship_depot_desc(
WDP_AUTO, "depot_ship", 306, 99, WDP_AUTO, "depot_ship", 306, 99,
WC_VEHICLE_DEPOT, WC_NONE, WC_VEHICLE_DEPOT, WC_NONE,
0, {},
_nested_train_depot_widgets _nested_train_depot_widgets
); );
static WindowDesc _aircraft_depot_desc( static WindowDesc _aircraft_depot_desc(
WDP_AUTO, "depot_aircraft", 332, 99, WDP_AUTO, "depot_aircraft", 332, 99,
WC_VEHICLE_DEPOT, WC_NONE, WC_VEHICLE_DEPOT, WC_NONE,
0, {},
_nested_train_depot_widgets _nested_train_depot_widgets
); );

View File

@ -347,7 +347,7 @@ static constexpr NWidgetPart _nested_build_docks_toolbar_widgets[] = {
static WindowDesc _build_docks_toolbar_desc( static WindowDesc _build_docks_toolbar_desc(
WDP_ALIGN_TOOLBAR, "toolbar_water", 0, 0, WDP_ALIGN_TOOLBAR, "toolbar_water", 0, 0,
WC_BUILD_TOOLBAR, WC_NONE, WC_BUILD_TOOLBAR, WC_NONE,
WDF_CONSTRUCTION, WindowDefaultFlag::Construction,
_nested_build_docks_toolbar_widgets, _nested_build_docks_toolbar_widgets,
&BuildDocksToolbarWindow::hotkeys &BuildDocksToolbarWindow::hotkeys
); );
@ -391,7 +391,7 @@ static constexpr NWidgetPart _nested_build_docks_scen_toolbar_widgets[] = {
static WindowDesc _build_docks_scen_toolbar_desc( static WindowDesc _build_docks_scen_toolbar_desc(
WDP_AUTO, "toolbar_water_scen", 0, 0, WDP_AUTO, "toolbar_water_scen", 0, 0,
WC_SCEN_BUILD_TOOLBAR, WC_NONE, WC_SCEN_BUILD_TOOLBAR, WC_NONE,
WDF_CONSTRUCTION, WindowDefaultFlag::Construction,
_nested_build_docks_scen_toolbar_widgets _nested_build_docks_scen_toolbar_widgets
); );
@ -501,7 +501,7 @@ static constexpr NWidgetPart _nested_build_dock_station_widgets[] = {
static WindowDesc _build_dock_station_desc( static WindowDesc _build_dock_station_desc(
WDP_AUTO, nullptr, 0, 0, WDP_AUTO, nullptr, 0, 0,
WC_BUILD_STATION, WC_BUILD_TOOLBAR, WC_BUILD_STATION, WC_BUILD_TOOLBAR,
WDF_CONSTRUCTION, WindowDefaultFlag::Construction,
_nested_build_dock_station_widgets _nested_build_dock_station_widgets
); );
@ -596,7 +596,7 @@ static constexpr NWidgetPart _nested_build_docks_depot_widgets[] = {
static WindowDesc _build_docks_depot_desc( static WindowDesc _build_docks_depot_desc(
WDP_AUTO, nullptr, 0, 0, WDP_AUTO, nullptr, 0, 0,
WC_BUILD_DEPOT, WC_BUILD_TOOLBAR, WC_BUILD_DEPOT, WC_BUILD_TOOLBAR,
WDF_CONSTRUCTION, WindowDefaultFlag::Construction,
_nested_build_docks_depot_widgets _nested_build_docks_depot_widgets
); );

View File

@ -64,7 +64,7 @@ static constexpr NWidgetPart _nested_dropdown_menu_widgets[] = {
static WindowDesc _dropdown_desc( static WindowDesc _dropdown_desc(
WDP_MANUAL, nullptr, 0, 0, WDP_MANUAL, nullptr, 0, 0,
WC_DROPDOWN_MENU, WC_NONE, WC_DROPDOWN_MENU, WC_NONE,
WDF_NO_FOCUS, WindowDefaultFlag::NoFocus,
_nested_dropdown_menu_widgets _nested_dropdown_menu_widgets
); );

View File

@ -147,7 +147,7 @@ struct EnginePreviewWindow : Window {
static WindowDesc _engine_preview_desc( static WindowDesc _engine_preview_desc(
WDP_CENTER, nullptr, 0, 0, WDP_CENTER, nullptr, 0, 0,
WC_ENGINE_PREVIEW, WC_NONE, WC_ENGINE_PREVIEW, WC_NONE,
WDF_CONSTRUCTION, WindowDefaultFlag::Construction,
_nested_engine_preview_widgets _nested_engine_preview_widgets
); );

View File

@ -46,7 +46,7 @@ static constexpr NWidgetPart _nested_errmsg_widgets[] = {
static WindowDesc _errmsg_desc( static WindowDesc _errmsg_desc(
WDP_MANUAL, nullptr, 0, 0, WDP_MANUAL, nullptr, 0, 0,
WC_ERRMSG, WC_NONE, WC_ERRMSG, WC_NONE,
0, {},
_nested_errmsg_widgets _nested_errmsg_widgets
); );
@ -66,7 +66,7 @@ static constexpr NWidgetPart _nested_errmsg_face_widgets[] = {
static WindowDesc _errmsg_face_desc( static WindowDesc _errmsg_face_desc(
WDP_MANUAL, nullptr, 0, 0, WDP_MANUAL, nullptr, 0, 0,
WC_ERRMSG, WC_NONE, WC_ERRMSG, WC_NONE,
0, {},
_nested_errmsg_face_widgets _nested_errmsg_face_widgets
); );

View File

@ -950,7 +950,7 @@ public:
static WindowDesc _load_dialog_desc( static WindowDesc _load_dialog_desc(
WDP_CENTER, "load_game", 500, 294, WDP_CENTER, "load_game", 500, 294,
WC_SAVELOAD, WC_NONE, WC_SAVELOAD, WC_NONE,
0, {},
_nested_load_dialog_widgets _nested_load_dialog_widgets
); );
@ -958,7 +958,7 @@ static WindowDesc _load_dialog_desc(
static WindowDesc _load_heightmap_dialog_desc( static WindowDesc _load_heightmap_dialog_desc(
WDP_CENTER, "load_heightmap", 257, 320, WDP_CENTER, "load_heightmap", 257, 320,
WC_SAVELOAD, WC_NONE, WC_SAVELOAD, WC_NONE,
0, {},
_nested_load_heightmap_dialog_widgets _nested_load_heightmap_dialog_widgets
); );
@ -966,7 +966,7 @@ static WindowDesc _load_heightmap_dialog_desc(
static WindowDesc _load_town_data_dialog_desc( static WindowDesc _load_town_data_dialog_desc(
WDP_CENTER, "load_town_data", 257, 320, WDP_CENTER, "load_town_data", 257, 320,
WC_SAVELOAD, WC_NONE, WC_SAVELOAD, WC_NONE,
0, {},
_nested_load_town_data_dialog_widgets _nested_load_town_data_dialog_widgets
); );
@ -974,7 +974,7 @@ static WindowDesc _load_town_data_dialog_desc(
static WindowDesc _save_dialog_desc( static WindowDesc _save_dialog_desc(
WDP_CENTER, "save_game", 500, 294, WDP_CENTER, "save_game", 500, 294,
WC_SAVELOAD, WC_NONE, WC_SAVELOAD, WC_NONE,
0, {},
_nested_save_dialog_widgets _nested_save_dialog_widgets
); );

View File

@ -723,7 +723,7 @@ struct FramerateWindow : Window {
static WindowDesc _framerate_display_desc( static WindowDesc _framerate_display_desc(
WDP_AUTO, "framerate_display", 0, 0, WDP_AUTO, "framerate_display", 0, 0,
WC_FRAMERATE_DISPLAY, WC_NONE, WC_FRAMERATE_DISPLAY, WC_NONE,
0, {},
_framerate_window_widgets _framerate_window_widgets
); );
@ -1014,7 +1014,7 @@ struct FrametimeGraphWindow : Window {
static WindowDesc _frametime_graph_window_desc( static WindowDesc _frametime_graph_window_desc(
WDP_AUTO, "frametime_graph", 140, 90, WDP_AUTO, "frametime_graph", 140, 90,
WC_FRAMETIME_GRAPH, WC_NONE, WC_FRAMETIME_GRAPH, WC_NONE,
0, {},
_frametime_graph_window_widgets _frametime_graph_window_widgets
); );

View File

@ -77,7 +77,7 @@ static constexpr NWidgetPart _nested_gs_config_widgets[] = {
static WindowDesc _gs_config_desc( static WindowDesc _gs_config_desc(
WDP_CENTER, "settings_gs_config", 500, 350, WDP_CENTER, "settings_gs_config", 500, 350,
WC_GAME_OPTIONS, WC_NONE, WC_GAME_OPTIONS, WC_NONE,
0, {},
_nested_gs_config_widgets _nested_gs_config_widgets
); );

View File

@ -1003,14 +1003,14 @@ struct GenerateLandscapeWindow : public Window {
static WindowDesc _generate_landscape_desc( static WindowDesc _generate_landscape_desc(
WDP_CENTER, nullptr, 0, 0, WDP_CENTER, nullptr, 0, 0,
WC_GENERATE_LANDSCAPE, WC_NONE, WC_GENERATE_LANDSCAPE, WC_NONE,
0, {},
_nested_generate_landscape_widgets _nested_generate_landscape_widgets
); );
static WindowDesc _heightmap_load_desc( static WindowDesc _heightmap_load_desc(
WDP_CENTER, nullptr, 0, 0, WDP_CENTER, nullptr, 0, 0,
WC_GENERATE_LANDSCAPE, WC_NONE, WC_GENERATE_LANDSCAPE, WC_NONE,
0, {},
_nested_heightmap_load_widgets _nested_heightmap_load_widgets
); );
@ -1313,7 +1313,7 @@ static constexpr NWidgetPart _nested_create_scenario_widgets[] = {
static WindowDesc _create_scenario_desc( static WindowDesc _create_scenario_desc(
WDP_CENTER, nullptr, 0, 0, WDP_CENTER, nullptr, 0, 0,
WC_GENERATE_LANDSCAPE, WC_NONE, WC_GENERATE_LANDSCAPE, WC_NONE,
0, {},
_nested_create_scenario_widgets _nested_create_scenario_widgets
); );
@ -1339,7 +1339,7 @@ static constexpr NWidgetPart _nested_generate_progress_widgets[] = {
static WindowDesc _generate_progress_desc( static WindowDesc _generate_progress_desc(
WDP_CENTER, nullptr, 0, 0, WDP_CENTER, nullptr, 0, 0,
WC_MODAL_PROGRESS, WC_NONE, WC_MODAL_PROGRESS, WC_NONE,
WDF_NO_CLOSE, WindowDefaultFlag::NoClose,
_nested_generate_progress_widgets _nested_generate_progress_widgets
); );

View File

@ -305,7 +305,7 @@ static constexpr NWidgetPart _nested_goals_list_widgets[] = {
static WindowDesc _goals_list_desc( static WindowDesc _goals_list_desc(
WDP_AUTO, "list_goals", 500, 127, WDP_AUTO, "list_goals", 500, 127,
WC_GOALS_LIST, WC_NONE, WC_GOALS_LIST, WC_NONE,
0, {},
_nested_goals_list_widgets _nested_goals_list_widgets
); );
@ -449,25 +449,25 @@ static WindowDesc _goal_question_list_desc[] = {
{ {
WDP_CENTER, nullptr, 0, 0, WDP_CENTER, nullptr, 0, 0,
WC_GOAL_QUESTION, WC_NONE, WC_GOAL_QUESTION, WC_NONE,
WDF_CONSTRUCTION, WindowDefaultFlag::Construction,
_nested_goal_question_widgets_question, _nested_goal_question_widgets_question,
}, },
{ {
WDP_CENTER, nullptr, 0, 0, WDP_CENTER, nullptr, 0, 0,
WC_GOAL_QUESTION, WC_NONE, WC_GOAL_QUESTION, WC_NONE,
WDF_CONSTRUCTION, WindowDefaultFlag::Construction,
_nested_goal_question_widgets_info, _nested_goal_question_widgets_info,
}, },
{ {
WDP_CENTER, nullptr, 0, 0, WDP_CENTER, nullptr, 0, 0,
WC_GOAL_QUESTION, WC_NONE, WC_GOAL_QUESTION, WC_NONE,
WDF_CONSTRUCTION, WindowDefaultFlag::Construction,
_nested_goal_question_widgets_warning, _nested_goal_question_widgets_warning,
}, },
{ {
WDP_CENTER, nullptr, 0, 0, WDP_CENTER, nullptr, 0, 0,
WC_GOAL_QUESTION, WC_NONE, WC_GOAL_QUESTION, WC_NONE,
WDF_CONSTRUCTION, WindowDefaultFlag::Construction,
_nested_goal_question_widgets_error, _nested_goal_question_widgets_error,
}, },
}; };

View File

@ -146,7 +146,7 @@ static constexpr NWidgetPart _nested_graph_legend_widgets[] = {
static WindowDesc _graph_legend_desc( static WindowDesc _graph_legend_desc(
WDP_AUTO, "graph_legend", 0, 0, WDP_AUTO, "graph_legend", 0, 0,
WC_GRAPH_LEGEND, WC_NONE, WC_GRAPH_LEGEND, WC_NONE,
0, {},
_nested_graph_legend_widgets _nested_graph_legend_widgets
); );
@ -775,7 +775,7 @@ static constexpr NWidgetPart _nested_operating_profit_widgets[] = {
static WindowDesc _operating_profit_desc( static WindowDesc _operating_profit_desc(
WDP_AUTO, "graph_operating_profit", 0, 0, WDP_AUTO, "graph_operating_profit", 0, 0,
WC_OPERATING_PROFIT, WC_NONE, WC_OPERATING_PROFIT, WC_NONE,
0, {},
_nested_operating_profit_widgets _nested_operating_profit_widgets
); );
@ -834,7 +834,7 @@ static constexpr NWidgetPart _nested_income_graph_widgets[] = {
static WindowDesc _income_graph_desc( static WindowDesc _income_graph_desc(
WDP_AUTO, "graph_income", 0, 0, WDP_AUTO, "graph_income", 0, 0,
WC_INCOME_GRAPH, WC_NONE, WC_INCOME_GRAPH, WC_NONE,
0, {},
_nested_income_graph_widgets _nested_income_graph_widgets
); );
@ -891,7 +891,7 @@ static constexpr NWidgetPart _nested_delivered_cargo_graph_widgets[] = {
static WindowDesc _delivered_cargo_graph_desc( static WindowDesc _delivered_cargo_graph_desc(
WDP_AUTO, "graph_delivered_cargo", 0, 0, WDP_AUTO, "graph_delivered_cargo", 0, 0,
WC_DELIVERED_CARGO, WC_NONE, WC_DELIVERED_CARGO, WC_NONE,
0, {},
_nested_delivered_cargo_graph_widgets _nested_delivered_cargo_graph_widgets
); );
@ -955,7 +955,7 @@ static constexpr NWidgetPart _nested_performance_history_widgets[] = {
static WindowDesc _performance_history_desc( static WindowDesc _performance_history_desc(
WDP_AUTO, "graph_performance", 0, 0, WDP_AUTO, "graph_performance", 0, 0,
WC_PERFORMANCE_HISTORY, WC_NONE, WC_PERFORMANCE_HISTORY, WC_NONE,
0, {},
_nested_performance_history_widgets _nested_performance_history_widgets
); );
@ -1012,7 +1012,7 @@ static constexpr NWidgetPart _nested_company_value_graph_widgets[] = {
static WindowDesc _company_value_graph_desc( static WindowDesc _company_value_graph_desc(
WDP_AUTO, "graph_company_value", 0, 0, WDP_AUTO, "graph_company_value", 0, 0,
WC_COMPANY_VALUE, WC_NONE, WC_COMPANY_VALUE, WC_NONE,
0, {},
_nested_company_value_graph_widgets _nested_company_value_graph_widgets
); );
@ -1246,7 +1246,7 @@ static constexpr NWidgetPart _nested_cargo_payment_rates_widgets[] = {
static WindowDesc _cargo_payment_rates_desc( static WindowDesc _cargo_payment_rates_desc(
WDP_AUTO, "graph_cargo_payment_rates", 0, 0, WDP_AUTO, "graph_cargo_payment_rates", 0, 0,
WC_PAYMENT_RATES, WC_NONE, WC_PAYMENT_RATES, WC_NONE,
0, {},
_nested_cargo_payment_rates_widgets _nested_cargo_payment_rates_widgets
); );
@ -1767,7 +1767,7 @@ static constexpr NWidgetPart _nested_industry_production_widgets[] = {
static WindowDesc _industry_production_desc( static WindowDesc _industry_production_desc(
WDP_AUTO, "graph_industry_production", 0, 0, WDP_AUTO, "graph_industry_production", 0, 0,
WC_INDUSTRY_PRODUCTION, WC_INDUSTRY_VIEW, WC_INDUSTRY_PRODUCTION, WC_INDUSTRY_VIEW,
0, {},
_nested_industry_production_widgets _nested_industry_production_widgets
); );
@ -1830,7 +1830,7 @@ static constexpr NWidgetPart _nested_performance_rating_detail_widgets[] = {
static WindowDesc _performance_rating_detail_desc( static WindowDesc _performance_rating_detail_desc(
WDP_AUTO, "league_details", 0, 0, WDP_AUTO, "league_details", 0, 0,
WC_PERFORMANCE_DETAIL, WC_NONE, WC_PERFORMANCE_DETAIL, WC_NONE,
0, {},
_nested_performance_rating_detail_widgets _nested_performance_rating_detail_widgets
); );

View File

@ -1154,25 +1154,25 @@ static WindowDesc _vehicle_group_desc[] = {
{ {
WDP_AUTO, "list_groups_train", 525, 246, WDP_AUTO, "list_groups_train", 525, 246,
WC_TRAINS_LIST, WC_NONE, WC_TRAINS_LIST, WC_NONE,
0, {},
_nested_group_widgets _nested_group_widgets
}, },
{ {
WDP_AUTO, "list_groups_roadveh", 460, 246, WDP_AUTO, "list_groups_roadveh", 460, 246,
WC_ROADVEH_LIST, WC_NONE, WC_ROADVEH_LIST, WC_NONE,
0, {},
_nested_group_widgets _nested_group_widgets
}, },
{ {
WDP_AUTO, "list_groups_ship", 460, 246, WDP_AUTO, "list_groups_ship", 460, 246,
WC_SHIPS_LIST, WC_NONE, WC_SHIPS_LIST, WC_NONE,
0, {},
_nested_group_widgets _nested_group_widgets
}, },
{ {
WDP_AUTO, "list_groups_aircraft", 460, 246, WDP_AUTO, "list_groups_aircraft", 460, 246,
WC_AIRCRAFT_LIST, WC_NONE, WC_AIRCRAFT_LIST, WC_NONE,
0, {},
_nested_group_widgets _nested_group_widgets
}, },
}; };

View File

@ -193,7 +193,7 @@ static constexpr NWidgetPart _nested_helpwin_widgets[] = {
static WindowDesc _helpwin_desc( static WindowDesc _helpwin_desc(
WDP_CENTER, nullptr, 0, 0, WDP_CENTER, nullptr, 0, 0,
WC_HELPWIN, WC_NONE, WC_HELPWIN, WC_NONE,
0, {},
_nested_helpwin_widgets _nested_helpwin_widgets
); );

View File

@ -217,14 +217,14 @@ static constexpr NWidgetPart _nested_highscore_widgets[] = {
static WindowDesc _highscore_desc( static WindowDesc _highscore_desc(
WDP_MANUAL, nullptr, 0, 0, WDP_MANUAL, nullptr, 0, 0,
WC_HIGHSCORE, WC_NONE, WC_HIGHSCORE, WC_NONE,
0, {},
_nested_highscore_widgets _nested_highscore_widgets
); );
static WindowDesc _endgame_desc( static WindowDesc _endgame_desc(
WDP_MANUAL, nullptr, 0, 0, WDP_MANUAL, nullptr, 0, 0,
WC_ENDSCREEN, WC_NONE, WC_ENDSCREEN, WC_NONE,
0, {},
_nested_highscore_widgets _nested_highscore_widgets
); );

View File

@ -299,7 +299,7 @@ static constexpr NWidgetPart _nested_build_industry_widgets[] = {
static WindowDesc _build_industry_desc( static WindowDesc _build_industry_desc(
WDP_AUTO, "build_industry", 170, 212, WDP_AUTO, "build_industry", 170, 212,
WC_BUILD_INDUSTRY, WC_NONE, WC_BUILD_INDUSTRY, WC_NONE,
WDF_CONSTRUCTION, WindowDefaultFlag::Construction,
_nested_build_industry_widgets _nested_build_industry_widgets
); );
@ -1241,7 +1241,7 @@ static constexpr NWidgetPart _nested_industry_view_widgets[] = {
static WindowDesc _industry_view_desc( static WindowDesc _industry_view_desc(
WDP_AUTO, "view_industry", 260, 120, WDP_AUTO, "view_industry", 260, 120,
WC_INDUSTRY_VIEW, WC_NONE, WC_INDUSTRY_VIEW, WC_NONE,
0, {},
_nested_industry_view_widgets _nested_industry_view_widgets
); );
@ -1942,7 +1942,7 @@ CargoType IndustryDirectoryWindow::produced_cargo_filter = CargoFilterCriteria::
static WindowDesc _industry_directory_desc( static WindowDesc _industry_directory_desc(
WDP_AUTO, "list_industries", 428, 190, WDP_AUTO, "list_industries", 428, 190,
WC_INDUSTRY_DIRECTORY, WC_NONE, WC_INDUSTRY_DIRECTORY, WC_NONE,
0, {},
_nested_industry_directory_widgets, _nested_industry_directory_widgets,
&IndustryDirectoryWindow::hotkeys &IndustryDirectoryWindow::hotkeys
); );
@ -1981,7 +1981,7 @@ static constexpr NWidgetPart _nested_industry_cargoes_widgets[] = {
static WindowDesc _industry_cargoes_desc( static WindowDesc _industry_cargoes_desc(
WDP_AUTO, "industry_cargoes", 300, 210, WDP_AUTO, "industry_cargoes", 300, 210,
WC_INDUSTRY_CARGOES, WC_NONE, WC_INDUSTRY_CARGOES, WC_NONE,
0, {},
_nested_industry_cargoes_widgets _nested_industry_cargoes_widgets
); );

View File

@ -459,7 +459,7 @@ static constexpr NWidgetPart _nested_select_game_widgets[] = {
static WindowDesc _select_game_desc( static WindowDesc _select_game_desc(
WDP_CENTER, nullptr, 0, 0, WDP_CENTER, nullptr, 0, 0,
WC_SELECT_GAME, WC_NONE, WC_SELECT_GAME, WC_NONE,
WDF_NO_CLOSE, WindowDefaultFlag::NoClose,
_nested_select_game_widgets _nested_select_game_widgets
); );

View File

@ -203,7 +203,7 @@ static constexpr NWidgetPart _nested_performance_league_widgets[] = {
static WindowDesc _performance_league_desc( static WindowDesc _performance_league_desc(
WDP_AUTO, "performance_league", 0, 0, WDP_AUTO, "performance_league", 0, 0,
WC_COMPANY_LEAGUE, WC_NONE, WC_COMPANY_LEAGUE, WC_NONE,
0, {},
_nested_performance_league_widgets _nested_performance_league_widgets
); );
@ -438,7 +438,7 @@ static constexpr NWidgetPart _nested_script_league_widgets[] = {
static WindowDesc _script_league_desc( static WindowDesc _script_league_desc(
WDP_AUTO, "script_league", 0, 0, WDP_AUTO, "script_league", 0, 0,
WC_COMPANY_LEAGUE, WC_NONE, WC_COMPANY_LEAGUE, WC_NONE,
0, {},
_nested_script_league_widgets _nested_script_league_widgets
); );

View File

@ -539,7 +539,7 @@ static_assert(WID_LGL_SATURATION_LAST - WID_LGL_SATURATION_FIRST ==
static WindowDesc _linkgraph_legend_desc( static WindowDesc _linkgraph_legend_desc(
WDP_AUTO, "toolbar_linkgraph", 0, 0, WDP_AUTO, "toolbar_linkgraph", 0, 0,
WC_LINKGRAPH_LEGEND, WC_NONE, WC_LINKGRAPH_LEGEND, WC_NONE,
0, {},
_nested_linkgraph_legend_widgets _nested_linkgraph_legend_widgets
); );

View File

@ -521,7 +521,7 @@ struct MainWindow : Window
static WindowDesc _main_window_desc( static WindowDesc _main_window_desc(
WDP_MANUAL, nullptr, 0, 0, WDP_MANUAL, nullptr, 0, 0,
WC_MAIN_WINDOW, WC_NONE, WC_MAIN_WINDOW, WC_NONE,
WDF_NO_CLOSE, WindowDefaultFlag::NoClose,
_nested_main_window_widgets, _nested_main_window_widgets,
&MainWindow::hotkeys &MainWindow::hotkeys
); );

View File

@ -63,7 +63,7 @@ static constexpr NWidgetPart _nested_land_info_widgets[] = {
static WindowDesc _land_info_desc( static WindowDesc _land_info_desc(
WDP_AUTO, nullptr, 0, 0, WDP_AUTO, nullptr, 0, 0,
WC_LAND_INFO, WC_NONE, WC_LAND_INFO, WC_NONE,
0, {},
_nested_land_info_widgets _nested_land_info_widgets
); );
@ -381,7 +381,7 @@ static constexpr NWidgetPart _nested_about_widgets[] = {
static WindowDesc _about_desc( static WindowDesc _about_desc(
WDP_CENTER, nullptr, 0, 0, WDP_CENTER, nullptr, 0, 0,
WC_GAME_OPTIONS, WC_NONE, WC_GAME_OPTIONS, WC_NONE,
0, {},
_nested_about_widgets _nested_about_widgets
); );
@ -640,7 +640,7 @@ static constexpr NWidgetPart _nested_tooltips_widgets[] = {
static WindowDesc _tool_tips_desc( static WindowDesc _tool_tips_desc(
WDP_MANUAL, nullptr, 0, 0, // Coordinates and sizes are not used, WDP_MANUAL, nullptr, 0, 0, // Coordinates and sizes are not used,
WC_TOOLTIPS, WC_NONE, WC_TOOLTIPS, WC_NONE,
WDF_NO_FOCUS | WDF_NO_CLOSE, {WindowDefaultFlag::NoFocus, WindowDefaultFlag::NoClose},
_nested_tooltips_widgets _nested_tooltips_widgets
); );
@ -1043,7 +1043,7 @@ static constexpr NWidgetPart _nested_query_string_widgets[] = {
static WindowDesc _query_string_desc( static WindowDesc _query_string_desc(
WDP_CENTER, nullptr, 0, 0, WDP_CENTER, nullptr, 0, 0,
WC_QUERY_STRING, WC_NONE, WC_QUERY_STRING, WC_NONE,
0, {},
_nested_query_string_widgets _nested_query_string_widgets
); );
@ -1186,7 +1186,7 @@ static constexpr NWidgetPart _nested_query_widgets[] = {
static WindowDesc _query_desc( static WindowDesc _query_desc(
WDP_CENTER, nullptr, 0, 0, WDP_CENTER, nullptr, 0, 0,
WC_CONFIRM_POPUP_QUERY, WC_NONE, WC_CONFIRM_POPUP_QUERY, WC_NONE,
WDF_MODAL, WindowDefaultFlag::Modal,
_nested_query_widgets _nested_query_widgets
); );

View File

@ -670,7 +670,7 @@ static constexpr NWidgetPart _nested_music_track_selection_widgets[] = {
static WindowDesc _music_track_selection_desc( static WindowDesc _music_track_selection_desc(
WDP_AUTO, nullptr, 0, 0, WDP_AUTO, nullptr, 0, 0,
WC_MUSIC_TRACK_SELECTION, WC_NONE, WC_MUSIC_TRACK_SELECTION, WC_NONE,
0, {},
_nested_music_track_selection_widgets _nested_music_track_selection_widgets
); );
@ -929,7 +929,7 @@ static constexpr NWidgetPart _nested_music_window_widgets[] = {
static WindowDesc _music_window_desc( static WindowDesc _music_window_desc(
WDP_AUTO, "music", 0, 0, WDP_AUTO, "music", 0, 0,
WC_MUSIC_WINDOW, WC_NONE, WC_MUSIC_WINDOW, WC_NONE,
0, {},
_nested_music_window_widgets _nested_music_window_widgets
); );

View File

@ -432,7 +432,7 @@ static constexpr NWidgetPart _nested_chat_window_widgets[] = {
static WindowDesc _chat_window_desc( static WindowDesc _chat_window_desc(
WDP_MANUAL, nullptr, 0, 0, WDP_MANUAL, nullptr, 0, 0,
WC_SEND_NETWORK_MSG, WC_NONE, WC_SEND_NETWORK_MSG, WC_NONE,
0, {},
_nested_chat_window_widgets _nested_chat_window_widgets
); );

View File

@ -97,7 +97,7 @@ static constexpr NWidgetPart _nested_network_content_download_status_window_widg
static WindowDesc _network_content_download_status_window_desc( static WindowDesc _network_content_download_status_window_desc(
WDP_CENTER, nullptr, 0, 0, WDP_CENTER, nullptr, 0, 0,
WC_NETWORK_STATUS_WINDOW, WC_NONE, WC_NETWORK_STATUS_WINDOW, WC_NONE,
WDF_MODAL, WindowDefaultFlag::Modal,
_nested_network_content_download_status_window_widgets _nested_network_content_download_status_window_widgets
); );
@ -1116,7 +1116,7 @@ static constexpr NWidgetPart _nested_network_content_list_widgets[] = {
static WindowDesc _network_content_list_desc( static WindowDesc _network_content_list_desc(
WDP_CENTER, "list_content", 630, 460, WDP_CENTER, "list_content", 630, 460,
WC_NETWORK_WINDOW, WC_NONE, WC_NETWORK_WINDOW, WC_NONE,
0, {},
_nested_network_content_list_widgets _nested_network_content_list_widgets
); );

View File

@ -964,7 +964,7 @@ static constexpr NWidgetPart _nested_network_game_widgets[] = {
static WindowDesc _network_game_window_desc( static WindowDesc _network_game_window_desc(
WDP_CENTER, "list_servers", 1000, 730, WDP_CENTER, "list_servers", 1000, 730,
WC_NETWORK_WINDOW, WC_NONE, WC_NETWORK_WINDOW, WC_NONE,
0, {},
_nested_network_game_widgets _nested_network_game_widgets
); );
@ -1231,7 +1231,7 @@ static constexpr NWidgetPart _nested_network_start_server_window_widgets[] = {
static WindowDesc _network_start_server_window_desc( static WindowDesc _network_start_server_window_desc(
WDP_CENTER, nullptr, 0, 0, WDP_CENTER, nullptr, 0, 0,
WC_NETWORK_WINDOW, WC_NONE, WC_NETWORK_WINDOW, WC_NONE,
0, {},
_nested_network_start_server_window_widgets _nested_network_start_server_window_widgets
); );
@ -1305,7 +1305,7 @@ static constexpr NWidgetPart _nested_client_list_widgets[] = {
static WindowDesc _client_list_desc( static WindowDesc _client_list_desc(
WDP_AUTO, "list_clients", 220, 300, WDP_AUTO, "list_clients", 220, 300,
WC_CLIENT_LIST, WC_NONE, WC_CLIENT_LIST, WC_NONE,
0, {},
_nested_client_list_widgets _nested_client_list_widgets
); );
@ -2200,7 +2200,7 @@ static constexpr NWidgetPart _nested_network_join_status_window_widgets[] = {
static WindowDesc _network_join_status_window_desc( static WindowDesc _network_join_status_window_desc(
WDP_CENTER, nullptr, 0, 0, WDP_CENTER, nullptr, 0, 0,
WC_NETWORK_STATUS_WINDOW, WC_NONE, WC_NETWORK_STATUS_WINDOW, WC_NONE,
WDF_MODAL, WindowDefaultFlag::Modal,
_nested_network_join_status_window_widgets _nested_network_join_status_window_widgets
); );
@ -2317,7 +2317,7 @@ static constexpr NWidgetPart _nested_network_ask_relay_widgets[] = {
static WindowDesc _network_ask_relay_desc( static WindowDesc _network_ask_relay_desc(
WDP_CENTER, nullptr, 0, 0, WDP_CENTER, nullptr, 0, 0,
WC_NETWORK_ASK_RELAY, WC_NONE, WC_NETWORK_ASK_RELAY, WC_NONE,
WDF_MODAL, WindowDefaultFlag::Modal,
_nested_network_ask_relay_widgets _nested_network_ask_relay_widgets
); );
@ -2415,7 +2415,7 @@ static constexpr NWidgetPart _nested_network_ask_survey_widgets[] = {
static WindowDesc _network_ask_survey_desc( static WindowDesc _network_ask_survey_desc(
WDP_CENTER, nullptr, 0, 0, WDP_CENTER, nullptr, 0, 0,
WC_NETWORK_ASK_SURVEY, WC_NONE, WC_NETWORK_ASK_SURVEY, WC_NONE,
WDF_MODAL, WindowDefaultFlag::Modal,
_nested_network_ask_survey_widgets _nested_network_ask_survey_widgets
); );

View File

@ -672,14 +672,14 @@ static constexpr NWidgetPart _nested_newgrf_inspect_widgets[] = {
static WindowDesc _newgrf_inspect_chain_desc( static WindowDesc _newgrf_inspect_chain_desc(
WDP_AUTO, "newgrf_inspect_chain", 400, 300, WDP_AUTO, "newgrf_inspect_chain", 400, 300,
WC_NEWGRF_INSPECT, WC_NONE, WC_NEWGRF_INSPECT, WC_NONE,
0, {},
_nested_newgrf_inspect_chain_widgets _nested_newgrf_inspect_chain_widgets
); );
static WindowDesc _newgrf_inspect_desc( static WindowDesc _newgrf_inspect_desc(
WDP_AUTO, "newgrf_inspect", 400, 300, WDP_AUTO, "newgrf_inspect", 400, 300,
WC_NEWGRF_INSPECT, WC_NONE, WC_NEWGRF_INSPECT, WC_NONE,
0, {},
_nested_newgrf_inspect_widgets _nested_newgrf_inspect_widgets
); );
@ -1203,7 +1203,7 @@ static constexpr NWidgetPart _nested_sprite_aligner_widgets[] = {
static WindowDesc _sprite_aligner_desc( static WindowDesc _sprite_aligner_desc(
WDP_AUTO, "sprite_aligner", 400, 300, WDP_AUTO, "sprite_aligner", 400, 300,
WC_SPRITE_ALIGNER, WC_NONE, WC_SPRITE_ALIGNER, WC_NONE,
0, {},
_nested_sprite_aligner_widgets _nested_sprite_aligner_widgets
); );

View File

@ -541,7 +541,7 @@ static constexpr NWidgetPart _nested_newgrf_parameter_widgets[] = {
static WindowDesc _newgrf_parameters_desc( static WindowDesc _newgrf_parameters_desc(
WDP_CENTER, "settings_newgrf_config", 500, 208, WDP_CENTER, "settings_newgrf_config", 500, 208,
WC_GRF_PARAMETERS, WC_NONE, WC_GRF_PARAMETERS, WC_NONE,
0, {},
_nested_newgrf_parameter_widgets _nested_newgrf_parameter_widgets
); );
@ -1965,7 +1965,7 @@ static constexpr NWidgetPart _nested_newgrf_widgets[] = {
static WindowDesc _newgrf_desc( static WindowDesc _newgrf_desc(
WDP_CENTER, "settings_newgrf", 300, 263, WDP_CENTER, "settings_newgrf", 300, 263,
WC_GAME_OPTIONS, WC_NONE, WC_GAME_OPTIONS, WC_NONE,
0, {},
_nested_newgrf_widgets _nested_newgrf_widgets
); );
@ -2049,7 +2049,7 @@ static constexpr NWidgetPart _nested_save_preset_widgets[] = {
static WindowDesc _save_preset_desc( static WindowDesc _save_preset_desc(
WDP_CENTER, "save_preset", 140, 110, WDP_CENTER, "save_preset", 140, 110,
WC_SAVE_PRESET, WC_GAME_OPTIONS, WC_SAVE_PRESET, WC_GAME_OPTIONS,
WDF_MODAL, WindowDefaultFlag::Modal,
_nested_save_preset_widgets _nested_save_preset_widgets
); );
@ -2194,7 +2194,7 @@ static constexpr NWidgetPart _nested_scan_progress_widgets[] = {
static WindowDesc _scan_progress_desc( static WindowDesc _scan_progress_desc(
WDP_CENTER, nullptr, 0, 0, WDP_CENTER, nullptr, 0, 0,
WC_MODAL_PROGRESS, WC_NONE, WC_MODAL_PROGRESS, WC_NONE,
0, {},
_nested_scan_progress_widgets _nested_scan_progress_widgets
); );

View File

@ -126,7 +126,7 @@ static constexpr NWidgetPart _nested_normal_news_widgets[] = {
static WindowDesc _normal_news_desc( static WindowDesc _normal_news_desc(
WDP_MANUAL, nullptr, 0, 0, WDP_MANUAL, nullptr, 0, 0,
WC_NEWS_WINDOW, WC_NONE, WC_NEWS_WINDOW, WC_NONE,
0, {},
_nested_normal_news_widgets _nested_normal_news_widgets
); );
@ -173,7 +173,7 @@ static constexpr NWidgetPart _nested_vehicle_news_widgets[] = {
static WindowDesc _vehicle_news_desc( static WindowDesc _vehicle_news_desc(
WDP_MANUAL, nullptr, 0, 0, WDP_MANUAL, nullptr, 0, 0,
WC_NEWS_WINDOW, WC_NONE, WC_NEWS_WINDOW, WC_NONE,
0, {},
_nested_vehicle_news_widgets _nested_vehicle_news_widgets
); );
@ -217,7 +217,7 @@ static constexpr NWidgetPart _nested_company_news_widgets[] = {
static WindowDesc _company_news_desc( static WindowDesc _company_news_desc(
WDP_MANUAL, nullptr, 0, 0, WDP_MANUAL, nullptr, 0, 0,
WC_NEWS_WINDOW, WC_NONE, WC_NEWS_WINDOW, WC_NONE,
0, {},
_nested_company_news_widgets _nested_company_news_widgets
); );
@ -251,7 +251,7 @@ static constexpr NWidgetPart _nested_thin_news_widgets[] = {
static WindowDesc _thin_news_desc( static WindowDesc _thin_news_desc(
WDP_MANUAL, nullptr, 0, 0, WDP_MANUAL, nullptr, 0, 0,
WC_NEWS_WINDOW, WC_NONE, WC_NEWS_WINDOW, WC_NONE,
0, {},
_nested_thin_news_widgets _nested_thin_news_widgets
); );
@ -286,7 +286,7 @@ static constexpr NWidgetPart _nested_small_news_widgets[] = {
static WindowDesc _small_news_desc( static WindowDesc _small_news_desc(
WDP_MANUAL, nullptr, 0, 0, WDP_MANUAL, nullptr, 0, 0,
WC_NEWS_WINDOW, WC_NONE, WC_NEWS_WINDOW, WC_NONE,
0, {},
_nested_small_news_widgets _nested_small_news_widgets
); );
@ -1270,7 +1270,7 @@ static constexpr NWidgetPart _nested_message_history[] = {
static WindowDesc _message_history_desc( static WindowDesc _message_history_desc(
WDP_AUTO, "list_news", 400, 140, WDP_AUTO, "list_news", 400, 140,
WC_MESSAGE_HISTORY, WC_NONE, WC_MESSAGE_HISTORY, WC_NONE,
0, {},
_nested_message_history _nested_message_history
); );

View File

@ -400,7 +400,7 @@ static constexpr NWidgetPart _nested_build_object_widgets[] = {
static WindowDesc _build_object_desc( static WindowDesc _build_object_desc(
WDP_AUTO, "build_object", 0, 0, WDP_AUTO, "build_object", 0, 0,
WC_BUILD_OBJECT, WC_BUILD_TOOLBAR, WC_BUILD_OBJECT, WC_BUILD_TOOLBAR,
WDF_CONSTRUCTION, WindowDefaultFlag::Construction,
_nested_build_object_widgets, _nested_build_object_widgets,
&BuildObjectWindow::hotkeys &BuildObjectWindow::hotkeys
); );

View File

@ -1685,7 +1685,7 @@ static constexpr NWidgetPart _nested_orders_train_widgets[] = {
static WindowDesc _orders_train_desc( static WindowDesc _orders_train_desc(
WDP_AUTO, "view_vehicle_orders_train", 384, 100, WDP_AUTO, "view_vehicle_orders_train", 384, 100,
WC_VEHICLE_ORDERS, WC_VEHICLE_VIEW, WC_VEHICLE_ORDERS, WC_VEHICLE_VIEW,
WDF_CONSTRUCTION, WindowDefaultFlag::Construction,
_nested_orders_train_widgets, _nested_orders_train_widgets,
&OrdersWindow::hotkeys &OrdersWindow::hotkeys
); );
@ -1758,7 +1758,7 @@ static constexpr NWidgetPart _nested_orders_widgets[] = {
static WindowDesc _orders_desc( static WindowDesc _orders_desc(
WDP_AUTO, "view_vehicle_orders", 384, 100, WDP_AUTO, "view_vehicle_orders", 384, 100,
WC_VEHICLE_ORDERS, WC_VEHICLE_VIEW, WC_VEHICLE_ORDERS, WC_VEHICLE_VIEW,
WDF_CONSTRUCTION, WindowDefaultFlag::Construction,
_nested_orders_widgets, _nested_orders_widgets,
&OrdersWindow::hotkeys &OrdersWindow::hotkeys
); );
@ -1785,7 +1785,7 @@ static constexpr NWidgetPart _nested_other_orders_widgets[] = {
static WindowDesc _other_orders_desc( static WindowDesc _other_orders_desc(
WDP_AUTO, "view_vehicle_orders_competitor", 384, 86, WDP_AUTO, "view_vehicle_orders_competitor", 384, 86,
WC_VEHICLE_ORDERS, WC_VEHICLE_VIEW, WC_VEHICLE_ORDERS, WC_VEHICLE_VIEW,
WDF_CONSTRUCTION, WindowDefaultFlag::Construction,
_nested_other_orders_widgets, _nested_other_orders_widgets,
&OrdersWindow::hotkeys &OrdersWindow::hotkeys
); );

View File

@ -338,7 +338,7 @@ static constexpr NWidgetPart _nested_osk_widgets[] = {
static WindowDesc _osk_desc( static WindowDesc _osk_desc(
WDP_CENTER, nullptr, 0, 0, WDP_CENTER, nullptr, 0, 0,
WC_OSK, WC_NONE, WC_OSK, WC_NONE,
0, {},
_nested_osk_widgets _nested_osk_widgets
); );

View File

@ -901,7 +901,7 @@ static constexpr NWidgetPart _nested_build_rail_widgets[] = {
static WindowDesc _build_rail_desc( static WindowDesc _build_rail_desc(
WDP_ALIGN_TOOLBAR, "toolbar_rail", 0, 0, WDP_ALIGN_TOOLBAR, "toolbar_rail", 0, 0,
WC_BUILD_TOOLBAR, WC_NONE, WC_BUILD_TOOLBAR, WC_NONE,
WDF_CONSTRUCTION, WindowDefaultFlag::Construction,
_nested_build_rail_widgets, _nested_build_rail_widgets,
&BuildRailToolbarWindow::hotkeys &BuildRailToolbarWindow::hotkeys
); );
@ -1430,7 +1430,7 @@ static constexpr NWidgetPart _nested_station_builder_widgets[] = {
static WindowDesc _station_builder_desc( static WindowDesc _station_builder_desc(
WDP_AUTO, "build_station_rail", 0, 0, WDP_AUTO, "build_station_rail", 0, 0,
WC_BUILD_STATION, WC_BUILD_TOOLBAR, WC_BUILD_STATION, WC_BUILD_TOOLBAR,
WDF_CONSTRUCTION, WindowDefaultFlag::Construction,
_nested_station_builder_widgets, _nested_station_builder_widgets,
&BuildRailStationWindow::hotkeys &BuildRailStationWindow::hotkeys
); );
@ -1686,7 +1686,7 @@ static constexpr NWidgetPart _nested_signal_builder_widgets[] = {
static WindowDesc _signal_builder_desc( static WindowDesc _signal_builder_desc(
WDP_AUTO, nullptr, 0, 0, WDP_AUTO, nullptr, 0, 0,
WC_BUILD_SIGNAL, WC_BUILD_TOOLBAR, WC_BUILD_SIGNAL, WC_BUILD_TOOLBAR,
WDF_CONSTRUCTION, WindowDefaultFlag::Construction,
_nested_signal_builder_widgets _nested_signal_builder_widgets
); );
@ -1767,7 +1767,7 @@ static constexpr NWidgetPart _nested_build_depot_widgets[] = {
static WindowDesc _build_depot_desc( static WindowDesc _build_depot_desc(
WDP_AUTO, nullptr, 0, 0, WDP_AUTO, nullptr, 0, 0,
WC_BUILD_DEPOT, WC_BUILD_TOOLBAR, WC_BUILD_DEPOT, WC_BUILD_TOOLBAR,
WDF_CONSTRUCTION, WindowDefaultFlag::Construction,
_nested_build_depot_widgets _nested_build_depot_widgets
); );
@ -1878,7 +1878,7 @@ static constexpr NWidgetPart _nested_build_waypoint_widgets[] = {
static WindowDesc _build_waypoint_desc( static WindowDesc _build_waypoint_desc(
WDP_AUTO, "build_waypoint", 0, 0, WDP_AUTO, "build_waypoint", 0, 0,
WC_BUILD_WAYPOINT, WC_BUILD_TOOLBAR, WC_BUILD_WAYPOINT, WC_BUILD_TOOLBAR,
WDF_CONSTRUCTION, WindowDefaultFlag::Construction,
_nested_build_waypoint_widgets, _nested_build_waypoint_widgets,
&BuildRailWaypointWindow::hotkeys &BuildRailWaypointWindow::hotkeys
); );

View File

@ -940,7 +940,7 @@ static constexpr NWidgetPart _nested_build_road_widgets[] = {
static WindowDesc _build_road_desc( static WindowDesc _build_road_desc(
WDP_ALIGN_TOOLBAR, "toolbar_road", 0, 0, WDP_ALIGN_TOOLBAR, "toolbar_road", 0, 0,
WC_BUILD_TOOLBAR, WC_NONE, WC_BUILD_TOOLBAR, WC_NONE,
WDF_CONSTRUCTION, WindowDefaultFlag::Construction,
_nested_build_road_widgets, _nested_build_road_widgets,
&BuildRoadToolbarWindow::road_hotkeys &BuildRoadToolbarWindow::road_hotkeys
); );
@ -983,7 +983,7 @@ static constexpr NWidgetPart _nested_build_tramway_widgets[] = {
static WindowDesc _build_tramway_desc( static WindowDesc _build_tramway_desc(
WDP_ALIGN_TOOLBAR, "toolbar_tramway", 0, 0, WDP_ALIGN_TOOLBAR, "toolbar_tramway", 0, 0,
WC_BUILD_TOOLBAR, WC_NONE, WC_BUILD_TOOLBAR, WC_NONE,
WDF_CONSTRUCTION, WindowDefaultFlag::Construction,
_nested_build_tramway_widgets, _nested_build_tramway_widgets,
&BuildRoadToolbarWindow::tram_hotkeys &BuildRoadToolbarWindow::tram_hotkeys
); );
@ -1038,7 +1038,7 @@ static constexpr NWidgetPart _nested_build_road_scen_widgets[] = {
static WindowDesc _build_road_scen_desc( static WindowDesc _build_road_scen_desc(
WDP_AUTO, "toolbar_road_scen", 0, 0, WDP_AUTO, "toolbar_road_scen", 0, 0,
WC_SCEN_BUILD_TOOLBAR, WC_NONE, WC_SCEN_BUILD_TOOLBAR, WC_NONE,
WDF_CONSTRUCTION, WindowDefaultFlag::Construction,
_nested_build_road_scen_widgets, _nested_build_road_scen_widgets,
&BuildRoadToolbarWindow::road_hotkeys &BuildRoadToolbarWindow::road_hotkeys
); );
@ -1073,7 +1073,7 @@ static constexpr NWidgetPart _nested_build_tramway_scen_widgets[] = {
static WindowDesc _build_tramway_scen_desc( static WindowDesc _build_tramway_scen_desc(
WDP_AUTO, "toolbar_tram_scen", 0, 0, WDP_AUTO, "toolbar_tram_scen", 0, 0,
WC_SCEN_BUILD_TOOLBAR, WC_NONE, WC_SCEN_BUILD_TOOLBAR, WC_NONE,
WDF_CONSTRUCTION, WindowDefaultFlag::Construction,
_nested_build_tramway_scen_widgets, _nested_build_tramway_scen_widgets,
&BuildRoadToolbarWindow::tram_hotkeys &BuildRoadToolbarWindow::tram_hotkeys
); );
@ -1170,7 +1170,7 @@ static constexpr NWidgetPart _nested_build_road_depot_widgets[] = {
static WindowDesc _build_road_depot_desc( static WindowDesc _build_road_depot_desc(
WDP_AUTO, nullptr, 0, 0, WDP_AUTO, nullptr, 0, 0,
WC_BUILD_DEPOT, WC_BUILD_TOOLBAR, WC_BUILD_DEPOT, WC_BUILD_TOOLBAR,
WDF_CONSTRUCTION, WindowDefaultFlag::Construction,
_nested_build_road_depot_widgets _nested_build_road_depot_widgets
); );
@ -1548,7 +1548,7 @@ static constexpr NWidgetPart _nested_road_station_picker_widgets[] = {
static WindowDesc _road_station_picker_desc( static WindowDesc _road_station_picker_desc(
WDP_AUTO, "build_station_road", 0, 0, WDP_AUTO, "build_station_road", 0, 0,
WC_BUS_STATION, WC_BUILD_TOOLBAR, WC_BUS_STATION, WC_BUILD_TOOLBAR,
WDF_CONSTRUCTION, WindowDefaultFlag::Construction,
_nested_road_station_picker_widgets, _nested_road_station_picker_widgets,
&BuildRoadStationWindow::road_hotkeys &BuildRoadStationWindow::road_hotkeys
); );
@ -1588,7 +1588,7 @@ static constexpr NWidgetPart _nested_tram_station_picker_widgets[] = {
static WindowDesc _tram_station_picker_desc( static WindowDesc _tram_station_picker_desc(
WDP_AUTO, "build_station_tram", 0, 0, WDP_AUTO, "build_station_tram", 0, 0,
WC_BUS_STATION, WC_BUILD_TOOLBAR, WC_BUS_STATION, WC_BUILD_TOOLBAR,
WDF_CONSTRUCTION, WindowDefaultFlag::Construction,
_nested_tram_station_picker_widgets, _nested_tram_station_picker_widgets,
&BuildRoadStationWindow::tram_hotkeys &BuildRoadStationWindow::tram_hotkeys
); );
@ -1701,7 +1701,7 @@ static constexpr NWidgetPart _nested_build_road_waypoint_widgets[] = {
static WindowDesc _build_road_waypoint_desc( static WindowDesc _build_road_waypoint_desc(
WDP_AUTO, "build_road_waypoint", 0, 0, WDP_AUTO, "build_road_waypoint", 0, 0,
WC_BUILD_WAYPOINT, WC_BUILD_TOOLBAR, WC_BUILD_WAYPOINT, WC_BUILD_TOOLBAR,
WDF_CONSTRUCTION, WindowDefaultFlag::Construction,
_nested_build_road_waypoint_widgets, _nested_build_road_waypoint_widgets,
&BuildRoadWaypointWindow::hotkeys &BuildRoadWaypointWindow::hotkeys
); );

View File

@ -67,7 +67,7 @@ static constexpr NWidgetPart _nested_screenshot[] = {
static WindowDesc _screenshot_window_desc( static WindowDesc _screenshot_window_desc(
WDP_AUTO, "take_a_screenshot", 200, 100, WDP_AUTO, "take_a_screenshot", 200, 100,
WC_SCREENSHOT, WC_NONE, WC_SCREENSHOT, WC_NONE,
0, {},
_nested_screenshot _nested_screenshot
); );

View File

@ -265,7 +265,7 @@ static constexpr NWidgetPart _nested_script_list_widgets[] = {
static WindowDesc _script_list_desc( static WindowDesc _script_list_desc(
WDP_CENTER, "settings_script_list", 200, 234, WDP_CENTER, "settings_script_list", 200, 234,
WC_SCRIPT_LIST, WC_NONE, WC_SCRIPT_LIST, WC_NONE,
0, {},
_nested_script_list_widgets _nested_script_list_widgets
); );
@ -608,7 +608,7 @@ static constexpr NWidgetPart _nested_script_settings_widgets[] = {
static WindowDesc _script_settings_desc( static WindowDesc _script_settings_desc(
WDP_CENTER, "settings_script", 500, 208, WDP_CENTER, "settings_script", 500, 208,
WC_SCRIPT_SETTINGS, WC_NONE, WC_SCRIPT_SETTINGS, WC_NONE,
0, {},
_nested_script_settings_widgets _nested_script_settings_widgets
); );
@ -1290,7 +1290,7 @@ EndContainer(),
static WindowDesc _script_debug_desc( static WindowDesc _script_debug_desc(
WDP_AUTO, "script_debug", 600, 450, WDP_AUTO, "script_debug", 600, 450,
WC_SCRIPT_DEBUG, WC_NONE, WC_SCRIPT_DEBUG, WC_NONE,
0, {},
_nested_script_debug_widgets, _nested_script_debug_widgets,
&ScriptDebugWindow::hotkeys &ScriptDebugWindow::hotkeys
); );

View File

@ -1192,7 +1192,7 @@ static constexpr NWidgetPart _nested_game_options_widgets[] = {
static WindowDesc _game_options_desc( static WindowDesc _game_options_desc(
WDP_CENTER, nullptr, 0, 0, WDP_CENTER, nullptr, 0, 0,
WC_GAME_OPTIONS, WC_NONE, WC_GAME_OPTIONS, WC_NONE,
0, {},
_nested_game_options_widgets _nested_game_options_widgets
); );
@ -2902,7 +2902,7 @@ static constexpr NWidgetPart _nested_settings_selection_widgets[] = {
static WindowDesc _settings_selection_desc( static WindowDesc _settings_selection_desc(
WDP_CENTER, "settings", 510, 450, WDP_CENTER, "settings", 510, 450,
WC_GAME_OPTIONS, WC_NONE, WC_GAME_OPTIONS, WC_NONE,
0, {},
_nested_settings_selection_widgets _nested_settings_selection_widgets
); );
@ -3210,7 +3210,7 @@ static constexpr NWidgetPart _nested_cust_currency_widgets[] = {
static WindowDesc _cust_currency_desc( static WindowDesc _cust_currency_desc(
WDP_CENTER, nullptr, 0, 0, WDP_CENTER, nullptr, 0, 0,
WC_CUSTOM_CURRENCY, WC_NONE, WC_CUSTOM_CURRENCY, WC_NONE,
0, {},
_nested_cust_currency_widgets _nested_cust_currency_widgets
); );

View File

@ -379,7 +379,7 @@ static constexpr NWidgetPart _nested_sign_list_widgets[] = {
static WindowDesc _sign_list_desc( static WindowDesc _sign_list_desc(
WDP_AUTO, "list_signs", 358, 138, WDP_AUTO, "list_signs", 358, 138,
WC_SIGN_LIST, WC_NONE, WC_SIGN_LIST, WC_NONE,
0, {},
_nested_sign_list_widgets, _nested_sign_list_widgets,
&SignListWindow::hotkeys &SignListWindow::hotkeys
); );
@ -545,7 +545,7 @@ static constexpr NWidgetPart _nested_query_sign_edit_widgets[] = {
static WindowDesc _query_sign_edit_desc( static WindowDesc _query_sign_edit_desc(
WDP_CENTER, nullptr, 0, 0, WDP_CENTER, nullptr, 0, 0,
WC_QUERY_STRING, WC_NONE, WC_QUERY_STRING, WC_NONE,
WDF_CONSTRUCTION, WindowDefaultFlag::Construction,
_nested_query_sign_edit_widgets _nested_query_sign_edit_widgets
); );

View File

@ -2054,7 +2054,7 @@ static constexpr NWidgetPart _nested_smallmap_widgets[] = {
static WindowDesc _smallmap_desc( static WindowDesc _smallmap_desc(
WDP_AUTO, "smallmap", 484, 314, WDP_AUTO, "smallmap", 484, 314,
WC_SMALLMAP, WC_NONE, WC_SMALLMAP, WC_NONE,
0, {},
_nested_smallmap_widgets _nested_smallmap_widgets
); );

View File

@ -802,7 +802,7 @@ static constexpr NWidgetPart _nested_company_stations_widgets[] = {
static WindowDesc _company_stations_desc( static WindowDesc _company_stations_desc(
WDP_AUTO, "list_stations", 358, 162, WDP_AUTO, "list_stations", 358, 162,
WC_STATION_LIST, WC_NONE, WC_STATION_LIST, WC_NONE,
0, {},
_nested_company_stations_widgets _nested_company_stations_widgets
); );
@ -2175,7 +2175,7 @@ struct StationViewWindow : public Window {
static WindowDesc _station_view_desc( static WindowDesc _station_view_desc(
WDP_AUTO, "view_station", 249, 117, WDP_AUTO, "view_station", 249, 117,
WC_STATION_VIEW, WC_NONE, WC_STATION_VIEW, WC_NONE,
0, {},
_nested_station_view_widgets _nested_station_view_widgets
); );
@ -2433,7 +2433,7 @@ struct SelectStationWindow : Window {
static WindowDesc _select_station_desc( static WindowDesc _select_station_desc(
WDP_AUTO, "build_station_join", 200, 180, WDP_AUTO, "build_station_join", 200, 180,
WC_SELECT_STATION, WC_NONE, WC_SELECT_STATION, WC_NONE,
WDF_CONSTRUCTION, WindowDefaultFlag::Construction,
_nested_select_station_widgets _nested_select_station_widgets
); );

View File

@ -231,7 +231,7 @@ static constexpr NWidgetPart _nested_main_status_widgets[] = {
static WindowDesc _main_status_desc( static WindowDesc _main_status_desc(
WDP_MANUAL, nullptr, 0, 0, WDP_MANUAL, nullptr, 0, 0,
WC_STATUS_BAR, WC_NONE, WC_STATUS_BAR, WC_NONE,
WDF_NO_FOCUS | WDF_NO_CLOSE, {WindowDefaultFlag::NoFocus, WindowDefaultFlag::NoClose},
_nested_main_status_widgets _nested_main_status_widgets
); );

View File

@ -969,14 +969,14 @@ static constexpr NWidgetPart _nested_story_book_widgets[] = {
static WindowDesc _story_book_desc( static WindowDesc _story_book_desc(
WDP_AUTO, "view_story", 400, 300, WDP_AUTO, "view_story", 400, 300,
WC_STORY_BOOK, WC_NONE, WC_STORY_BOOK, WC_NONE,
0, {},
_nested_story_book_widgets _nested_story_book_widgets
); );
static WindowDesc _story_book_gs_desc( static WindowDesc _story_book_gs_desc(
WDP_CENTER, "view_story_gs", 400, 300, WDP_CENTER, "view_story_gs", 400, 300,
WC_STORY_BOOK, WC_NONE, WC_STORY_BOOK, WC_NONE,
0, {},
_nested_story_book_widgets _nested_story_book_widgets
); );

View File

@ -270,7 +270,7 @@ static constexpr NWidgetPart _nested_subsidies_list_widgets[] = {
static WindowDesc _subsidies_list_desc( static WindowDesc _subsidies_list_desc(
WDP_AUTO, "list_subsidies", 500, 127, WDP_AUTO, "list_subsidies", 500, 127,
WC_SUBSIDIES_LIST, WC_NONE, WC_SUBSIDIES_LIST, WC_NONE,
0, {},
_nested_subsidies_list_widgets _nested_subsidies_list_widgets
); );

View File

@ -355,7 +355,7 @@ static constexpr NWidgetPart _nested_terraform_widgets[] = {
static WindowDesc _terraform_desc( static WindowDesc _terraform_desc(
WDP_MANUAL, "toolbar_landscape", 0, 0, WDP_MANUAL, "toolbar_landscape", 0, 0,
WC_SCEN_LAND_GEN, WC_NONE, WC_SCEN_LAND_GEN, WC_NONE,
WDF_CONSTRUCTION, WindowDefaultFlag::Construction,
_nested_terraform_widgets, _nested_terraform_widgets,
&TerraformToolbarWindow::hotkeys &TerraformToolbarWindow::hotkeys
); );
@ -739,7 +739,7 @@ struct ScenarioEditorLandscapeGenerationWindow : Window {
static WindowDesc _scen_edit_land_gen_desc( static WindowDesc _scen_edit_land_gen_desc(
WDP_AUTO, "toolbar_landscape_scen", 0, 0, WDP_AUTO, "toolbar_landscape_scen", 0, 0,
WC_SCEN_LAND_GEN, WC_NONE, WC_SCEN_LAND_GEN, WC_NONE,
WDF_CONSTRUCTION, WindowDefaultFlag::Construction,
_nested_scen_edit_land_gen_widgets, _nested_scen_edit_land_gen_widgets,
&ScenarioEditorLandscapeGenerationWindow::hotkeys &ScenarioEditorLandscapeGenerationWindow::hotkeys
); );

View File

@ -78,7 +78,7 @@ static constexpr NWidgetPart _nested_textfile_widgets[] = {
static WindowDesc _textfile_desc( static WindowDesc _textfile_desc(
WDP_CENTER, "textfile", 630, 460, WDP_CENTER, "textfile", 630, 460,
WC_TEXTFILE, WC_NONE, WC_TEXTFILE, WC_NONE,
0, {},
_nested_textfile_widgets _nested_textfile_widgets
); );

View File

@ -861,7 +861,7 @@ static constexpr NWidgetPart _nested_timetable_widgets[] = {
static WindowDesc _timetable_desc( static WindowDesc _timetable_desc(
WDP_AUTO, "view_vehicle_timetable", 400, 130, WDP_AUTO, "view_vehicle_timetable", 400, 130,
WC_VEHICLE_TIMETABLE, WC_VEHICLE_VIEW, WC_VEHICLE_TIMETABLE, WC_VEHICLE_VIEW,
WDF_CONSTRUCTION, WindowDefaultFlag::Construction,
_nested_timetable_widgets _nested_timetable_widgets
); );

View File

@ -2240,7 +2240,7 @@ static constexpr NWidgetPart _nested_toolbar_normal_widgets[] = {
static WindowDesc _toolb_normal_desc( static WindowDesc _toolb_normal_desc(
WDP_MANUAL, nullptr, 0, 0, WDP_MANUAL, nullptr, 0, 0,
WC_MAIN_TOOLBAR, WC_NONE, WC_MAIN_TOOLBAR, WC_NONE,
WDF_NO_FOCUS | WDF_NO_CLOSE, {WindowDefaultFlag::NoFocus, WindowDefaultFlag::NoClose},
_nested_toolbar_normal_widgets, _nested_toolbar_normal_widgets,
&MainToolbarWindow::hotkeys &MainToolbarWindow::hotkeys
); );
@ -2580,7 +2580,7 @@ static constexpr NWidgetPart _nested_toolb_scen_widgets[] = {
static WindowDesc _toolb_scen_desc( static WindowDesc _toolb_scen_desc(
WDP_MANUAL, nullptr, 0, 0, WDP_MANUAL, nullptr, 0, 0,
WC_MAIN_TOOLBAR, WC_NONE, WC_MAIN_TOOLBAR, WC_NONE,
WDF_NO_FOCUS | WDF_NO_CLOSE, {WindowDefaultFlag::NoFocus, WindowDefaultFlag::NoClose},
_nested_toolb_scen_widgets, _nested_toolb_scen_widgets,
&ScenarioEditorToolbarWindow::hotkeys &ScenarioEditorToolbarWindow::hotkeys
); );

View File

@ -350,7 +350,7 @@ public:
static WindowDesc _town_authority_desc( static WindowDesc _town_authority_desc(
WDP_AUTO, "view_town_authority", 317, 222, WDP_AUTO, "view_town_authority", 317, 222,
WC_TOWN_AUTHORITY, WC_NONE, WC_TOWN_AUTHORITY, WC_NONE,
0, {},
_nested_town_authority_widgets _nested_town_authority_widgets
); );
@ -651,7 +651,7 @@ static constexpr NWidgetPart _nested_town_game_view_widgets[] = {
static WindowDesc _town_game_view_desc( static WindowDesc _town_game_view_desc(
WDP_AUTO, "view_town", 260, TownViewWindow::WID_TV_HEIGHT_NORMAL, WDP_AUTO, "view_town", 260, TownViewWindow::WID_TV_HEIGHT_NORMAL,
WC_TOWN_VIEW, WC_NONE, WC_TOWN_VIEW, WC_NONE,
0, {},
_nested_town_game_view_widgets _nested_town_game_view_widgets
); );
@ -682,7 +682,7 @@ static constexpr NWidgetPart _nested_town_editor_view_widgets[] = {
static WindowDesc _town_editor_view_desc( static WindowDesc _town_editor_view_desc(
WDP_AUTO, "view_town_scen", 260, TownViewWindow::WID_TV_HEIGHT_NORMAL, WDP_AUTO, "view_town_scen", 260, TownViewWindow::WID_TV_HEIGHT_NORMAL,
WC_TOWN_VIEW, WC_NONE, WC_TOWN_VIEW, WC_NONE,
0, {},
_nested_town_editor_view_widgets _nested_town_editor_view_widgets
); );
@ -1076,7 +1076,7 @@ const std::initializer_list<GUITownList::SortFunction * const> TownDirectoryWind
static WindowDesc _town_directory_desc( static WindowDesc _town_directory_desc(
WDP_AUTO, "list_towns", 208, 202, WDP_AUTO, "list_towns", 208, 202,
WC_TOWN_DIRECTORY, WC_NONE, WC_TOWN_DIRECTORY, WC_NONE,
0, {},
_nested_town_directory_widgets, _nested_town_directory_widgets,
&TownDirectoryWindow::hotkeys &TownDirectoryWindow::hotkeys
); );
@ -1341,7 +1341,7 @@ public:
static WindowDesc _found_town_desc( static WindowDesc _found_town_desc(
WDP_AUTO, "build_town", 160, 162, WDP_AUTO, "build_town", 160, 162,
WC_FOUND_TOWN, WC_NONE, WC_FOUND_TOWN, WC_NONE,
WDF_CONSTRUCTION, WindowDefaultFlag::Construction,
_nested_found_town_widgets _nested_found_town_widgets
); );
@ -1779,7 +1779,7 @@ static constexpr NWidgetPart _nested_build_house_widgets[] = {
static WindowDesc _build_house_desc( static WindowDesc _build_house_desc(
WDP_AUTO, "build_house", 0, 0, WDP_AUTO, "build_house", 0, 0,
WC_BUILD_HOUSE, WC_BUILD_TOOLBAR, WC_BUILD_HOUSE, WC_BUILD_TOOLBAR,
WDF_CONSTRUCTION, WindowDefaultFlag::Construction,
_nested_build_house_widgets, _nested_build_house_widgets,
&BuildHouseWindow::hotkeys &BuildHouseWindow::hotkeys
); );

View File

@ -152,7 +152,7 @@ static constexpr NWidgetPart _nested_transparency_widgets[] = {
static WindowDesc _transparency_desc( static WindowDesc _transparency_desc(
WDP_MANUAL, "toolbar_transparency", 0, 0, WDP_MANUAL, "toolbar_transparency", 0, 0,
WC_TRANSPARENCY_TOOLBAR, WC_NONE, WC_TRANSPARENCY_TOOLBAR, WC_NONE,
0, {},
_nested_transparency_widgets _nested_transparency_widgets
); );

View File

@ -313,7 +313,7 @@ static constexpr NWidgetPart _nested_build_trees_widgets[] = {
static WindowDesc _build_trees_desc( static WindowDesc _build_trees_desc(
WDP_AUTO, "build_tree", 0, 0, WDP_AUTO, "build_tree", 0, 0,
WC_BUILD_TREES, WC_NONE, WC_BUILD_TREES, WC_NONE,
WDF_CONSTRUCTION, WindowDefaultFlag::Construction,
_nested_build_trees_widgets _nested_build_trees_widgets
); );

View File

@ -1354,7 +1354,7 @@ static constexpr NWidgetPart _nested_vehicle_refit_widgets[] = {
static WindowDesc _vehicle_refit_desc( static WindowDesc _vehicle_refit_desc(
WDP_AUTO, "view_vehicle_refit", 240, 174, WDP_AUTO, "view_vehicle_refit", 240, 174,
WC_VEHICLE_REFIT, WC_VEHICLE_VIEW, WC_VEHICLE_REFIT, WC_VEHICLE_VIEW,
WDF_CONSTRUCTION, WindowDefaultFlag::Construction,
_nested_vehicle_refit_widgets _nested_vehicle_refit_widgets
); );
@ -2304,25 +2304,25 @@ static WindowDesc _vehicle_list_desc[] = {
{ {
WDP_AUTO, "list_vehicles_train", 325, 246, WDP_AUTO, "list_vehicles_train", 325, 246,
WC_TRAINS_LIST, WC_NONE, WC_TRAINS_LIST, WC_NONE,
0, {},
_nested_vehicle_list _nested_vehicle_list
}, },
{ {
WDP_AUTO, "list_vehicles_roadveh", 260, 246, WDP_AUTO, "list_vehicles_roadveh", 260, 246,
WC_INVALID, WC_NONE, WC_INVALID, WC_NONE,
0, {},
_nested_vehicle_list _nested_vehicle_list
}, },
{ {
WDP_AUTO, "list_vehicles_ship", 260, 246, WDP_AUTO, "list_vehicles_ship", 260, 246,
WC_INVALID, WC_NONE, WC_INVALID, WC_NONE,
0, {},
_nested_vehicle_list _nested_vehicle_list
}, },
{ {
WDP_AUTO, "list_vehicles_aircraft", 260, 246, WDP_AUTO, "list_vehicles_aircraft", 260, 246,
WC_INVALID, WC_NONE, WC_INVALID, WC_NONE,
0, {},
_nested_vehicle_list _nested_vehicle_list
} }
}; };
@ -2874,7 +2874,7 @@ struct VehicleDetailsWindow : Window {
static WindowDesc _train_vehicle_details_desc( static WindowDesc _train_vehicle_details_desc(
WDP_AUTO, "view_vehicle_details_train", 405, 178, WDP_AUTO, "view_vehicle_details_train", 405, 178,
WC_VEHICLE_DETAILS, WC_VEHICLE_VIEW, WC_VEHICLE_DETAILS, WC_VEHICLE_VIEW,
0, {},
_nested_train_vehicle_details_widgets _nested_train_vehicle_details_widgets
); );
@ -2882,7 +2882,7 @@ static WindowDesc _train_vehicle_details_desc(
static WindowDesc _nontrain_vehicle_details_desc( static WindowDesc _nontrain_vehicle_details_desc(
WDP_AUTO, "view_vehicle_details", 405, 113, WDP_AUTO, "view_vehicle_details", 405, 113,
WC_VEHICLE_DETAILS, WC_VEHICLE_VIEW, WC_VEHICLE_DETAILS, WC_VEHICLE_VIEW,
0, {},
_nested_nontrain_vehicle_details_widgets _nested_nontrain_vehicle_details_widgets
); );
@ -3494,7 +3494,7 @@ public:
static WindowDesc _vehicle_view_desc( static WindowDesc _vehicle_view_desc(
WDP_AUTO, "view_vehicle", 250, 116, WDP_AUTO, "view_vehicle", 250, 116,
WC_VEHICLE_VIEW, WC_NONE, WC_VEHICLE_VIEW, WC_NONE,
0, {},
_nested_vehicle_view_widgets, _nested_vehicle_view_widgets,
&VehicleViewWindow::hotkeys &VehicleViewWindow::hotkeys
); );
@ -3506,7 +3506,7 @@ static WindowDesc _vehicle_view_desc(
static WindowDesc _train_view_desc( static WindowDesc _train_view_desc(
WDP_AUTO, "view_vehicle_train", 250, 134, WDP_AUTO, "view_vehicle_train", 250, 134,
WC_VEHICLE_VIEW, WC_NONE, WC_VEHICLE_VIEW, WC_NONE,
0, {},
_nested_vehicle_view_widgets, _nested_vehicle_view_widgets,
&VehicleViewWindow::hotkeys &VehicleViewWindow::hotkeys
); );

View File

@ -145,7 +145,7 @@ public:
static WindowDesc _extra_viewport_desc( static WindowDesc _extra_viewport_desc(
WDP_AUTO, "extra_viewport", 300, 268, WDP_AUTO, "extra_viewport", 300, 268,
WC_EXTRA_VIEWPORT, WC_NONE, WC_EXTRA_VIEWPORT, WC_NONE,
0, {},
_nested_extra_viewport_widgets _nested_extra_viewport_widgets
); );

View File

@ -212,7 +212,7 @@ static constexpr NWidgetPart _nested_waypoint_view_widgets[] = {
static WindowDesc _waypoint_view_desc( static WindowDesc _waypoint_view_desc(
WDP_AUTO, "view_waypoint", 260, 118, WDP_AUTO, "view_waypoint", 260, 118,
WC_WAYPOINT_VIEW, WC_NONE, WC_WAYPOINT_VIEW, WC_NONE,
0, {},
_nested_waypoint_view_widgets _nested_waypoint_view_widgets
); );

View File

@ -103,7 +103,7 @@ std::string _windows_file;
/** Window description constructor. */ /** Window description constructor. */
WindowDesc::WindowDesc(WindowPosition def_pos, const char *ini_key, int16_t def_width_trad, int16_t def_height_trad, WindowDesc::WindowDesc(WindowPosition def_pos, const char *ini_key, int16_t def_width_trad, int16_t def_height_trad,
WindowClass window_class, WindowClass parent_class, uint32_t flags, WindowClass window_class, WindowClass parent_class, WindowDefaultFlags flags,
const std::span<const NWidgetPart> nwid_parts, HotkeyList *hotkeys, const std::span<const NWidgetPart> nwid_parts, HotkeyList *hotkeys,
const std::source_location location) : const std::source_location location) :
source_location(location), source_location(location),
@ -612,7 +612,7 @@ static void DispatchLeftClickEvent(Window *w, int x, int y, int click_count)
bool focused_widget_changed = false; bool focused_widget_changed = false;
/* If clicked on a window that previously did not have focus */ /* If clicked on a window that previously did not have focus */
if (_focused_window != w && // We already have focus, right? if (_focused_window != w && // We already have focus, right?
(w->window_desc.flags & WDF_NO_FOCUS) == 0 && // Don't lose focus to toolbars !w->window_desc.flags.Test(WindowDefaultFlag::NoFocus) && // Don't lose focus to toolbars
widget_type != WWT_CLOSEBOX) { // Don't change focused window if 'X' (close button) was clicked widget_type != WWT_CLOSEBOX) { // Don't change focused window if 'X' (close button) was clicked
focused_widget_changed = true; focused_widget_changed = true;
SetFocusedWindow(w); SetFocusedWindow(w);
@ -748,9 +748,9 @@ static void DispatchRightClickEvent(Window *w, int x, int y)
} }
/* Right-click close is enabled and there is a closebox. */ /* Right-click close is enabled and there is a closebox. */
if (_settings_client.gui.right_click_wnd_close == RCC_YES && (w->window_desc.flags & WDF_NO_CLOSE) == 0) { if (_settings_client.gui.right_click_wnd_close == RCC_YES && !w->window_desc.flags.Test(WindowDefaultFlag::NoClose)) {
w->Close(); w->Close();
} else if (_settings_client.gui.right_click_wnd_close == RCC_YES_EXCEPT_STICKY && !w->flags.Test(WindowFlag::Sticky) && (w->window_desc.flags & WDF_NO_CLOSE) == 0) { } else if (_settings_client.gui.right_click_wnd_close == RCC_YES_EXCEPT_STICKY && !w->flags.Test(WindowFlag::Sticky) && !w->window_desc.flags.Test(WindowDefaultFlag::NoClose)) {
/* Right-click close is enabled, but excluding sticky windows. */ /* Right-click close is enabled, but excluding sticky windows. */
w->Close(); w->Close();
} else if (_settings_client.gui.hover_delay_ms == 0 && !w->OnTooltip(pt, wid->GetIndex(), TCC_RIGHT_CLICK) && wid->GetToolTip() != STR_NULL) { } else if (_settings_client.gui.hover_delay_ms == 0 && !w->OnTooltip(pt, wid->GetIndex(), TCC_RIGHT_CLICK) && wid->GetToolTip() != STR_NULL) {
@ -2439,7 +2439,7 @@ static bool MaybeBringWindowToFront(Window *w)
for (; !it.IsEnd(); ++it) { for (; !it.IsEnd(); ++it) {
Window *u = *it; Window *u = *it;
/* A modal child will prevent the activation of the parent window */ /* A modal child will prevent the activation of the parent window */
if (u->parent == w && (u->window_desc.flags & WDF_MODAL)) { if (u->parent == w && u->window_desc.flags.Test(WindowDefaultFlag::Modal)) {
u->SetWhiteBorder(); u->SetWhiteBorder();
u->SetDirty(); u->SetDirty();
return false; return false;
@ -3260,7 +3260,7 @@ void CloseNonVitalWindows()
{ {
/* Note: the container remains stable, even when deleting windows. */ /* Note: the container remains stable, even when deleting windows. */
for (Window *w : Window::Iterate()) { for (Window *w : Window::Iterate()) {
if ((w->window_desc.flags & WDF_NO_CLOSE) == 0 && if (!w->window_desc.flags.Test(WindowDefaultFlag::NoClose) &&
!w->flags.Test(WindowFlag::Sticky)) { // do not delete windows which are 'pinned' !w->flags.Test(WindowFlag::Sticky)) { // do not delete windows which are 'pinned'
w->Close(); w->Close();
@ -3279,7 +3279,7 @@ void CloseAllNonVitalWindows()
{ {
/* Note: the container remains stable, even when closing windows. */ /* Note: the container remains stable, even when closing windows. */
for (Window *w : Window::Iterate()) { for (Window *w : Window::Iterate()) {
if ((w->window_desc.flags & WDF_NO_CLOSE) == 0) { if (!w->window_desc.flags.Test(WindowDefaultFlag::NoClose)) {
w->Close(); w->Close();
} }
} }
@ -3304,7 +3304,7 @@ void CloseConstructionWindows()
{ {
/* Note: the container remains stable, even when deleting windows. */ /* Note: the container remains stable, even when deleting windows. */
for (Window *w : Window::Iterate()) { for (Window *w : Window::Iterate()) {
if (w->window_desc.flags & WDF_CONSTRUCTION) { if (w->window_desc.flags.Test(WindowDefaultFlag::Construction)) {
w->Close(); w->Close();
} }
} }

View File

@ -149,6 +149,17 @@ enum WindowPosition : uint8_t {
WDP_ALIGN_TOOLBAR, ///< Align toward the toolbar WDP_ALIGN_TOOLBAR, ///< Align toward the toolbar
}; };
/**
* Window default widget/window handling flags
*/
enum class WindowDefaultFlag : uint8_t {
Construction, ///< This window is used for construction; close it whenever changing company.
Modal, ///< The window is a modal child of some other window, meaning the parent is 'inactive'
NoFocus, ///< This window won't get focus/make any other window lose focus when click
NoClose, ///< This window can't be interactively closed
};
using WindowDefaultFlags = EnumBitSet<WindowDefaultFlag, uint8_t>;
Point GetToolbarAlignedWindowPosition(int window_width); Point GetToolbarAlignedWindowPosition(int window_width);
struct HotkeyList; struct HotkeyList;
@ -159,7 +170,7 @@ struct HotkeyList;
struct WindowDesc { struct WindowDesc {
WindowDesc(WindowPosition default_pos, const char *ini_key, int16_t def_width_trad, int16_t def_height_trad, WindowDesc(WindowPosition default_pos, const char *ini_key, int16_t def_width_trad, int16_t def_height_trad,
WindowClass window_class, WindowClass parent_class, uint32_t flags, WindowClass window_class, WindowClass parent_class, WindowDefaultFlags flags,
const std::span<const NWidgetPart> nwid_parts, HotkeyList *hotkeys = nullptr, const std::span<const NWidgetPart> nwid_parts, HotkeyList *hotkeys = nullptr,
const std::source_location location = std::source_location::current()); const std::source_location location = std::source_location::current());
@ -170,7 +181,7 @@ struct WindowDesc {
const WindowClass cls; ///< Class of the window, @see WindowClass. const WindowClass cls; ///< Class of the window, @see WindowClass.
const WindowClass parent_cls; ///< Class of the parent window. @see WindowClass const WindowClass parent_cls; ///< Class of the parent window. @see WindowClass
const char *ini_key; ///< Key to store window defaults in openttd.cfg. \c nullptr if nothing shall be stored. const char *ini_key; ///< Key to store window defaults in openttd.cfg. \c nullptr if nothing shall be stored.
const uint32_t flags; ///< Flags. @see WindowDefaultFlag const WindowDefaultFlags flags; ///< Flags. @see WindowDefaultFlag
const std::span<const NWidgetPart> nwid_parts; ///< Span of nested widget parts describing the window. const std::span<const NWidgetPart> nwid_parts; ///< Span of nested widget parts describing the window.
const HotkeyList *hotkeys; ///< Hotkeys for the window. const HotkeyList *hotkeys; ///< Hotkeys for the window.
@ -196,16 +207,6 @@ private:
WindowDesc& operator=(const WindowDesc &) = delete; WindowDesc& operator=(const WindowDesc &) = delete;
}; };
/**
* Window default widget/window handling flags
*/
enum WindowDefaultFlag : uint8_t {
WDF_CONSTRUCTION = 1 << 0, ///< This window is used for construction; close it whenever changing company.
WDF_MODAL = 1 << 1, ///< The window is a modal child of some other window, meaning the parent is 'inactive'
WDF_NO_FOCUS = 1 << 2, ///< This window won't get focus/make any other window lose focus when click
WDF_NO_CLOSE = 1 << 3, ///< This window can't be interactively closed
};
/** /**
* Data structure for resizing a window * Data structure for resizing a window
*/ */