diff --git a/src/ai/ai_gui.cpp b/src/ai/ai_gui.cpp index 6c12b37d98..a383ba5132 100644 --- a/src/ai/ai_gui.cpp +++ b/src/ai/ai_gui.cpp @@ -73,7 +73,7 @@ static const NWidgetPart _nested_ai_config_widgets[] = { }; /** Window definition for the configure AI window. */ -static WindowDesc _ai_config_desc( +static WindowDesc _ai_config_desc(__FILE__, __LINE__, WDP_CENTER, nullptr, 0, 0, WC_GAME_OPTIONS, WC_NONE, 0, diff --git a/src/airport_gui.cpp b/src/airport_gui.cpp index 9e5c86ce88..4638822c33 100644 --- a/src/airport_gui.cpp +++ b/src/airport_gui.cpp @@ -207,7 +207,7 @@ static const NWidgetPart _nested_air_toolbar_widgets[] = { EndContainer(), }; -static WindowDesc _air_toolbar_desc( +static WindowDesc _air_toolbar_desc(__FILE__, __LINE__, WDP_ALIGN_TOOLBAR, "toolbar_air", 0, 0, WC_BUILD_TOOLBAR, WC_NONE, WDF_CONSTRUCTION, @@ -618,7 +618,7 @@ static const NWidgetPart _nested_build_airport_widgets[] = { EndContainer(), }; -static WindowDesc _build_airport_desc( +static WindowDesc _build_airport_desc(__FILE__, __LINE__, WDP_AUTO, nullptr, 0, 0, WC_BUILD_STATION, WC_BUILD_TOOLBAR, WDF_CONSTRUCTION, diff --git a/src/autoreplace_gui.cpp b/src/autoreplace_gui.cpp index b358def3c8..a883cc3b8d 100644 --- a/src/autoreplace_gui.cpp +++ b/src/autoreplace_gui.cpp @@ -809,7 +809,7 @@ static const NWidgetPart _nested_replace_rail_vehicle_widgets[] = { EndContainer(), }; -static WindowDesc _replace_rail_vehicle_desc( +static WindowDesc _replace_rail_vehicle_desc(__FILE__, __LINE__, WDP_AUTO, "replace_vehicle_train", 500, 140, WC_REPLACE_VEHICLE, WC_NONE, WDF_CONSTRUCTION, @@ -867,7 +867,7 @@ static const NWidgetPart _nested_replace_road_vehicle_widgets[] = { EndContainer(), }; -static WindowDesc _replace_road_vehicle_desc( +static WindowDesc _replace_road_vehicle_desc(__FILE__, __LINE__, WDP_AUTO, "replace_vehicle_road", 500, 140, WC_REPLACE_VEHICLE, WC_NONE, WDF_CONSTRUCTION, @@ -921,7 +921,7 @@ static const NWidgetPart _nested_replace_vehicle_widgets[] = { EndContainer(), }; -static WindowDesc _replace_vehicle_desc( +static WindowDesc _replace_vehicle_desc(__FILE__, __LINE__, WDP_AUTO, "replace_vehicle", 456, 118, WC_REPLACE_VEHICLE, WC_NONE, WDF_CONSTRUCTION, diff --git a/src/bootstrap_gui.cpp b/src/bootstrap_gui.cpp index 0082c60008..62745270ce 100644 --- a/src/bootstrap_gui.cpp +++ b/src/bootstrap_gui.cpp @@ -39,7 +39,7 @@ static const struct NWidgetPart _background_widgets[] = { /** * Window description for the background window to prevent smearing. */ -static WindowDesc _background_desc( +static WindowDesc _background_desc(__FILE__, __LINE__, WDP_MANUAL, nullptr, 0, 0, WC_BOOTSTRAP, WC_NONE, WDF_NO_CLOSE, @@ -75,7 +75,7 @@ static const NWidgetPart _nested_bootstrap_errmsg_widgets[] = { }; /** Window description for the error window. */ -static WindowDesc _bootstrap_errmsg_desc( +static WindowDesc _bootstrap_errmsg_desc(__FILE__, __LINE__, WDP_CENTER, nullptr, 0, 0, WC_BOOTSTRAP, WC_NONE, WDF_MODAL | WDF_NO_CLOSE, @@ -132,7 +132,7 @@ static const NWidgetPart _nested_bootstrap_download_status_window_widgets[] = { }; /** Window description for the download window */ -static WindowDesc _bootstrap_download_status_window_desc( +static WindowDesc _bootstrap_download_status_window_desc(__FILE__, __LINE__, WDP_CENTER, nullptr, 0, 0, WC_NETWORK_STATUS_WINDOW, WC_NONE, WDF_MODAL | WDF_NO_CLOSE, @@ -184,7 +184,7 @@ static const NWidgetPart _bootstrap_query_widgets[] = { }; /** The window description for the query. */ -static WindowDesc _bootstrap_query_desc( +static WindowDesc _bootstrap_query_desc(__FILE__, __LINE__, WDP_CENTER, nullptr, 0, 0, WC_CONFIRM_POPUP_QUERY, WC_NONE, WDF_NO_CLOSE, diff --git a/src/bridge_gui.cpp b/src/bridge_gui.cpp index b7f89ef975..bf3c5c7cef 100644 --- a/src/bridge_gui.cpp +++ b/src/bridge_gui.cpp @@ -341,7 +341,7 @@ static const NWidgetPart _nested_build_bridge_widgets[] = { }; /** Window definition for the rail bridge selection window. */ -static WindowDesc _build_bridge_desc( +static WindowDesc _build_bridge_desc(__FILE__, __LINE__, WDP_AUTO, "build_bridge", 200, 114, WC_BUILD_BRIDGE, WC_BUILD_TOOLBAR, WDF_CONSTRUCTION, diff --git a/src/build_vehicle_gui.cpp b/src/build_vehicle_gui.cpp index 94015c8cba..af8b927863 100644 --- a/src/build_vehicle_gui.cpp +++ b/src/build_vehicle_gui.cpp @@ -1903,7 +1903,7 @@ struct BuildVehicleWindow : Window { }}; }; -static WindowDesc _build_vehicle_desc( +static WindowDesc _build_vehicle_desc(__FILE__, __LINE__, WDP_AUTO, "build_vehicle", 240, 268, WC_BUILD_VEHICLE, WC_NONE, WDF_CONSTRUCTION, diff --git a/src/cheat_gui.cpp b/src/cheat_gui.cpp index 88bed5e387..2b69bbceb9 100644 --- a/src/cheat_gui.cpp +++ b/src/cheat_gui.cpp @@ -428,7 +428,7 @@ struct CheatWindow : Window { }; /** Window description of the cheats GUI. */ -static WindowDesc _cheats_desc( +static WindowDesc _cheats_desc(__FILE__, __LINE__, WDP_AUTO, "cheats", 0, 0, WC_CHEATS, WC_NONE, 0, diff --git a/src/company_gui.cpp b/src/company_gui.cpp index e1b95d2211..e35cc5e4fc 100644 --- a/src/company_gui.cpp +++ b/src/company_gui.cpp @@ -538,7 +538,7 @@ struct CompanyFinancesWindow : Window { /** First conservative estimate of the maximum amount of money */ Money CompanyFinancesWindow::max_money = INT32_MAX; -static WindowDesc _company_finances_desc( +static WindowDesc _company_finances_desc(__FILE__, __LINE__, WDP_AUTO, "company_finances", 0, 0, WC_FINANCES, WC_NONE, 0, @@ -1156,7 +1156,7 @@ static const NWidgetPart _nested_select_company_livery_widgets [] = { EndContainer(), }; -static WindowDesc _select_company_livery_desc( +static WindowDesc _select_company_livery_desc(__FILE__, __LINE__, WDP_AUTO, nullptr, 0, 0, WC_COMPANY_COLOUR, WC_NONE, 0, @@ -1773,7 +1773,7 @@ public: }; /** Company manager face selection window description */ -static WindowDesc _select_company_manager_face_desc( +static WindowDesc _select_company_manager_face_desc(__FILE__, __LINE__, WDP_AUTO, nullptr, 0, 0, WC_COMPANY_MANAGER_FACE, WC_NONE, WDF_CONSTRUCTION, @@ -2145,7 +2145,7 @@ struct CompanyInfrastructureWindow : Window } }; -static WindowDesc _company_infrastructure_desc( +static WindowDesc _company_infrastructure_desc(__FILE__, __LINE__, WDP_AUTO, "company_infrastructure", 0, 0, WC_COMPANY_INFRASTRUCTURE, WC_NONE, 0, @@ -2682,7 +2682,7 @@ struct CompanyWindow : Window } }; -static WindowDesc _company_desc( +static WindowDesc _company_desc(__FILE__, __LINE__, WDP_AUTO, "company", 0, 0, WC_COMPANY, WC_NONE, 0, @@ -2816,7 +2816,7 @@ static const NWidgetPart _nested_buy_company_widgets[] = { EndContainer(), }; -static WindowDesc _buy_company_desc( +static WindowDesc _buy_company_desc(__FILE__, __LINE__, WDP_AUTO, nullptr, 0, 0, WC_BUY_COMPANY, WC_NONE, WDF_CONSTRUCTION, diff --git a/src/console_gui.cpp b/src/console_gui.cpp index 309dcb9a1b..952a21bb1a 100644 --- a/src/console_gui.cpp +++ b/src/console_gui.cpp @@ -102,7 +102,7 @@ static const struct NWidgetPart _nested_console_window_widgets[] = { NWidget(WWT_EMPTY, INVALID_COLOUR, WID_C_BACKGROUND), SetResize(1, 1), }; -static WindowDesc _console_window_desc( +static WindowDesc _console_window_desc(__FILE__, __LINE__, WDP_MANUAL, nullptr, 0, 0, WC_CONSOLE, WC_NONE, 0, diff --git a/src/date_gui.cpp b/src/date_gui.cpp index d007f72146..c93dabe1e9 100644 --- a/src/date_gui.cpp +++ b/src/date_gui.cpp @@ -195,7 +195,7 @@ static const NWidgetPart _nested_set_date_widgets[] = { }; /** Description of the date setting window. */ -static WindowDesc _set_date_desc( +static WindowDesc _set_date_desc(__FILE__, __LINE__, WDP_CENTER, nullptr, 0, 0, WC_SET_DATE, WC_NONE, 0, diff --git a/src/depot_gui.cpp b/src/depot_gui.cpp index 32ad8d9143..de9fd5384a 100644 --- a/src/depot_gui.cpp +++ b/src/depot_gui.cpp @@ -85,28 +85,28 @@ static const NWidgetPart _nested_train_depot_widgets[] = { EndContainer(), }; -static WindowDesc _train_depot_desc( +static WindowDesc _train_depot_desc(__FILE__, __LINE__, WDP_AUTO, "depot_train", 362, 123, WC_VEHICLE_DEPOT, WC_NONE, 0, std::begin(_nested_train_depot_widgets), std::end(_nested_train_depot_widgets) ); -static WindowDesc _road_depot_desc( +static WindowDesc _road_depot_desc(__FILE__, __LINE__, WDP_AUTO, "depot_roadveh", 316, 97, WC_VEHICLE_DEPOT, WC_NONE, 0, std::begin(_nested_train_depot_widgets), std::end(_nested_train_depot_widgets) ); -static WindowDesc _ship_depot_desc( +static WindowDesc _ship_depot_desc(__FILE__, __LINE__, WDP_AUTO, "depot_ship", 306, 99, WC_VEHICLE_DEPOT, WC_NONE, 0, std::begin(_nested_train_depot_widgets), std::end(_nested_train_depot_widgets) ); -static WindowDesc _aircraft_depot_desc( +static WindowDesc _aircraft_depot_desc(__FILE__, __LINE__, WDP_AUTO, "depot_aircraft", 332, 99, WC_VEHICLE_DEPOT, WC_NONE, 0, diff --git a/src/dock_gui.cpp b/src/dock_gui.cpp index 18c4aa501d..c433117a92 100644 --- a/src/dock_gui.cpp +++ b/src/dock_gui.cpp @@ -344,7 +344,7 @@ static const NWidgetPart _nested_build_docks_toolbar_widgets[] = { EndContainer(), }; -static WindowDesc _build_docks_toolbar_desc( +static WindowDesc _build_docks_toolbar_desc(__FILE__, __LINE__, WDP_ALIGN_TOOLBAR, "toolbar_water", 0, 0, WC_BUILD_TOOLBAR, WC_NONE, WDF_CONSTRUCTION, @@ -388,7 +388,7 @@ static const NWidgetPart _nested_build_docks_scen_toolbar_widgets[] = { }; /** Window definition for the build docks in scenario editor window. */ -static WindowDesc _build_docks_scen_toolbar_desc( +static WindowDesc _build_docks_scen_toolbar_desc(__FILE__, __LINE__, WDP_AUTO, "toolbar_water_scen", 0, 0, WC_SCEN_BUILD_TOOLBAR, WC_NONE, WDF_CONSTRUCTION, @@ -494,7 +494,7 @@ static const NWidgetPart _nested_build_dock_station_widgets[] = { EndContainer(), }; -static WindowDesc _build_dock_station_desc( +static WindowDesc _build_dock_station_desc(__FILE__, __LINE__, WDP_AUTO, nullptr, 0, 0, WC_BUILD_STATION, WC_BUILD_TOOLBAR, WDF_CONSTRUCTION, @@ -592,7 +592,7 @@ static const NWidgetPart _nested_build_docks_depot_widgets[] = { EndContainer(), }; -static WindowDesc _build_docks_depot_desc( +static WindowDesc _build_docks_depot_desc(__FILE__, __LINE__, WDP_AUTO, nullptr, 0, 0, WC_BUILD_DEPOT, WC_BUILD_TOOLBAR, WDF_CONSTRUCTION, diff --git a/src/engine_gui.cpp b/src/engine_gui.cpp index 0534ff9fda..09d9f6c1f3 100644 --- a/src/engine_gui.cpp +++ b/src/engine_gui.cpp @@ -144,7 +144,7 @@ struct EnginePreviewWindow : Window { } }; -static WindowDesc _engine_preview_desc( +static WindowDesc _engine_preview_desc(__FILE__, __LINE__, WDP_CENTER, nullptr, 0, 0, WC_ENGINE_PREVIEW, WC_NONE, WDF_CONSTRUCTION, diff --git a/src/error_gui.cpp b/src/error_gui.cpp index f573574dfd..cb8e800afc 100644 --- a/src/error_gui.cpp +++ b/src/error_gui.cpp @@ -42,7 +42,7 @@ static const NWidgetPart _nested_errmsg_widgets[] = { EndContainer(), }; -static WindowDesc _errmsg_desc( +static WindowDesc _errmsg_desc(__FILE__, __LINE__, WDP_MANUAL, nullptr, 0, 0, WC_ERRMSG, WC_NONE, 0, @@ -62,7 +62,7 @@ static const NWidgetPart _nested_errmsg_face_widgets[] = { EndContainer(), }; -static WindowDesc _errmsg_face_desc( +static WindowDesc _errmsg_face_desc(__FILE__, __LINE__, WDP_MANUAL, nullptr, 0, 0, WC_ERRMSG, WC_NONE, 0, diff --git a/src/fios_gui.cpp b/src/fios_gui.cpp index 93555e7c5d..2b794ecd53 100644 --- a/src/fios_gui.cpp +++ b/src/fios_gui.cpp @@ -883,7 +883,7 @@ public: }; /** Load game/scenario */ -static WindowDesc _load_dialog_desc( +static WindowDesc _load_dialog_desc(__FILE__, __LINE__, WDP_CENTER, "load_game", 500, 294, WC_SAVELOAD, WC_NONE, 0, @@ -891,7 +891,7 @@ static WindowDesc _load_dialog_desc( ); /** Load heightmap */ -static WindowDesc _load_heightmap_dialog_desc( +static WindowDesc _load_heightmap_dialog_desc(__FILE__, __LINE__, WDP_CENTER, "load_heightmap", 257, 320, WC_SAVELOAD, WC_NONE, 0, @@ -899,7 +899,7 @@ static WindowDesc _load_heightmap_dialog_desc( ); /** Save game/scenario */ -static WindowDesc _save_dialog_desc( +static WindowDesc _save_dialog_desc(__FILE__, __LINE__, WDP_CENTER, "save_game", 500, 294, WC_SAVELOAD, WC_NONE, 0, diff --git a/src/framerate_gui.cpp b/src/framerate_gui.cpp index 97ad01b20b..23fe4d000c 100644 --- a/src/framerate_gui.cpp +++ b/src/framerate_gui.cpp @@ -726,7 +726,7 @@ struct FramerateWindow : Window { } }; -static WindowDesc _framerate_display_desc( +static WindowDesc _framerate_display_desc(__FILE__, __LINE__, WDP_AUTO, "framerate_display", 0, 0, WC_FRAMERATE_DISPLAY, WC_NONE, 0, @@ -1011,7 +1011,7 @@ struct FrametimeGraphWindow : Window { } }; -static WindowDesc _frametime_graph_window_desc( +static WindowDesc _frametime_graph_window_desc(__FILE__, __LINE__, WDP_AUTO, "frametime_graph", 140, 90, WC_FRAMETIME_GRAPH, WC_NONE, 0, diff --git a/src/game/game_gui.cpp b/src/game/game_gui.cpp index 032d604392..2bc68f095b 100644 --- a/src/game/game_gui.cpp +++ b/src/game/game_gui.cpp @@ -68,7 +68,7 @@ static const NWidgetPart _nested_gs_config_widgets[] = { }; /** Window definition for the configure GS window. */ -static WindowDesc _gs_config_desc( +static WindowDesc _gs_config_desc(__FILE__, __LINE__, WDP_CENTER, "settings_gs_config", 500, 350, WC_GAME_OPTIONS, WC_NONE, 0, diff --git a/src/genworld_gui.cpp b/src/genworld_gui.cpp index d961b5d3df..5b9e36f3d3 100644 --- a/src/genworld_gui.cpp +++ b/src/genworld_gui.cpp @@ -1015,14 +1015,14 @@ struct GenerateLandscapeWindow : public Window { } }; -static WindowDesc _generate_landscape_desc( +static WindowDesc _generate_landscape_desc(__FILE__, __LINE__, WDP_CENTER, nullptr, 0, 0, WC_GENERATE_LANDSCAPE, WC_NONE, 0, std::begin(_nested_generate_landscape_widgets), std::end(_nested_generate_landscape_widgets) ); -static WindowDesc _heightmap_load_desc( +static WindowDesc _heightmap_load_desc(__FILE__, __LINE__, WDP_CENTER, nullptr, 0, 0, WC_GENERATE_LANDSCAPE, WC_NONE, 0, @@ -1312,7 +1312,7 @@ static const NWidgetPart _nested_create_scenario_widgets[] = { EndContainer(), }; -static WindowDesc _create_scenario_desc( +static WindowDesc _create_scenario_desc(__FILE__, __LINE__, WDP_CENTER, nullptr, 0, 0, WC_GENERATE_LANDSCAPE, WC_NONE, 0, @@ -1338,7 +1338,7 @@ static const NWidgetPart _nested_generate_progress_widgets[] = { }; -static WindowDesc _generate_progress_desc( +static WindowDesc _generate_progress_desc(__FILE__, __LINE__, WDP_CENTER, nullptr, 0, 0, WC_MODAL_PROGRESS, WC_NONE, 0, diff --git a/src/goal_gui.cpp b/src/goal_gui.cpp index 30f1206545..adf3345ba4 100644 --- a/src/goal_gui.cpp +++ b/src/goal_gui.cpp @@ -302,7 +302,7 @@ static const NWidgetPart _nested_goals_list_widgets[] = { EndContainer(), }; -static WindowDesc _goals_list_desc( +static WindowDesc _goals_list_desc(__FILE__, __LINE__, WDP_AUTO, "list_goals", 500, 127, WC_GOALS_LIST, WC_NONE, 0, @@ -512,24 +512,28 @@ static const NWidgetPart _nested_goal_question_widgets_error[] = { static WindowDesc _goal_question_list_desc[] = { { + __FILE__, __LINE__, WDP_CENTER, nullptr, 0, 0, WC_GOAL_QUESTION, WC_NONE, WDF_CONSTRUCTION, std::begin(_nested_goal_question_widgets_question), std::end(_nested_goal_question_widgets_question), }, { + __FILE__, __LINE__, WDP_CENTER, nullptr, 0, 0, WC_GOAL_QUESTION, WC_NONE, WDF_CONSTRUCTION, std::begin(_nested_goal_question_widgets_info), std::end(_nested_goal_question_widgets_info), }, { + __FILE__, __LINE__, WDP_CENTER, nullptr, 0, 0, WC_GOAL_QUESTION, WC_NONE, WDF_CONSTRUCTION, std::begin(_nested_goal_question_widgets_warning), std::end(_nested_goal_question_widgets_warning), }, { + __FILE__, __LINE__, WDP_CENTER, nullptr, 0, 0, WC_GOAL_QUESTION, WC_NONE, WDF_CONSTRUCTION, diff --git a/src/graph_gui.cpp b/src/graph_gui.cpp index c17a916233..27c67e3f08 100644 --- a/src/graph_gui.cpp +++ b/src/graph_gui.cpp @@ -141,7 +141,7 @@ static const NWidgetPart _nested_graph_legend_widgets[] = { EndContainer(), }; -static WindowDesc _graph_legend_desc( +static WindowDesc _graph_legend_desc(__FILE__, __LINE__, WDP_AUTO, "graph_legend", 0, 0, WC_GRAPH_LEGEND, WC_NONE, 0, @@ -654,7 +654,7 @@ static const NWidgetPart _nested_operating_profit_widgets[] = { EndContainer(), }; -static WindowDesc _operating_profit_desc( +static WindowDesc _operating_profit_desc(__FILE__, __LINE__, WDP_AUTO, "graph_operating_profit", 0, 0, WC_OPERATING_PROFIT, WC_NONE, 0, @@ -705,7 +705,7 @@ static const NWidgetPart _nested_income_graph_widgets[] = { EndContainer(), }; -static WindowDesc _income_graph_desc( +static WindowDesc _income_graph_desc(__FILE__, __LINE__, WDP_AUTO, "graph_income", 0, 0, WC_INCOME_GRAPH, WC_NONE, 0, @@ -754,7 +754,7 @@ static const NWidgetPart _nested_delivered_cargo_graph_widgets[] = { EndContainer(), }; -static WindowDesc _delivered_cargo_graph_desc( +static WindowDesc _delivered_cargo_graph_desc(__FILE__, __LINE__, WDP_AUTO, "graph_delivered_cargo", 0, 0, WC_DELIVERED_CARGO, WC_NONE, 0, @@ -810,7 +810,7 @@ static const NWidgetPart _nested_performance_history_widgets[] = { EndContainer(), }; -static WindowDesc _performance_history_desc( +static WindowDesc _performance_history_desc(__FILE__, __LINE__, WDP_AUTO, "graph_performance", 0, 0, WC_PERFORMANCE_HISTORY, WC_NONE, 0, @@ -859,7 +859,7 @@ static const NWidgetPart _nested_company_value_graph_widgets[] = { EndContainer(), }; -static WindowDesc _company_value_graph_desc( +static WindowDesc _company_value_graph_desc(__FILE__, __LINE__, WDP_AUTO, "graph_company_value", 0, 0, WC_COMPANY_VALUE, WC_NONE, 0, @@ -1093,7 +1093,7 @@ static const NWidgetPart _nested_cargo_payment_rates_widgets[] = { EndContainer(), }; -static WindowDesc _cargo_payment_rates_desc( +static WindowDesc _cargo_payment_rates_desc(__FILE__, __LINE__, WDP_AUTO, "graph_cargo_payment_rates", 0, 0, WC_PAYMENT_RATES, WC_NONE, 0, @@ -1389,7 +1389,7 @@ static const NWidgetPart _nested_performance_rating_detail_widgets[] = { NWidgetFunction(MakePerformanceDetailPanels), }; -static WindowDesc _performance_rating_detail_desc( +static WindowDesc _performance_rating_detail_desc(__FILE__, __LINE__, WDP_AUTO, "league_details", 0, 0, WC_PERFORMANCE_DETAIL, WC_NONE, 0, diff --git a/src/group_gui.cpp b/src/group_gui.cpp index 3f324dadf8..b3080c8044 100644 --- a/src/group_gui.cpp +++ b/src/group_gui.cpp @@ -1101,14 +1101,14 @@ public: }; -static WindowDesc _other_group_desc( +static WindowDesc _other_group_desc(__FILE__, __LINE__, WDP_AUTO, "list_groups", 460, 246, WC_INVALID, WC_NONE, 0, std::begin(_nested_group_widgets), std::end(_nested_group_widgets) ); -static WindowDesc _train_group_desc( +static WindowDesc _train_group_desc(__FILE__, __LINE__, WDP_AUTO, "list_groups_train", 525, 246, WC_TRAINS_LIST, WC_NONE, 0, diff --git a/src/help_gui.cpp b/src/help_gui.cpp index 5c052af917..be28a24de7 100644 --- a/src/help_gui.cpp +++ b/src/help_gui.cpp @@ -205,7 +205,7 @@ static const NWidgetPart _nested_helpwin_widgets[] = { EndContainer(), }; -static WindowDesc _helpwin_desc( +static WindowDesc _helpwin_desc(__FILE__, __LINE__, WDP_CENTER, nullptr, 0, 0, WC_HELPWIN, WC_NONE, 0, diff --git a/src/highscore_gui.cpp b/src/highscore_gui.cpp index 1deb60281c..3849d7b027 100644 --- a/src/highscore_gui.cpp +++ b/src/highscore_gui.cpp @@ -214,14 +214,14 @@ static const NWidgetPart _nested_highscore_widgets[] = { NWidget(WWT_PANEL, COLOUR_BROWN, WID_H_BACKGROUND), SetResize(1, 1), EndContainer(), }; -static WindowDesc _highscore_desc( +static WindowDesc _highscore_desc(__FILE__, __LINE__, WDP_MANUAL, nullptr, 0, 0, WC_HIGHSCORE, WC_NONE, 0, std::begin(_nested_highscore_widgets), std::end(_nested_highscore_widgets) ); -static WindowDesc _endgame_desc( +static WindowDesc _endgame_desc(__FILE__, __LINE__, WDP_MANUAL, nullptr, 0, 0, WC_ENDSCREEN, WC_NONE, 0, diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp index 824ce9b172..c71138687d 100644 --- a/src/industry_gui.cpp +++ b/src/industry_gui.cpp @@ -291,7 +291,7 @@ static const NWidgetPart _nested_build_industry_widgets[] = { }; /** Window definition of the dynamic place industries gui */ -static WindowDesc _build_industry_desc( +static WindowDesc _build_industry_desc(__FILE__, __LINE__, WDP_AUTO, "build_industry", 170, 212, WC_BUILD_INDUSTRY, WC_NONE, WDF_CONSTRUCTION, @@ -1201,7 +1201,7 @@ static const NWidgetPart _nested_industry_view_widgets[] = { }; /** Window definition of the view industry gui */ -static WindowDesc _industry_view_desc( +static WindowDesc _industry_view_desc(__FILE__, __LINE__, WDP_AUTO, "view_industry", 260, 120, WC_INDUSTRY_VIEW, WC_NONE, 0, @@ -1865,7 +1865,7 @@ CargoID IndustryDirectoryWindow::produced_cargo_filter = CF_ANY; /** Window definition of the industry directory gui */ -static WindowDesc _industry_directory_desc( +static WindowDesc _industry_directory_desc(__FILE__, __LINE__, WDP_AUTO, "list_industries", 428, 190, WC_INDUSTRY_DIRECTORY, WC_NONE, 0, @@ -1903,7 +1903,7 @@ static const NWidgetPart _nested_industry_cargoes_widgets[] = { }; /** Window description for the industry cargoes window. */ -static WindowDesc _industry_cargoes_desc( +static WindowDesc _industry_cargoes_desc(__FILE__, __LINE__, WDP_AUTO, "industry_cargoes", 300, 210, WC_INDUSTRY_CARGOES, WC_NONE, 0, diff --git a/src/intro_gui.cpp b/src/intro_gui.cpp index 4f8dd95db2..62988b577f 100644 --- a/src/intro_gui.cpp +++ b/src/intro_gui.cpp @@ -495,7 +495,7 @@ static const NWidgetPart _nested_select_game_widgets[] = { EndContainer(), }; -static WindowDesc _select_game_desc( +static WindowDesc _select_game_desc(__FILE__, __LINE__, WDP_CENTER, nullptr, 0, 0, WC_SELECT_GAME, WC_NONE, WDF_NO_CLOSE, diff --git a/src/league_gui.cpp b/src/league_gui.cpp index 8775695b16..912cdae5e1 100644 --- a/src/league_gui.cpp +++ b/src/league_gui.cpp @@ -196,7 +196,7 @@ static const NWidgetPart _nested_performance_league_widgets[] = { NWidget(WWT_PANEL, COLOUR_BROWN, WID_PLT_BACKGROUND), SetMinimalSize(400, 0), SetMinimalTextLines(15, WidgetDimensions::unscaled.framerect.Vertical()), }; -static WindowDesc _performance_league_desc( +static WindowDesc _performance_league_desc(__FILE__, __LINE__, WDP_AUTO, "performance_league", 0, 0, WC_COMPANY_LEAGUE, WC_NONE, 0, @@ -428,7 +428,7 @@ static const NWidgetPart _nested_script_league_widgets[] = { NWidget(WWT_PANEL, COLOUR_BROWN, WID_SLT_BACKGROUND), SetMinimalSize(400, 0), SetMinimalTextLines(15, WidgetDimensions::scaled.framerect.Vertical()), }; -static WindowDesc _script_league_desc( +static WindowDesc _script_league_desc(__FILE__, __LINE__, WDP_AUTO, "script_league", 0, 0, WC_COMPANY_LEAGUE, WC_NONE, 0, diff --git a/src/linkgraph/linkgraph_gui.cpp b/src/linkgraph/linkgraph_gui.cpp index e94ba9786c..2c666ef515 100644 --- a/src/linkgraph/linkgraph_gui.cpp +++ b/src/linkgraph/linkgraph_gui.cpp @@ -540,7 +540,7 @@ static const NWidgetPart _nested_linkgraph_legend_widgets[] = { static_assert(WID_LGL_SATURATION_LAST - WID_LGL_SATURATION_FIRST == lengthof(LinkGraphOverlay::LINK_COLOURS[0]) - 1); -static WindowDesc _linkgraph_legend_desc( +static WindowDesc _linkgraph_legend_desc(__FILE__, __LINE__, WDP_AUTO, "toolbar_linkgraph", 0, 0, WC_LINKGRAPH_LEGEND, WC_NONE, 0, diff --git a/src/main_gui.cpp b/src/main_gui.cpp index ec1648b08d..9f35dfeade 100644 --- a/src/main_gui.cpp +++ b/src/main_gui.cpp @@ -513,7 +513,7 @@ struct MainWindow : Window }}; }; -static WindowDesc _main_window_desc( +static WindowDesc _main_window_desc(__FILE__, __LINE__, WDP_MANUAL, nullptr, 0, 0, WC_MAIN_WINDOW, WC_NONE, WDF_NO_CLOSE, diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp index d3cc1df0db..c5f58d7381 100644 --- a/src/misc_gui.cpp +++ b/src/misc_gui.cpp @@ -58,7 +58,7 @@ static const NWidgetPart _nested_land_info_widgets[] = { NWidget(WWT_PANEL, COLOUR_GREY, WID_LI_BACKGROUND), EndContainer(), }; -static WindowDesc _land_info_desc( +static WindowDesc _land_info_desc(__FILE__, __LINE__, WDP_AUTO, nullptr, 0, 0, WC_LAND_INFO, WC_NONE, 0, @@ -393,7 +393,7 @@ static const NWidgetPart _nested_about_widgets[] = { EndContainer(), }; -static WindowDesc _about_desc( +static WindowDesc _about_desc(__FILE__, __LINE__, WDP_CENTER, nullptr, 0, 0, WC_GAME_OPTIONS, WC_NONE, 0, @@ -651,7 +651,7 @@ static const NWidgetPart _nested_tooltips_widgets[] = { NWidget(WWT_EMPTY, INVALID_COLOUR, WID_TT_BACKGROUND), EndContainer(), }; -static WindowDesc _tool_tips_desc( +static WindowDesc _tool_tips_desc(__FILE__, __LINE__, WDP_MANUAL, nullptr, 0, 0, // Coordinates and sizes are not used, WC_TOOLTIPS, WC_NONE, WDF_NO_FOCUS | WDF_NO_CLOSE, @@ -1064,7 +1064,7 @@ static const NWidgetPart _nested_query_string_widgets[] = { EndContainer(), }; -static WindowDesc _query_string_desc( +static WindowDesc _query_string_desc(__FILE__, __LINE__, WDP_CENTER, nullptr, 0, 0, WC_QUERY_STRING, WC_NONE, 0, @@ -1211,7 +1211,7 @@ static const NWidgetPart _nested_query_widgets[] = { EndContainer(), }; -static WindowDesc _query_desc( +static WindowDesc _query_desc(__FILE__, __LINE__, WDP_CENTER, nullptr, 0, 0, WC_CONFIRM_POPUP_QUERY, WC_NONE, WDF_MODAL, diff --git a/src/music_gui.cpp b/src/music_gui.cpp index 188cfbc4f7..0a521e189e 100644 --- a/src/music_gui.cpp +++ b/src/music_gui.cpp @@ -641,7 +641,7 @@ static const NWidgetPart _nested_music_track_selection_widgets[] = { EndContainer(), }; -static WindowDesc _music_track_selection_desc( +static WindowDesc _music_track_selection_desc(__FILE__, __LINE__, WDP_AUTO, nullptr, 0, 0, WC_MUSIC_TRACK_SELECTION, WC_NONE, 0, @@ -900,7 +900,7 @@ static const NWidgetPart _nested_music_window_widgets[] = { EndContainer(), }; -static WindowDesc _music_window_desc( +static WindowDesc _music_window_desc(__FILE__, __LINE__, WDP_AUTO, "music", 0, 0, WC_MUSIC_WINDOW, WC_NONE, 0, diff --git a/src/network/network_chat_gui.cpp b/src/network/network_chat_gui.cpp index 5bbd6c80b4..24b328d92a 100644 --- a/src/network/network_chat_gui.cpp +++ b/src/network/network_chat_gui.cpp @@ -508,7 +508,7 @@ static const NWidgetPart _nested_chat_window_widgets[] = { }; /** The description of the chat window. */ -static WindowDesc _chat_window_desc( +static WindowDesc _chat_window_desc(__FILE__, __LINE__, WDP_MANUAL, nullptr, 0, 0, WC_SEND_NETWORK_MSG, WC_NONE, 0, diff --git a/src/network/network_content_gui.cpp b/src/network/network_content_gui.cpp index 672b2bca7e..59b40c4a8b 100644 --- a/src/network/network_content_gui.cpp +++ b/src/network/network_content_gui.cpp @@ -92,7 +92,7 @@ static const NWidgetPart _nested_network_content_download_status_window_widgets[ }; /** Window description for the download window */ -static WindowDesc _network_content_download_status_window_desc( +static WindowDesc _network_content_download_status_window_desc(__FILE__, __LINE__, WDP_CENTER, nullptr, 0, 0, WC_NETWORK_STATUS_WINDOW, WC_NONE, WDF_MODAL, @@ -1109,7 +1109,7 @@ static const NWidgetPart _nested_network_content_list_widgets[] = { }; /** Window description of the content list */ -static WindowDesc _network_content_list_desc( +static WindowDesc _network_content_list_desc(__FILE__, __LINE__, WDP_CENTER, "list_content", 630, 460, WC_NETWORK_WINDOW, WC_NONE, 0, diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp index b5bdba28fb..e64f393fc4 100644 --- a/src/network/network_gui.cpp +++ b/src/network/network_gui.cpp @@ -952,7 +952,7 @@ static const NWidgetPart _nested_network_game_widgets[] = { EndContainer(), }; -static WindowDesc _network_game_window_desc( +static WindowDesc _network_game_window_desc(__FILE__, __LINE__, WDP_CENTER, "list_servers", 1000, 730, WC_NETWORK_WINDOW, WC_NONE, 0, @@ -1219,7 +1219,7 @@ static const NWidgetPart _nested_network_start_server_window_widgets[] = { EndContainer(), }; -static WindowDesc _network_start_server_window_desc( +static WindowDesc _network_start_server_window_desc(__FILE__, __LINE__, WDP_CENTER, nullptr, 0, 0, WC_NETWORK_WINDOW, WC_NONE, 0, @@ -1298,7 +1298,7 @@ static const NWidgetPart _nested_client_list_widgets[] = { EndContainer(), }; -static WindowDesc _client_list_desc( +static WindowDesc _client_list_desc(__FILE__, __LINE__, WDP_AUTO, "list_clients", 220, 300, WC_CLIENT_LIST, WC_NONE, 0, @@ -2208,7 +2208,7 @@ static const NWidgetPart _nested_network_join_status_window_widgets[] = { EndContainer(), }; -static WindowDesc _network_join_status_window_desc( +static WindowDesc _network_join_status_window_desc(__FILE__, __LINE__, WDP_CENTER, nullptr, 0, 0, WC_NETWORK_STATUS_WINDOW, WC_NONE, WDF_MODAL, @@ -2330,7 +2330,7 @@ static const NWidgetPart _nested_network_company_password_window_widgets[] = { EndContainer(), }; -static WindowDesc _network_company_password_window_desc( +static WindowDesc _network_company_password_window_desc(__FILE__, __LINE__, WDP_AUTO, nullptr, 0, 0, WC_COMPANY_PASSWORD_WINDOW, WC_NONE, 0, @@ -2439,7 +2439,7 @@ static const NWidgetPart _nested_network_ask_relay_widgets[] = { EndContainer(), }; -static WindowDesc _network_ask_relay_desc( +static WindowDesc _network_ask_relay_desc(__FILE__, __LINE__, WDP_CENTER, nullptr, 0, 0, WC_NETWORK_ASK_RELAY, WC_NONE, WDF_MODAL, @@ -2537,7 +2537,7 @@ static const NWidgetPart _nested_network_ask_survey_widgets[] = { EndContainer(), }; -static WindowDesc _network_ask_survey_desc( +static WindowDesc _network_ask_survey_desc(__FILE__, __LINE__, WDP_CENTER, nullptr, 0, 0, WC_NETWORK_ASK_SURVEY, WC_NONE, WDF_MODAL, diff --git a/src/newgrf_debug_gui.cpp b/src/newgrf_debug_gui.cpp index db58442914..4fdc4d509b 100644 --- a/src/newgrf_debug_gui.cpp +++ b/src/newgrf_debug_gui.cpp @@ -679,14 +679,14 @@ static const NWidgetPart _nested_newgrf_inspect_widgets[] = { EndContainer(), }; -static WindowDesc _newgrf_inspect_chain_desc( +static WindowDesc _newgrf_inspect_chain_desc(__FILE__, __LINE__, WDP_AUTO, "newgrf_inspect_chain", 400, 300, WC_NEWGRF_INSPECT, WC_NONE, 0, std::begin(_nested_newgrf_inspect_chain_widgets), std::end(_nested_newgrf_inspect_chain_widgets) ); -static WindowDesc _newgrf_inspect_desc( +static WindowDesc _newgrf_inspect_desc(__FILE__, __LINE__, WDP_AUTO, "newgrf_inspect", 400, 300, WC_NEWGRF_INSPECT, WC_NONE, 0, @@ -1122,7 +1122,7 @@ static const NWidgetPart _nested_sprite_aligner_widgets[] = { EndContainer(), }; -static WindowDesc _sprite_aligner_desc( +static WindowDesc _sprite_aligner_desc(__FILE__, __LINE__, WDP_AUTO, "sprite_aligner", 400, 300, WC_SPRITE_ALIGNER, WC_NONE, 0, diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp index 04929fb2b8..9acd9bd3a2 100644 --- a/src/newgrf_gui.cpp +++ b/src/newgrf_gui.cpp @@ -540,7 +540,7 @@ static const NWidgetPart _nested_newgrf_parameter_widgets[] = { }; /** Window definition for the change grf parameters window */ -static WindowDesc _newgrf_parameters_desc( +static WindowDesc _newgrf_parameters_desc(__FILE__, __LINE__, WDP_CENTER, "settings_newgrf_config", 500, 208, WC_GRF_PARAMETERS, WC_NONE, 0, @@ -1964,7 +1964,7 @@ static const NWidgetPart _nested_newgrf_widgets[] = { }; /* Window definition of the manage newgrfs window */ -static WindowDesc _newgrf_desc( +static WindowDesc _newgrf_desc(__FILE__, __LINE__, WDP_CENTER, "settings_newgrf", 300, 263, WC_GAME_OPTIONS, WC_NONE, 0, @@ -2048,7 +2048,7 @@ static const NWidgetPart _nested_save_preset_widgets[] = { }; /** Window description of the preset save window. */ -static WindowDesc _save_preset_desc( +static WindowDesc _save_preset_desc(__FILE__, __LINE__, WDP_CENTER, "save_preset", 140, 110, WC_SAVE_PRESET, WC_GAME_OPTIONS, WDF_MODAL, @@ -2193,7 +2193,7 @@ static const NWidgetPart _nested_scan_progress_widgets[] = { }; /** Description of the widgets and other settings of the window. */ -static WindowDesc _scan_progress_desc( +static WindowDesc _scan_progress_desc(__FILE__, __LINE__, WDP_CENTER, nullptr, 0, 0, WC_MODAL_PROGRESS, WC_NONE, 0, diff --git a/src/news_gui.cpp b/src/news_gui.cpp index 2295009fe5..7f461ce406 100644 --- a/src/news_gui.cpp +++ b/src/news_gui.cpp @@ -96,7 +96,7 @@ static const NWidgetPart _nested_normal_news_widgets[] = { EndContainer(), }; -static WindowDesc _normal_news_desc( +static WindowDesc _normal_news_desc(__FILE__, __LINE__, WDP_MANUAL, nullptr, 0, 0, WC_NEWS_WINDOW, WC_NONE, 0, @@ -123,7 +123,7 @@ static const NWidgetPart _nested_vehicle_news_widgets[] = { EndContainer(), }; -static WindowDesc _vehicle_news_desc( +static WindowDesc _vehicle_news_desc(__FILE__, __LINE__, WDP_MANUAL, nullptr, 0, 0, WC_NEWS_WINDOW, WC_NONE, 0, @@ -151,7 +151,7 @@ static const NWidgetPart _nested_company_news_widgets[] = { EndContainer(), }; -static WindowDesc _company_news_desc( +static WindowDesc _company_news_desc(__FILE__, __LINE__, WDP_MANUAL, nullptr, 0, 0, WC_NEWS_WINDOW, WC_NONE, 0, @@ -174,7 +174,7 @@ static const NWidgetPart _nested_thin_news_widgets[] = { EndContainer(), }; -static WindowDesc _thin_news_desc( +static WindowDesc _thin_news_desc(__FILE__, __LINE__, WDP_MANUAL, nullptr, 0, 0, WC_NEWS_WINDOW, WC_NONE, 0, @@ -200,7 +200,7 @@ static const NWidgetPart _nested_small_news_widgets[] = { EndContainer(), }; -static WindowDesc _small_news_desc( +static WindowDesc _small_news_desc(__FILE__, __LINE__, WDP_MANUAL, nullptr, 0, 0, WC_NEWS_WINDOW, WC_NONE, 0, @@ -1227,7 +1227,7 @@ static const NWidgetPart _nested_message_history[] = { EndContainer(), }; -static WindowDesc _message_history_desc( +static WindowDesc _message_history_desc(__FILE__, __LINE__, WDP_AUTO, "list_news", 400, 140, WC_MESSAGE_HISTORY, WC_NONE, 0, diff --git a/src/object_gui.cpp b/src/object_gui.cpp index 0a35a77a15..35133be345 100644 --- a/src/object_gui.cpp +++ b/src/object_gui.cpp @@ -718,7 +718,7 @@ static const NWidgetPart _nested_build_object_widgets[] = { EndContainer(), }; -static WindowDesc _build_object_desc( +static WindowDesc _build_object_desc(__FILE__, __LINE__, WDP_AUTO, "build_object", 0, 0, WC_BUILD_OBJECT, WC_BUILD_TOOLBAR, WDF_CONSTRUCTION, diff --git a/src/order_gui.cpp b/src/order_gui.cpp index aafd21ecc2..0335ff4d68 100644 --- a/src/order_gui.cpp +++ b/src/order_gui.cpp @@ -1636,7 +1636,7 @@ static const NWidgetPart _nested_orders_train_widgets[] = { EndContainer(), }; -static WindowDesc _orders_train_desc( +static WindowDesc _orders_train_desc(__FILE__, __LINE__, WDP_AUTO, "view_vehicle_orders_train", 384, 100, WC_VEHICLE_ORDERS, WC_VEHICLE_VIEW, WDF_CONSTRUCTION, @@ -1709,7 +1709,7 @@ static const NWidgetPart _nested_orders_widgets[] = { EndContainer(), }; -static WindowDesc _orders_desc( +static WindowDesc _orders_desc(__FILE__, __LINE__, WDP_AUTO, "view_vehicle_orders", 384, 100, WC_VEHICLE_ORDERS, WC_VEHICLE_VIEW, WDF_CONSTRUCTION, @@ -1736,7 +1736,7 @@ static const NWidgetPart _nested_other_orders_widgets[] = { EndContainer(), }; -static WindowDesc _other_orders_desc( +static WindowDesc _other_orders_desc(__FILE__, __LINE__, WDP_AUTO, "view_vehicle_orders_competitor", 384, 86, WC_VEHICLE_ORDERS, WC_VEHICLE_VIEW, WDF_CONSTRUCTION, diff --git a/src/osk_gui.cpp b/src/osk_gui.cpp index dfb59c1474..1beb896ffa 100644 --- a/src/osk_gui.cpp +++ b/src/osk_gui.cpp @@ -336,7 +336,7 @@ static const NWidgetPart _nested_osk_widgets[] = { EndContainer(), }; -static WindowDesc _osk_desc( +static WindowDesc _osk_desc(__FILE__, __LINE__, WDP_CENTER, nullptr, 0, 0, WC_OSK, WC_NONE, 0, diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp index 70e1699953..65d0da98e6 100644 --- a/src/rail_gui.cpp +++ b/src/rail_gui.cpp @@ -837,7 +837,7 @@ static const NWidgetPart _nested_build_rail_widgets[] = { EndContainer(), }; -static WindowDesc _build_rail_desc( +static WindowDesc _build_rail_desc(__FILE__, __LINE__, WDP_ALIGN_TOOLBAR, "toolbar_rail", 0, 0, WC_BUILD_TOOLBAR, WC_NONE, WDF_CONSTRUCTION, @@ -1629,7 +1629,7 @@ static const NWidgetPart _nested_station_builder_widgets[] = { }; /** High level window description of the station-build window (default & newGRF) */ -static WindowDesc _station_builder_desc( +static WindowDesc _station_builder_desc(__FILE__, __LINE__, WDP_AUTO, "build_station_rail", 350, 0, WC_BUILD_STATION, WC_BUILD_TOOLBAR, WDF_CONSTRUCTION, @@ -1887,7 +1887,7 @@ static const NWidgetPart _nested_signal_builder_widgets[] = { }; /** Signal selection window description */ -static WindowDesc _signal_builder_desc( +static WindowDesc _signal_builder_desc(__FILE__, __LINE__, WDP_AUTO, nullptr, 0, 0, WC_BUILD_SIGNAL, WC_BUILD_TOOLBAR, WDF_CONSTRUCTION, @@ -1978,7 +1978,7 @@ static const NWidgetPart _nested_build_depot_widgets[] = { EndContainer(), }; -static WindowDesc _build_depot_desc( +static WindowDesc _build_depot_desc(__FILE__, __LINE__, WDP_AUTO, nullptr, 0, 0, WC_BUILD_DEPOT, WC_BUILD_TOOLBAR, WDF_CONSTRUCTION, @@ -2206,7 +2206,7 @@ static const NWidgetPart _nested_build_waypoint_widgets[] = { EndContainer(), }; -static WindowDesc _build_waypoint_desc( +static WindowDesc _build_waypoint_desc(__FILE__, __LINE__, WDP_AUTO, "build_waypoint", 0, 0, WC_BUILD_WAYPOINT, WC_BUILD_TOOLBAR, WDF_CONSTRUCTION, diff --git a/src/road_gui.cpp b/src/road_gui.cpp index 1a6e98a6f9..17de83bb9a 100644 --- a/src/road_gui.cpp +++ b/src/road_gui.cpp @@ -851,7 +851,7 @@ static const NWidgetPart _nested_build_road_widgets[] = { EndContainer(), }; -static WindowDesc _build_road_desc( +static WindowDesc _build_road_desc(__FILE__, __LINE__, WDP_ALIGN_TOOLBAR, "toolbar_road", 0, 0, WC_BUILD_TOOLBAR, WC_NONE, WDF_CONSTRUCTION, @@ -892,7 +892,7 @@ static const NWidgetPart _nested_build_tramway_widgets[] = { EndContainer(), }; -static WindowDesc _build_tramway_desc( +static WindowDesc _build_tramway_desc(__FILE__, __LINE__, WDP_ALIGN_TOOLBAR, "toolbar_tramway", 0, 0, WC_BUILD_TOOLBAR, WC_NONE, WDF_CONSTRUCTION, @@ -947,7 +947,7 @@ static const NWidgetPart _nested_build_road_scen_widgets[] = { EndContainer(), }; -static WindowDesc _build_road_scen_desc( +static WindowDesc _build_road_scen_desc(__FILE__, __LINE__, WDP_AUTO, "toolbar_road_scen", 0, 0, WC_SCEN_BUILD_TOOLBAR, WC_NONE, WDF_CONSTRUCTION, @@ -982,7 +982,7 @@ static const NWidgetPart _nested_build_tramway_scen_widgets[] = { EndContainer(), }; -static WindowDesc _build_tramway_scen_desc( +static WindowDesc _build_tramway_scen_desc(__FILE__, __LINE__, WDP_AUTO, "toolbar_tram_scen", 0, 0, WC_SCEN_BUILD_TOOLBAR, WC_NONE, WDF_CONSTRUCTION, @@ -1080,7 +1080,7 @@ static const NWidgetPart _nested_build_road_depot_widgets[] = { EndContainer(), }; -static WindowDesc _build_road_depot_desc( +static WindowDesc _build_road_depot_desc(__FILE__, __LINE__, WDP_AUTO, nullptr, 0, 0, WC_BUILD_DEPOT, WC_BUILD_TOOLBAR, WDF_CONSTRUCTION, @@ -1679,7 +1679,7 @@ static const NWidgetPart _nested_road_station_picker_widgets[] = { EndContainer(), }; -static WindowDesc _road_station_picker_desc( +static WindowDesc _road_station_picker_desc(__FILE__, __LINE__, WDP_AUTO, "build_station_road", 0, 0, WC_BUS_STATION, WC_BUILD_TOOLBAR, WDF_CONSTRUCTION, @@ -1764,7 +1764,7 @@ static const NWidgetPart _nested_tram_station_picker_widgets[] = { EndContainer(), }; -static WindowDesc _tram_station_picker_desc( +static WindowDesc _tram_station_picker_desc(__FILE__, __LINE__, WDP_AUTO, "build_station_tram", 0, 0, WC_BUS_STATION, WC_BUILD_TOOLBAR, WDF_CONSTRUCTION, diff --git a/src/screenshot_gui.cpp b/src/screenshot_gui.cpp index a59fc14407..bcc74baa75 100644 --- a/src/screenshot_gui.cpp +++ b/src/screenshot_gui.cpp @@ -60,7 +60,7 @@ static const NWidgetPart _nested_screenshot[] = { EndContainer(), }; -static WindowDesc _screenshot_window_desc( +static WindowDesc _screenshot_window_desc(__FILE__, __LINE__, WDP_AUTO, "take_a_screenshot", 200, 100, WC_SCREENSHOT, WC_NONE, 0, diff --git a/src/script/script_gui.cpp b/src/script/script_gui.cpp index c2ff57f025..f393917c4e 100644 --- a/src/script/script_gui.cpp +++ b/src/script/script_gui.cpp @@ -261,7 +261,7 @@ static const NWidgetPart _nested_script_list_widgets[] = { }; /** Window definition for the ai list window. */ -static WindowDesc _script_list_desc( +static WindowDesc _script_list_desc(__FILE__, __LINE__, WDP_CENTER, "settings_script_list", 200, 234, WC_SCRIPT_LIST, WC_NONE, 0, @@ -606,7 +606,7 @@ static const NWidgetPart _nested_script_settings_widgets[] = { }; /** Window definition for the Script settings window. */ -static WindowDesc _script_settings_desc( +static WindowDesc _script_settings_desc(__FILE__, __LINE__, WDP_CENTER, "settings_script", 500, 208, WC_SCRIPT_SETTINGS, WC_NONE, 0, @@ -1193,7 +1193,7 @@ EndContainer(), }; /** Window definition for the Script debug window. */ -static WindowDesc _script_debug_desc( +static WindowDesc _script_debug_desc(__FILE__, __LINE__, WDP_AUTO, "script_debug", 600, 450, WC_SCRIPT_DEBUG, WC_NONE, 0, diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp index dc56f92812..3d54c5ee3d 100644 --- a/src/settings_gui.cpp +++ b/src/settings_gui.cpp @@ -928,7 +928,7 @@ static const NWidgetPart _nested_game_options_widgets[] = { EndContainer(), }; -static WindowDesc _game_options_desc( +static WindowDesc _game_options_desc(__FILE__, __LINE__, WDP_CENTER, nullptr, 0, 0, WC_GAME_OPTIONS, WC_NONE, 0, @@ -2655,7 +2655,7 @@ static const NWidgetPart _nested_settings_selection_widgets[] = { EndContainer(), }; -static WindowDesc _settings_selection_desc( +static WindowDesc _settings_selection_desc(__FILE__, __LINE__, WDP_CENTER, "settings", 510, 450, WC_GAME_OPTIONS, WC_NONE, 0, @@ -2954,7 +2954,7 @@ static const NWidgetPart _nested_cust_currency_widgets[] = { EndContainer(), }; -static WindowDesc _cust_currency_desc( +static WindowDesc _cust_currency_desc(__FILE__, __LINE__, WDP_CENTER, nullptr, 0, 0, WC_CUSTOM_CURRENCY, WC_NONE, 0, diff --git a/src/signs_gui.cpp b/src/signs_gui.cpp index c45483168a..8eda33bb6b 100644 --- a/src/signs_gui.cpp +++ b/src/signs_gui.cpp @@ -385,7 +385,7 @@ static const NWidgetPart _nested_sign_list_widgets[] = { EndContainer(), }; -static WindowDesc _sign_list_desc( +static WindowDesc _sign_list_desc(__FILE__, __LINE__, WDP_AUTO, "list_signs", 358, 138, WC_SIGN_LIST, WC_NONE, 0, @@ -551,7 +551,7 @@ static const NWidgetPart _nested_query_sign_edit_widgets[] = { EndContainer(), }; -static WindowDesc _query_sign_edit_desc( +static WindowDesc _query_sign_edit_desc(__FILE__, __LINE__, WDP_CENTER, nullptr, 0, 0, WC_QUERY_STRING, WC_NONE, WDF_CONSTRUCTION, diff --git a/src/smallmap_gui.cpp b/src/smallmap_gui.cpp index ae2473f4ec..ed9144e02c 100644 --- a/src/smallmap_gui.cpp +++ b/src/smallmap_gui.cpp @@ -1978,7 +1978,7 @@ static const NWidgetPart _nested_smallmap_widgets[] = { EndContainer(), }; -static WindowDesc _smallmap_desc( +static WindowDesc _smallmap_desc(__FILE__, __LINE__, WDP_AUTO, "smallmap", 484, 314, WC_SMALLMAP, WC_NONE, 0, diff --git a/src/station_gui.cpp b/src/station_gui.cpp index 6787841420..2eac0f2980 100644 --- a/src/station_gui.cpp +++ b/src/station_gui.cpp @@ -762,7 +762,7 @@ static const NWidgetPart _nested_company_stations_widgets[] = { EndContainer(), }; -static WindowDesc _company_stations_desc( +static WindowDesc _company_stations_desc(__FILE__, __LINE__, WDP_AUTO, "list_stations", 358, 162, WC_STATION_LIST, WC_NONE, 0, @@ -2130,7 +2130,7 @@ const StringID StationViewWindow::_group_names[] = { INVALID_STRING_ID }; -static WindowDesc _station_view_desc( +static WindowDesc _station_view_desc(__FILE__, __LINE__, WDP_AUTO, "view_station", 249, 117, WC_STATION_VIEW, WC_NONE, 0, @@ -2387,7 +2387,7 @@ struct SelectStationWindow : Window { } }; -static WindowDesc _select_station_desc( +static WindowDesc _select_station_desc(__FILE__, __LINE__, WDP_AUTO, "build_station_join", 200, 180, WC_SELECT_STATION, WC_NONE, WDF_CONSTRUCTION, diff --git a/src/statusbar_gui.cpp b/src/statusbar_gui.cpp index b1ac784e24..34632838ae 100644 --- a/src/statusbar_gui.cpp +++ b/src/statusbar_gui.cpp @@ -226,7 +226,7 @@ static const NWidgetPart _nested_main_status_widgets[] = { EndContainer(), }; -static WindowDesc _main_status_desc( +static WindowDesc _main_status_desc(__FILE__, __LINE__, WDP_MANUAL, nullptr, 0, 0, WC_STATUS_BAR, WC_NONE, WDF_NO_FOCUS | WDF_NO_CLOSE, diff --git a/src/story_gui.cpp b/src/story_gui.cpp index c8eed0a98b..4012a9ae48 100644 --- a/src/story_gui.cpp +++ b/src/story_gui.cpp @@ -968,7 +968,7 @@ static const NWidgetPart _nested_story_book_widgets[] = { EndContainer(), }; -static WindowDesc _story_book_desc( +static WindowDesc _story_book_desc(__FILE__, __LINE__, WDP_CENTER, "view_story", 400, 300, WC_STORY_BOOK, WC_NONE, 0, diff --git a/src/subsidy_gui.cpp b/src/subsidy_gui.cpp index 3074431e8f..c45939944f 100644 --- a/src/subsidy_gui.cpp +++ b/src/subsidy_gui.cpp @@ -234,7 +234,7 @@ static const NWidgetPart _nested_subsidies_list_widgets[] = { EndContainer(), }; -static WindowDesc _subsidies_list_desc( +static WindowDesc _subsidies_list_desc(__FILE__, __LINE__, WDP_AUTO, "list_subsidies", 500, 127, WC_SUBSIDIES_LIST, WC_NONE, 0, diff --git a/src/terraform_gui.cpp b/src/terraform_gui.cpp index 5889ff19f2..f3e3f4e690 100644 --- a/src/terraform_gui.cpp +++ b/src/terraform_gui.cpp @@ -351,7 +351,7 @@ static const NWidgetPart _nested_terraform_widgets[] = { EndContainer(), }; -static WindowDesc _terraform_desc( +static WindowDesc _terraform_desc(__FILE__, __LINE__, WDP_MANUAL, "toolbar_landscape", 0, 0, WC_SCEN_LAND_GEN, WC_NONE, WDF_CONSTRUCTION, @@ -735,7 +735,7 @@ struct ScenarioEditorLandscapeGenerationWindow : Window { }, TerraformToolbarEditorGlobalHotkeys}; }; -static WindowDesc _scen_edit_land_gen_desc( +static WindowDesc _scen_edit_land_gen_desc(__FILE__, __LINE__, WDP_AUTO, "toolbar_landscape_scen", 0, 0, WC_SCEN_LAND_GEN, WC_NONE, WDF_CONSTRUCTION, diff --git a/src/textfile_gui.cpp b/src/textfile_gui.cpp index eb4e27274b..bf63a24dea 100644 --- a/src/textfile_gui.cpp +++ b/src/textfile_gui.cpp @@ -74,7 +74,7 @@ static const NWidgetPart _nested_textfile_widgets[] = { }; /** Window definition for the textfile window */ -static WindowDesc _textfile_desc( +static WindowDesc _textfile_desc(__FILE__, __LINE__, WDP_CENTER, "textfile", 630, 460, WC_TEXTFILE, WC_NONE, 0, diff --git a/src/timetable_gui.cpp b/src/timetable_gui.cpp index 2f9b792c18..e8bd258288 100644 --- a/src/timetable_gui.cpp +++ b/src/timetable_gui.cpp @@ -743,7 +743,7 @@ static const NWidgetPart _nested_timetable_widgets[] = { EndContainer(), }; -static WindowDesc _timetable_desc( +static WindowDesc _timetable_desc(__FILE__, __LINE__, WDP_AUTO, "view_vehicle_timetable", 400, 130, WC_VEHICLE_TIMETABLE, WC_VEHICLE_VIEW, WDF_CONSTRUCTION, diff --git a/src/toolbar_gui.cpp b/src/toolbar_gui.cpp index 5f3f279acf..7df6a2c833 100644 --- a/src/toolbar_gui.cpp +++ b/src/toolbar_gui.cpp @@ -2237,7 +2237,7 @@ static const NWidgetPart _nested_toolbar_normal_widgets[] = { NWidgetFunction(MakeMainToolbar), }; -static WindowDesc _toolb_normal_desc( +static WindowDesc _toolb_normal_desc(__FILE__, __LINE__, WDP_MANUAL, nullptr, 0, 0, WC_MAIN_TOOLBAR, WC_NONE, WDF_NO_FOCUS | WDF_NO_CLOSE, @@ -2577,7 +2577,7 @@ static const NWidgetPart _nested_toolb_scen_widgets[] = { NWidgetFunction(MakeScenarioToolbar), }; -static WindowDesc _toolb_scen_desc( +static WindowDesc _toolb_scen_desc(__FILE__, __LINE__, WDP_MANUAL, nullptr, 0, 0, WC_MAIN_TOOLBAR, WC_NONE, WDF_NO_FOCUS | WDF_NO_CLOSE, diff --git a/src/town_gui.cpp b/src/town_gui.cpp index b73db08534..b0b43b297e 100644 --- a/src/town_gui.cpp +++ b/src/town_gui.cpp @@ -326,7 +326,7 @@ public: } }; -static WindowDesc _town_authority_desc( +static WindowDesc _town_authority_desc(__FILE__, __LINE__, WDP_AUTO, "view_town_authority", 317, 222, WC_TOWN_AUTHORITY, WC_NONE, 0, @@ -619,7 +619,7 @@ static const NWidgetPart _nested_town_game_view_widgets[] = { EndContainer(), }; -static WindowDesc _town_game_view_desc( +static WindowDesc _town_game_view_desc(__FILE__, __LINE__, WDP_AUTO, "view_town", 260, TownViewWindow::WID_TV_HEIGHT_NORMAL, WC_TOWN_VIEW, WC_NONE, 0, @@ -650,7 +650,7 @@ static const NWidgetPart _nested_town_editor_view_widgets[] = { EndContainer(), }; -static WindowDesc _town_editor_view_desc( +static WindowDesc _town_editor_view_desc(__FILE__, __LINE__, WDP_AUTO, "view_town_scen", 260, TownViewWindow::WID_TV_HEIGHT_NORMAL, WC_TOWN_VIEW, WC_NONE, 0, @@ -1025,7 +1025,7 @@ GUITownList::SortFunction * const TownDirectoryWindow::sorter_funcs[] = { &TownRatingSorter, }; -static WindowDesc _town_directory_desc( +static WindowDesc _town_directory_desc(__FILE__, __LINE__, WDP_AUTO, "list_towns", 208, 202, WC_TOWN_DIRECTORY, WC_NONE, 0, @@ -1275,7 +1275,7 @@ public: } }; -static WindowDesc _found_town_desc( +static WindowDesc _found_town_desc(__FILE__, __LINE__, WDP_AUTO, "build_town", 160, 162, WC_FOUND_TOWN, WC_NONE, WDF_CONSTRUCTION, diff --git a/src/transparency_gui.cpp b/src/transparency_gui.cpp index e15726e631..5f1bbabbdf 100644 --- a/src/transparency_gui.cpp +++ b/src/transparency_gui.cpp @@ -148,7 +148,7 @@ static const NWidgetPart _nested_transparency_widgets[] = { EndContainer(), }; -static WindowDesc _transparency_desc( +static WindowDesc _transparency_desc(__FILE__, __LINE__, WDP_MANUAL, "toolbar_transparency", 0, 0, WC_TRANSPARENCY_TOOLBAR, WC_NONE, 0, diff --git a/src/tree_gui.cpp b/src/tree_gui.cpp index 5ffadd5483..44192b2227 100644 --- a/src/tree_gui.cpp +++ b/src/tree_gui.cpp @@ -316,7 +316,7 @@ static const NWidgetPart _nested_build_trees_widgets[] = { EndContainer(), }; -static WindowDesc _build_trees_desc( +static WindowDesc _build_trees_desc(__FILE__, __LINE__, WDP_AUTO, "build_tree", 0, 0, WC_BUILD_TREES, WC_NONE, WDF_CONSTRUCTION, diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp index ced848932e..38f310f155 100644 --- a/src/vehicle_gui.cpp +++ b/src/vehicle_gui.cpp @@ -1216,7 +1216,7 @@ static const NWidgetPart _nested_vehicle_refit_widgets[] = { EndContainer(), }; -static WindowDesc _vehicle_refit_desc( +static WindowDesc _vehicle_refit_desc(__FILE__, __LINE__, WDP_AUTO, "view_vehicle_refit", 240, 174, WC_VEHICLE_REFIT, WC_VEHICLE_VIEW, WDF_CONSTRUCTION, @@ -2143,14 +2143,14 @@ public: } }; -static WindowDesc _vehicle_list_other_desc( +static WindowDesc _vehicle_list_other_desc(__FILE__, __LINE__, WDP_AUTO, "list_vehicles", 260, 246, WC_INVALID, WC_NONE, 0, std::begin(_nested_vehicle_list), std::end(_nested_vehicle_list) ); -static WindowDesc _vehicle_list_train_desc( +static WindowDesc _vehicle_list_train_desc(__FILE__, __LINE__, WDP_AUTO, "list_vehicles_train", 325, 246, WC_TRAINS_LIST, WC_NONE, 0, @@ -2649,7 +2649,7 @@ struct VehicleDetailsWindow : Window { }; /** Vehicle details window descriptor. */ -static WindowDesc _train_vehicle_details_desc( +static WindowDesc _train_vehicle_details_desc(__FILE__, __LINE__, WDP_AUTO, "view_vehicle_details_train", 405, 178, WC_VEHICLE_DETAILS, WC_VEHICLE_VIEW, 0, @@ -2657,7 +2657,7 @@ static WindowDesc _train_vehicle_details_desc( ); /** Vehicle details window descriptor for other vehicles than a train. */ -static WindowDesc _nontrain_vehicle_details_desc( +static WindowDesc _nontrain_vehicle_details_desc(__FILE__, __LINE__, WDP_AUTO, "view_vehicle_details", 405, 113, WC_VEHICLE_DETAILS, WC_VEHICLE_VIEW, 0, @@ -3253,7 +3253,7 @@ public: }; /** Vehicle view window descriptor for all vehicles but trains. */ -static WindowDesc _vehicle_view_desc( +static WindowDesc _vehicle_view_desc(__FILE__, __LINE__, WDP_AUTO, "view_vehicle", 250, 116, WC_VEHICLE_VIEW, WC_NONE, 0, @@ -3265,7 +3265,7 @@ static WindowDesc _vehicle_view_desc( * Vehicle view window descriptor for trains. Only minimum_height and * default_height are different for train view. */ -static WindowDesc _train_view_desc( +static WindowDesc _train_view_desc(__FILE__, __LINE__, WDP_AUTO, "view_vehicle_train", 250, 134, WC_VEHICLE_VIEW, WC_NONE, 0, diff --git a/src/viewport_gui.cpp b/src/viewport_gui.cpp index 0c2b136afb..1f5178aff2 100644 --- a/src/viewport_gui.cpp +++ b/src/viewport_gui.cpp @@ -159,7 +159,7 @@ public: } }; -static WindowDesc _extra_viewport_desc( +static WindowDesc _extra_viewport_desc(__FILE__, __LINE__, WDP_AUTO, "extra_viewport", 300, 268, WC_EXTRA_VIEWPORT, WC_NONE, 0, diff --git a/src/waypoint_gui.cpp b/src/waypoint_gui.cpp index 3ef1fa1f48..071d8bb37c 100644 --- a/src/waypoint_gui.cpp +++ b/src/waypoint_gui.cpp @@ -183,7 +183,7 @@ static const NWidgetPart _nested_waypoint_view_widgets[] = { }; /** The description of the waypoint view. */ -static WindowDesc _waypoint_view_desc( +static WindowDesc _waypoint_view_desc(__FILE__, __LINE__, WDP_AUTO, "view_waypoint", 260, 118, WC_WAYPOINT_VIEW, WC_NONE, 0, diff --git a/src/widgets/dropdown.cpp b/src/widgets/dropdown.cpp index 5ee04219b5..3b8054233a 100644 --- a/src/widgets/dropdown.cpp +++ b/src/widgets/dropdown.cpp @@ -107,7 +107,7 @@ static const NWidgetPart _nested_dropdown_menu_widgets[] = { EndContainer(), }; -static WindowDesc _dropdown_desc( +static WindowDesc _dropdown_desc(__FILE__, __LINE__, WDP_MANUAL, nullptr, 0, 0, WC_DROPDOWN_MENU, WC_NONE, WDF_NO_FOCUS, diff --git a/src/window.cpp b/src/window.cpp index 5de2f8f6cf..de514ec8d5 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -102,9 +102,11 @@ static std::vector *_window_descs = nullptr; std::string _windows_file; /** Window description constructor. */ -WindowDesc::WindowDesc(WindowPosition def_pos, const char *ini_key, int16_t def_width_trad, int16_t def_height_trad, +WindowDesc::WindowDesc(const char * const file, const int line, 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, const NWidgetPart *nwid_begin, const NWidgetPart *nwid_end, HotkeyList *hotkeys) : + file(file), + line(line), default_pos(def_pos), cls(window_class), parent_cls(parent_class), diff --git a/src/window_gui.h b/src/window_gui.h index 53257ca00b..8beb315976 100644 --- a/src/window_gui.h +++ b/src/window_gui.h @@ -95,12 +95,14 @@ struct HotkeyList; */ struct WindowDesc : ZeroedMemoryAllocator { - WindowDesc(WindowPosition default_pos, const char *ini_key, int16_t def_width_trad, int16_t def_height_trad, + WindowDesc(const char * const file, const int line, 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, const NWidgetPart *nwid_begin, const NWidgetPart *nwid_end, HotkeyList *hotkeys = nullptr); ~WindowDesc(); + const char * const file; ///< Source file of this definition + const int line; ///< Source line of this definition WindowPosition default_pos; ///< Preferred position of the window. @see WindowPosition() WindowClass cls; ///< Class of the window, @see WindowClass. WindowClass parent_cls; ///< Class of the parent window. @see WindowClass