Codechange: Add __FILE__/__LINE__ of WindowDesc to WindowDesc.

This is to allow unit-tests to produce more useful output.
This commit is contained in:
Peter Nelson 2023-11-02 19:33:01 +00:00 committed by Peter Nelson
parent 873f93cab1
commit 18fb8e153f
63 changed files with 161 additions and 153 deletions

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -102,9 +102,11 @@ static std::vector<WindowDesc*> *_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),

View File

@ -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