From 3b0640915373e8f3c905c85eadc159fddb9e6906 Mon Sep 17 00:00:00 2001 From: frosch Date: Sun, 11 Nov 2012 16:10:43 +0000 Subject: [PATCH] (svn r24700) -Cleanup: Remove WDF_UNCLICK_BUTTONS and make it the default. --- src/ai/ai_gui.cpp | 8 ++++---- src/airport_gui.cpp | 2 +- src/autoreplace_gui.cpp | 4 ++-- src/bootstrap_gui.cpp | 2 +- src/build_vehicle_gui.cpp | 2 +- src/cheat_gui.cpp | 2 +- src/company_gui.cpp | 8 ++++---- src/date_gui.cpp | 2 +- src/depot_gui.cpp | 8 ++++---- src/fios_gui.cpp | 6 +++--- src/genworld_gui.cpp | 8 ++++---- src/graph_gui.cpp | 12 ++++++------ src/group_gui.cpp | 4 ++-- src/industry_gui.cpp | 4 ++-- src/intro_gui.cpp | 2 +- src/misc_gui.cpp | 2 +- src/music_gui.cpp | 4 ++-- src/network/network_content_gui.cpp | 2 +- src/network/network_gui.cpp | 8 ++++---- src/newgrf_debug_gui.cpp | 4 ++-- src/newgrf_gui.cpp | 6 +++--- src/news_gui.cpp | 4 ++-- src/order_gui.cpp | 6 +++--- src/osk_gui.cpp | 2 +- src/rail_gui.cpp | 2 +- src/settings_gui.cpp | 8 ++++---- src/signs_gui.cpp | 4 ++-- src/smallmap_gui.cpp | 2 +- src/station_gui.cpp | 4 ++-- src/statusbar_gui.cpp | 2 +- src/terraform_gui.cpp | 2 +- src/textfile_gui.cpp | 2 +- src/timetable_gui.cpp | 2 +- src/toolbar_gui.cpp | 2 +- src/town_gui.cpp | 10 +++++----- src/tree_gui.cpp | 2 +- src/vehicle_gui.cpp | 12 ++++++------ src/viewport_gui.cpp | 2 +- src/waypoint_gui.cpp | 2 +- src/window.cpp | 2 +- src/window_gui.h | 5 ++--- 41 files changed, 88 insertions(+), 89 deletions(-) diff --git a/src/ai/ai_gui.cpp b/src/ai/ai_gui.cpp index 20af1f2958..0c1a342a6c 100644 --- a/src/ai/ai_gui.cpp +++ b/src/ai/ai_gui.cpp @@ -260,7 +260,7 @@ static const NWidgetPart _nested_ai_list_widgets[] = { static const WindowDesc _ai_list_desc( WDP_CENTER, 200, 234, WC_AI_LIST, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_ai_list_widgets, lengthof(_nested_ai_list_widgets) ); @@ -625,7 +625,7 @@ static const NWidgetPart _nested_ai_settings_widgets[] = { static const WindowDesc _ai_settings_desc( WDP_CENTER, 500, 208, WC_AI_SETTINGS, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_ai_settings_widgets, lengthof(_nested_ai_settings_widgets) ); @@ -719,7 +719,7 @@ static const NWidgetPart _nested_ai_config_widgets[] = { static const WindowDesc _ai_config_desc( WDP_CENTER, 0, 0, WC_GAME_OPTIONS, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_ai_config_widgets, lengthof(_nested_ai_config_widgets) ); @@ -1519,7 +1519,7 @@ static const NWidgetPart _nested_ai_debug_widgets[] = { static const WindowDesc _ai_debug_desc( WDP_AUTO, 600, 450, WC_AI_DEBUG, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_ai_debug_widgets, lengthof(_nested_ai_debug_widgets) ); diff --git a/src/airport_gui.cpp b/src/airport_gui.cpp index 630c32cf52..7b55c09d9f 100644 --- a/src/airport_gui.cpp +++ b/src/airport_gui.cpp @@ -557,7 +557,7 @@ static const NWidgetPart _nested_build_airport_widgets[] = { static const WindowDesc _build_airport_desc( WDP_AUTO, 0, 0, WC_BUILD_STATION, WC_BUILD_TOOLBAR, - WDF_CONSTRUCTION | WDF_UNCLICK_BUTTONS, + WDF_CONSTRUCTION, _nested_build_airport_widgets, lengthof(_nested_build_airport_widgets) ); diff --git a/src/autoreplace_gui.cpp b/src/autoreplace_gui.cpp index a54b454b5f..6477797ed0 100644 --- a/src/autoreplace_gui.cpp +++ b/src/autoreplace_gui.cpp @@ -568,7 +568,7 @@ static const NWidgetPart _nested_replace_rail_vehicle_widgets[] = { static const WindowDesc _replace_rail_vehicle_desc( WDP_AUTO, 500, 140, WC_REPLACE_VEHICLE, WC_NONE, - WDF_UNCLICK_BUTTONS | WDF_CONSTRUCTION, + WDF_CONSTRUCTION, _nested_replace_rail_vehicle_widgets, lengthof(_nested_replace_rail_vehicle_widgets) ); @@ -600,7 +600,7 @@ static const NWidgetPart _nested_replace_vehicle_widgets[] = { static const WindowDesc _replace_vehicle_desc( WDP_AUTO, 456, 118, WC_REPLACE_VEHICLE, WC_NONE, - WDF_UNCLICK_BUTTONS | WDF_CONSTRUCTION, + WDF_CONSTRUCTION, _nested_replace_vehicle_widgets, lengthof(_nested_replace_vehicle_widgets) ); diff --git a/src/bootstrap_gui.cpp b/src/bootstrap_gui.cpp index a9459f967f..89b7430700 100644 --- a/src/bootstrap_gui.cpp +++ b/src/bootstrap_gui.cpp @@ -118,7 +118,7 @@ static const NWidgetPart _bootstrap_query_widgets[] = { static const WindowDesc _bootstrap_query_desc( WDP_CENTER, 0, 0, WC_CONFIRM_POPUP_QUERY, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _bootstrap_query_widgets, lengthof(_bootstrap_query_widgets) ); diff --git a/src/build_vehicle_gui.cpp b/src/build_vehicle_gui.cpp index 4921dfe444..6415493b37 100644 --- a/src/build_vehicle_gui.cpp +++ b/src/build_vehicle_gui.cpp @@ -1408,7 +1408,7 @@ struct BuildVehicleWindow : Window { static const WindowDesc _build_vehicle_desc( WDP_AUTO, 240, 268, WC_BUILD_VEHICLE, WC_NONE, - WDF_UNCLICK_BUTTONS | WDF_CONSTRUCTION, + WDF_CONSTRUCTION, _nested_build_vehicle_widgets, lengthof(_nested_build_vehicle_widgets) ); diff --git a/src/cheat_gui.cpp b/src/cheat_gui.cpp index 40e153de8a..18901c5dab 100644 --- a/src/cheat_gui.cpp +++ b/src/cheat_gui.cpp @@ -351,7 +351,7 @@ struct CheatWindow : Window { static const WindowDesc _cheats_desc( WDP_AUTO, 0, 0, WC_CHEATS, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_cheat_widgets, lengthof(_nested_cheat_widgets) ); diff --git a/src/company_gui.cpp b/src/company_gui.cpp index 1aa5f7bec2..ae6f394e97 100644 --- a/src/company_gui.cpp +++ b/src/company_gui.cpp @@ -466,7 +466,7 @@ Money CompanyFinancesWindow::max_money = INT32_MAX; static const WindowDesc _company_finances_desc( WDP_AUTO, 0, 0, WC_FINANCES, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_company_finances_widgets, lengthof(_nested_company_finances_widgets) ); @@ -1482,7 +1482,7 @@ const StringID SelectCompanyManagerFaceWindow::PART_TEXTS[] = { static const WindowDesc _select_company_manager_face_desc( WDP_AUTO, 0, 0, WC_COMPANY_MANAGER_FACE, WC_NONE, - WDF_UNCLICK_BUTTONS | WDF_CONSTRUCTION, + WDF_CONSTRUCTION, _nested_select_company_manager_face_widgets, lengthof(_nested_select_company_manager_face_widgets) ); @@ -1836,7 +1836,7 @@ struct CompanyInfrastructureWindow : Window static const WindowDesc _company_infrastructure_desc( WDP_AUTO, 0, 0, WC_COMPANY_INFRASTRUCTURE, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_company_infrastructure_widgets, lengthof(_nested_company_infrastructure_widgets) ); @@ -2401,7 +2401,7 @@ struct CompanyWindow : Window static const WindowDesc _company_desc( WDP_AUTO, 0, 0, WC_COMPANY, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_company_widgets, lengthof(_nested_company_widgets) ); diff --git a/src/date_gui.cpp b/src/date_gui.cpp index 83d1b05dde..3162a4ef99 100644 --- a/src/date_gui.cpp +++ b/src/date_gui.cpp @@ -199,7 +199,7 @@ static const NWidgetPart _nested_set_date_widgets[] = { static const WindowDesc _set_date_desc( WDP_CENTER, 0, 0, WC_SET_DATE, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_set_date_widgets, lengthof(_nested_set_date_widgets) ); diff --git a/src/depot_gui.cpp b/src/depot_gui.cpp index 290080fc98..758c5f5af5 100644 --- a/src/depot_gui.cpp +++ b/src/depot_gui.cpp @@ -80,28 +80,28 @@ static const NWidgetPart _nested_train_depot_widgets[] = { static const WindowDesc _train_depot_desc( WDP_AUTO, 362, 123, WC_VEHICLE_DEPOT, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_train_depot_widgets, lengthof(_nested_train_depot_widgets) ); static const WindowDesc _road_depot_desc( WDP_AUTO, 316, 97, WC_VEHICLE_DEPOT, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_train_depot_widgets, lengthof(_nested_train_depot_widgets) ); static const WindowDesc _ship_depot_desc( WDP_AUTO, 306, 99, WC_VEHICLE_DEPOT, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_train_depot_widgets, lengthof(_nested_train_depot_widgets) ); static const WindowDesc _aircraft_depot_desc( WDP_AUTO, 332, 99, WC_VEHICLE_DEPOT, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_train_depot_widgets, lengthof(_nested_train_depot_widgets) ); diff --git a/src/fios_gui.cpp b/src/fios_gui.cpp index 5266d6fc35..566329e7ec 100644 --- a/src/fios_gui.cpp +++ b/src/fios_gui.cpp @@ -712,7 +712,7 @@ public: static const WindowDesc _load_dialog_desc( WDP_CENTER, 500, 294, WC_SAVELOAD, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_load_dialog_widgets, lengthof(_nested_load_dialog_widgets) ); @@ -720,7 +720,7 @@ static const WindowDesc _load_dialog_desc( static const WindowDesc _load_heightmap_dialog_desc( WDP_CENTER, 257, 320, WC_SAVELOAD, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_load_heightmap_dialog_widgets, lengthof(_nested_load_heightmap_dialog_widgets) ); @@ -728,7 +728,7 @@ static const WindowDesc _load_heightmap_dialog_desc( static const WindowDesc _save_dialog_desc( WDP_CENTER, 500, 294, WC_SAVELOAD, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_save_dialog_widgets, lengthof(_nested_save_dialog_widgets) ); diff --git a/src/genworld_gui.cpp b/src/genworld_gui.cpp index db9f9c7123..08dd600647 100644 --- a/src/genworld_gui.cpp +++ b/src/genworld_gui.cpp @@ -812,14 +812,14 @@ struct GenerateLandscapeWindow : public QueryStringBaseWindow { static const WindowDesc _generate_landscape_desc( WDP_CENTER, 0, 0, WC_GENERATE_LANDSCAPE, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_generate_landscape_widgets, lengthof(_nested_generate_landscape_widgets) ); static const WindowDesc _heightmap_load_desc( WDP_CENTER, 0, 0, WC_GENERATE_LANDSCAPE, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_heightmap_load_widgets, lengthof(_nested_heightmap_load_widgets) ); @@ -1113,7 +1113,7 @@ static const NWidgetPart _nested_create_scenario_widgets[] = { static const WindowDesc _create_scenario_desc( WDP_CENTER, 0, 0, WC_GENERATE_LANDSCAPE, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_create_scenario_widgets, lengthof(_nested_create_scenario_widgets) ); @@ -1141,7 +1141,7 @@ static const NWidgetPart _nested_generate_progress_widgets[] = { static const WindowDesc _generate_progress_desc( WDP_CENTER, 0, 0, WC_MODAL_PROGRESS, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_generate_progress_widgets, lengthof(_nested_generate_progress_widgets) ); diff --git a/src/graph_gui.cpp b/src/graph_gui.cpp index 5c6902511a..0d87bba00c 100644 --- a/src/graph_gui.cpp +++ b/src/graph_gui.cpp @@ -645,7 +645,7 @@ static const NWidgetPart _nested_operating_profit_widgets[] = { static const WindowDesc _operating_profit_desc( WDP_AUTO, 0, 0, WC_OPERATING_PROFIT, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_operating_profit_widgets, lengthof(_nested_operating_profit_widgets) ); @@ -695,7 +695,7 @@ static const NWidgetPart _nested_income_graph_widgets[] = { static const WindowDesc _income_graph_desc( WDP_AUTO, 0, 0, WC_INCOME_GRAPH, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_income_graph_widgets, lengthof(_nested_income_graph_widgets) ); @@ -743,7 +743,7 @@ static const NWidgetPart _nested_delivered_cargo_graph_widgets[] = { static const WindowDesc _delivered_cargo_graph_desc( WDP_AUTO, 0, 0, WC_DELIVERED_CARGO, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_delivered_cargo_graph_widgets, lengthof(_nested_delivered_cargo_graph_widgets) ); @@ -798,7 +798,7 @@ static const NWidgetPart _nested_performance_history_widgets[] = { static const WindowDesc _performance_history_desc( WDP_AUTO, 0, 0, WC_PERFORMANCE_HISTORY, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_performance_history_widgets, lengthof(_nested_performance_history_widgets) ); @@ -846,7 +846,7 @@ static const NWidgetPart _nested_company_value_graph_widgets[] = { static const WindowDesc _company_value_graph_desc( WDP_AUTO, 0, 0, WC_COMPANY_VALUE, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_company_value_graph_widgets, lengthof(_nested_company_value_graph_widgets) ); @@ -1076,7 +1076,7 @@ static const NWidgetPart _nested_cargo_payment_rates_widgets[] = { static const WindowDesc _cargo_payment_rates_desc( WDP_AUTO, 0, 0, WC_PAYMENT_RATES, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_cargo_payment_rates_widgets, lengthof(_nested_cargo_payment_rates_widgets) ); diff --git a/src/group_gui.cpp b/src/group_gui.cpp index a8aca15adc..bbb6e9d0eb 100644 --- a/src/group_gui.cpp +++ b/src/group_gui.cpp @@ -801,14 +801,14 @@ public: static WindowDesc _other_group_desc( WDP_AUTO, 460, 246, WC_INVALID, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_group_widgets, lengthof(_nested_group_widgets) ); static const WindowDesc _train_group_desc( WDP_AUTO, 525, 246, WC_TRAINS_LIST, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_group_widgets, lengthof(_nested_group_widgets) ); diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp index 49c0afcfab..26d84d2362 100644 --- a/src/industry_gui.cpp +++ b/src/industry_gui.cpp @@ -1015,7 +1015,7 @@ static const NWidgetPart _nested_industry_view_widgets[] = { static const WindowDesc _industry_view_desc( WDP_AUTO, 260, 120, WC_INDUSTRY_VIEW, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_industry_view_widgets, lengthof(_nested_industry_view_widgets) ); @@ -1386,7 +1386,7 @@ const StringID IndustryDirectoryWindow::sorter_names[] = { static const WindowDesc _industry_directory_desc( WDP_AUTO, 428, 190, WC_INDUSTRY_DIRECTORY, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_industry_directory_widgets, lengthof(_nested_industry_directory_widgets) ); diff --git a/src/intro_gui.cpp b/src/intro_gui.cpp index ad87e09dfe..ee9782908b 100644 --- a/src/intro_gui.cpp +++ b/src/intro_gui.cpp @@ -265,7 +265,7 @@ static const NWidgetPart _nested_select_game_widgets[] = { static const WindowDesc _select_game_desc( WDP_CENTER, 0, 0, WC_SELECT_GAME, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_select_game_widgets, lengthof(_nested_select_game_widgets) ); diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp index 5ad6394b3f..630b750139 100644 --- a/src/misc_gui.cpp +++ b/src/misc_gui.cpp @@ -1108,7 +1108,7 @@ static const NWidgetPart _nested_query_widgets[] = { static const WindowDesc _query_desc( WDP_CENTER, 0, 0, WC_CONFIRM_POPUP_QUERY, WC_NONE, - WDF_UNCLICK_BUTTONS | WDF_MODAL, + WDF_MODAL, _nested_query_widgets, lengthof(_nested_query_widgets) ); diff --git a/src/music_gui.cpp b/src/music_gui.cpp index ce952d4666..72ed9f9079 100644 --- a/src/music_gui.cpp +++ b/src/music_gui.cpp @@ -498,7 +498,7 @@ static const NWidgetPart _nested_music_track_selection_widgets[] = { static const WindowDesc _music_track_selection_desc( WDP_AUTO, 0, 0, WC_MUSIC_TRACK_SELECTION, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_music_track_selection_widgets, lengthof(_nested_music_track_selection_widgets) ); @@ -761,7 +761,7 @@ static const NWidgetPart _nested_music_window_widgets[] = { static const WindowDesc _music_window_desc( WDP_AUTO, 0, 0, WC_MUSIC_WINDOW, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_music_window_widgets, lengthof(_nested_music_window_widgets) ); diff --git a/src/network/network_content_gui.cpp b/src/network/network_content_gui.cpp index ca1cfdab63..d85307206b 100644 --- a/src/network/network_content_gui.cpp +++ b/src/network/network_content_gui.cpp @@ -968,7 +968,7 @@ static const NWidgetPart _nested_network_content_list_widgets[] = { static const WindowDesc _network_content_list_desc( WDP_CENTER, 630, 460, WC_NETWORK_WINDOW, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_network_content_list_widgets, lengthof(_nested_network_content_list_widgets) ); diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp index 27093da663..0209f0f4f7 100644 --- a/src/network/network_gui.cpp +++ b/src/network/network_gui.cpp @@ -986,7 +986,7 @@ static const NWidgetPart _nested_network_game_widgets[] = { static const WindowDesc _network_game_window_desc( WDP_CENTER, 1000, 730, WC_NETWORK_WINDOW, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_network_game_widgets, lengthof(_nested_network_game_widgets) ); @@ -1324,7 +1324,7 @@ static const NWidgetPart _nested_network_start_server_window_widgets[] = { static const WindowDesc _network_start_server_window_desc( WDP_CENTER, 0, 0, WC_NETWORK_WINDOW, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_network_start_server_window_widgets, lengthof(_nested_network_start_server_window_widgets) ); @@ -1613,7 +1613,7 @@ static const NWidgetPart _nested_network_lobby_window_widgets[] = { static const WindowDesc _network_lobby_window_desc( WDP_CENTER, 0, 0, WC_NETWORK_WINDOW, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_network_lobby_window_widgets, lengthof(_nested_network_lobby_window_widgets) ); @@ -2234,7 +2234,7 @@ static const NWidgetPart _nested_network_company_password_window_widgets[] = { static const WindowDesc _network_company_password_window_desc( WDP_AUTO, 0, 0, WC_COMPANY_PASSWORD_WINDOW, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_network_company_password_window_widgets, lengthof(_nested_network_company_password_window_widgets) ); diff --git a/src/newgrf_debug_gui.cpp b/src/newgrf_debug_gui.cpp index c807b1bda9..244d2c0908 100644 --- a/src/newgrf_debug_gui.cpp +++ b/src/newgrf_debug_gui.cpp @@ -521,7 +521,7 @@ static const NWidgetPart _nested_newgrf_inspect_widgets[] = { static const WindowDesc _newgrf_inspect_desc( WDP_AUTO, 400, 300, WC_NEWGRF_INSPECT, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_newgrf_inspect_widgets, lengthof(_nested_newgrf_inspect_widgets) ); @@ -875,7 +875,7 @@ static const NWidgetPart _nested_sprite_aligner_widgets[] = { static const WindowDesc _sprite_aligner_desc( WDP_AUTO, 400, 300, WC_SPRITE_ALIGNER, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_sprite_aligner_widgets, lengthof(_nested_sprite_aligner_widgets) ); diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp index 5b9927b9d8..114895534a 100644 --- a/src/newgrf_gui.cpp +++ b/src/newgrf_gui.cpp @@ -526,7 +526,7 @@ static const NWidgetPart _nested_newgrf_parameter_widgets[] = { static const WindowDesc _newgrf_parameters_desc( WDP_CENTER, 500, 208, WC_GRF_PARAMETERS, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_newgrf_parameter_widgets, lengthof(_nested_newgrf_parameter_widgets) ); @@ -1884,7 +1884,7 @@ static const NWidgetPart _nested_newgrf_widgets[] = { static const WindowDesc _newgrf_desc( WDP_CENTER, 300, 263, WC_GAME_OPTIONS, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_newgrf_widgets, lengthof(_nested_newgrf_widgets) ); @@ -1955,7 +1955,7 @@ static const NWidgetPart _nested_scan_progress_widgets[] = { static const WindowDesc _scan_progress_desc( WDP_CENTER, 0, 0, WC_MODAL_PROGRESS, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_scan_progress_widgets, lengthof(_nested_scan_progress_widgets) ); diff --git a/src/news_gui.cpp b/src/news_gui.cpp index 7efa2b212b..f01ba40ee7 100644 --- a/src/news_gui.cpp +++ b/src/news_gui.cpp @@ -1077,7 +1077,7 @@ static const NWidgetPart _nested_message_history[] = { static const WindowDesc _message_history_desc( WDP_AUTO, 400, 140, WC_MESSAGE_HISTORY, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_message_history, lengthof(_nested_message_history) ); @@ -1342,7 +1342,7 @@ static const NWidgetPart _nested_message_options_widgets[] = { static const WindowDesc _message_options_desc( WDP_AUTO, 0, 0, WC_GAME_OPTIONS, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_message_options_widgets, lengthof(_nested_message_options_widgets) ); diff --git a/src/order_gui.cpp b/src/order_gui.cpp index b1ad635ff7..f50ef73ed1 100644 --- a/src/order_gui.cpp +++ b/src/order_gui.cpp @@ -1592,7 +1592,7 @@ static const NWidgetPart _nested_orders_train_widgets[] = { static const WindowDesc _orders_train_desc( WDP_AUTO, 384, 100, WC_VEHICLE_ORDERS, WC_VEHICLE_VIEW, - WDF_UNCLICK_BUTTONS | WDF_CONSTRUCTION, + WDF_CONSTRUCTION, _nested_orders_train_widgets, lengthof(_nested_orders_train_widgets) ); @@ -1663,7 +1663,7 @@ static const NWidgetPart _nested_orders_widgets[] = { static const WindowDesc _orders_desc( WDP_AUTO, 384, 100, WC_VEHICLE_ORDERS, WC_VEHICLE_VIEW, - WDF_UNCLICK_BUTTONS | WDF_CONSTRUCTION, + WDF_CONSTRUCTION, _nested_orders_widgets, lengthof(_nested_orders_widgets) ); @@ -1688,7 +1688,7 @@ static const NWidgetPart _nested_other_orders_widgets[] = { static const WindowDesc _other_orders_desc( WDP_AUTO, 384, 86, WC_VEHICLE_ORDERS, WC_VEHICLE_VIEW, - WDF_UNCLICK_BUTTONS | WDF_CONSTRUCTION, + WDF_CONSTRUCTION, _nested_other_orders_widgets, lengthof(_nested_other_orders_widgets) ); diff --git a/src/osk_gui.cpp b/src/osk_gui.cpp index 9724a6c461..19214af1fa 100644 --- a/src/osk_gui.cpp +++ b/src/osk_gui.cpp @@ -366,7 +366,7 @@ static const NWidgetPart _nested_osk_widgets[] = { static const WindowDesc _osk_desc( WDP_CENTER, 0, 0, WC_OSK, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_osk_widgets, lengthof(_nested_osk_widgets) ); diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp index def4ec9e8c..73d1a2684b 100644 --- a/src/rail_gui.cpp +++ b/src/rail_gui.cpp @@ -1617,7 +1617,7 @@ static const NWidgetPart _nested_signal_builder_widgets[] = { static const WindowDesc _signal_builder_desc( WDP_AUTO, 0, 0, WC_BUILD_SIGNAL, WC_BUILD_TOOLBAR, - WDF_UNCLICK_BUTTONS | WDF_CONSTRUCTION, + WDF_CONSTRUCTION, _nested_signal_builder_widgets, lengthof(_nested_signal_builder_widgets) ); diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp index ecb647893f..a51b7cb514 100644 --- a/src/settings_gui.cpp +++ b/src/settings_gui.cpp @@ -671,7 +671,7 @@ static const NWidgetPart _nested_game_options_widgets[] = { static const WindowDesc _game_options_desc( WDP_CENTER, 0, 0, WC_GAME_OPTIONS, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_game_options_widgets, lengthof(_nested_game_options_widgets) ); @@ -947,7 +947,7 @@ static const NWidgetPart _nested_game_difficulty_widgets[] = { static const WindowDesc _game_difficulty_desc( WDP_CENTER, 0, 0, WC_GAME_OPTIONS, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_game_difficulty_widgets, lengthof(_nested_game_difficulty_widgets) ); @@ -2484,7 +2484,7 @@ static const NWidgetPart _nested_settings_selection_widgets[] = { static const WindowDesc _settings_selection_desc( WDP_CENTER, 510, 450, WC_GAME_OPTIONS, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_settings_selection_widgets, lengthof(_nested_settings_selection_widgets) ); @@ -2777,7 +2777,7 @@ static const NWidgetPart _nested_cust_currency_widgets[] = { static const WindowDesc _cust_currency_desc( WDP_CENTER, 0, 0, WC_CUSTOM_CURRENCY, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_cust_currency_widgets, lengthof(_nested_cust_currency_widgets) ); diff --git a/src/signs_gui.cpp b/src/signs_gui.cpp index 6f23f81b9c..113a457368 100644 --- a/src/signs_gui.cpp +++ b/src/signs_gui.cpp @@ -416,7 +416,7 @@ static const NWidgetPart _nested_sign_list_widgets[] = { static const WindowDesc _sign_list_desc( WDP_AUTO, 358, 138, WC_SIGN_LIST, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_sign_list_widgets, lengthof(_nested_sign_list_widgets) ); @@ -613,7 +613,7 @@ static const NWidgetPart _nested_query_sign_edit_widgets[] = { static const WindowDesc _query_sign_edit_desc( WDP_AUTO, 0, 0, WC_QUERY_STRING, WC_NONE, - WDF_CONSTRUCTION | WDF_UNCLICK_BUTTONS, + WDF_CONSTRUCTION, _nested_query_sign_edit_widgets, lengthof(_nested_query_sign_edit_widgets) ); diff --git a/src/smallmap_gui.cpp b/src/smallmap_gui.cpp index ddceba2bb1..2bd4422958 100644 --- a/src/smallmap_gui.cpp +++ b/src/smallmap_gui.cpp @@ -1747,7 +1747,7 @@ static const NWidgetPart _nested_smallmap_widgets[] = { static const WindowDesc _smallmap_desc( WDP_AUTO, 446, 314, WC_SMALLMAP, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_smallmap_widgets, lengthof(_nested_smallmap_widgets) ); diff --git a/src/station_gui.cpp b/src/station_gui.cpp index 48def98f30..cb2207af39 100644 --- a/src/station_gui.cpp +++ b/src/station_gui.cpp @@ -713,7 +713,7 @@ static const NWidgetPart _nested_company_stations_widgets[] = { static const WindowDesc _company_stations_desc( WDP_AUTO, 358, 162, WC_STATION_LIST, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_company_stations_widgets, lengthof(_nested_company_stations_widgets) ); @@ -1173,7 +1173,7 @@ struct StationViewWindow : public Window { static const WindowDesc _station_view_desc( WDP_AUTO, 249, 110, WC_STATION_VIEW, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_station_view_widgets, lengthof(_nested_station_view_widgets) ); diff --git a/src/statusbar_gui.cpp b/src/statusbar_gui.cpp index 119c928be6..4a014d2613 100644 --- a/src/statusbar_gui.cpp +++ b/src/statusbar_gui.cpp @@ -238,7 +238,7 @@ static const NWidgetPart _nested_main_status_widgets[] = { static WindowDesc _main_status_desc( WDP_MANUAL, 640, 12, WC_STATUS_BAR, WC_NONE, - WDF_UNCLICK_BUTTONS | WDF_NO_FOCUS, + WDF_NO_FOCUS, _nested_main_status_widgets, lengthof(_nested_main_status_widgets) ); diff --git a/src/terraform_gui.cpp b/src/terraform_gui.cpp index b89e17e716..15b6bf8cc1 100644 --- a/src/terraform_gui.cpp +++ b/src/terraform_gui.cpp @@ -344,7 +344,7 @@ static const NWidgetPart _nested_terraform_widgets[] = { static const WindowDesc _terraform_desc( WDP_MANUAL, 0, 0, WC_SCEN_LAND_GEN, WC_NONE, - WDF_UNCLICK_BUTTONS | WDF_CONSTRUCTION, + WDF_CONSTRUCTION, _nested_terraform_widgets, lengthof(_nested_terraform_widgets) ); diff --git a/src/textfile_gui.cpp b/src/textfile_gui.cpp index 43e5f865c2..91adc12393 100644 --- a/src/textfile_gui.cpp +++ b/src/textfile_gui.cpp @@ -45,7 +45,7 @@ static const NWidgetPart _nested_textfile_widgets[] = { static const WindowDesc _textfile_desc( WDP_CENTER, 630, 460, WC_TEXTFILE, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_textfile_widgets, lengthof(_nested_textfile_widgets) ); diff --git a/src/timetable_gui.cpp b/src/timetable_gui.cpp index 41c61d3477..de13525892 100644 --- a/src/timetable_gui.cpp +++ b/src/timetable_gui.cpp @@ -692,7 +692,7 @@ static const NWidgetPart _nested_timetable_widgets[] = { static const WindowDesc _timetable_desc( WDP_AUTO, 400, 130, WC_VEHICLE_TIMETABLE, WC_VEHICLE_VIEW, - WDF_UNCLICK_BUTTONS | WDF_CONSTRUCTION, + WDF_CONSTRUCTION, _nested_timetable_widgets, lengthof(_nested_timetable_widgets) ); diff --git a/src/toolbar_gui.cpp b/src/toolbar_gui.cpp index 31613f2e98..a7548834de 100644 --- a/src/toolbar_gui.cpp +++ b/src/toolbar_gui.cpp @@ -2078,7 +2078,7 @@ static const NWidgetPart _nested_toolb_scen_widgets[] = { static WindowDesc _toolb_scen_desc( WDP_MANUAL, 640, 22, WC_MAIN_TOOLBAR, WC_NONE, - WDF_UNCLICK_BUTTONS | WDF_NO_FOCUS, + WDF_NO_FOCUS, _nested_toolb_scen_widgets, lengthof(_nested_toolb_scen_widgets) ); diff --git a/src/town_gui.cpp b/src/town_gui.cpp index 5700ec2b70..031869c881 100644 --- a/src/town_gui.cpp +++ b/src/town_gui.cpp @@ -282,7 +282,7 @@ public: static const WindowDesc _town_authority_desc( WDP_AUTO, 317, 222, WC_TOWN_AUTHORITY, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_town_authority_widgets, lengthof(_nested_town_authority_widgets) ); @@ -552,7 +552,7 @@ static const NWidgetPart _nested_town_game_view_widgets[] = { static const WindowDesc _town_game_view_desc( WDP_AUTO, 260, TownViewWindow::WID_TV_HEIGHT_NORMAL, WC_TOWN_VIEW, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_town_game_view_widgets, lengthof(_nested_town_game_view_widgets) ); @@ -583,7 +583,7 @@ static const NWidgetPart _nested_town_editor_view_widgets[] = { static const WindowDesc _town_editor_view_desc( WDP_AUTO, 260, TownViewWindow::WID_TV_HEIGHT_NORMAL, WC_TOWN_VIEW, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_town_editor_view_widgets, lengthof(_nested_town_editor_view_widgets) ); @@ -888,7 +888,7 @@ GUITownList::SortFunction * const TownDirectoryWindow::sorter_funcs[] = { static const WindowDesc _town_directory_desc( WDP_AUTO, 208, 202, WC_TOWN_DIRECTORY, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_town_directory_widgets, lengthof(_nested_town_directory_widgets) ); @@ -1147,7 +1147,7 @@ public: static const WindowDesc _found_town_desc( WDP_AUTO, 160, 162, WC_FOUND_TOWN, WC_NONE, - WDF_UNCLICK_BUTTONS | WDF_CONSTRUCTION, + WDF_CONSTRUCTION, _nested_found_town_widgets, lengthof(_nested_found_town_widgets) ); diff --git a/src/tree_gui.cpp b/src/tree_gui.cpp index fbc4d5baa8..1991559c2b 100644 --- a/src/tree_gui.cpp +++ b/src/tree_gui.cpp @@ -241,7 +241,7 @@ static const NWidgetPart _nested_build_trees_widgets[] = { static const WindowDesc _build_trees_desc( WDP_AUTO, 0, 0, WC_BUILD_TREES, WC_NONE, - WDF_UNCLICK_BUTTONS | WDF_CONSTRUCTION, + WDF_CONSTRUCTION, _nested_build_trees_widgets, lengthof(_nested_build_trees_widgets) ); diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp index b2dff7c2f4..d939375866 100644 --- a/src/vehicle_gui.cpp +++ b/src/vehicle_gui.cpp @@ -917,7 +917,7 @@ static const NWidgetPart _nested_vehicle_refit_widgets[] = { static const WindowDesc _vehicle_refit_desc( WDP_AUTO, 240, 174, WC_VEHICLE_REFIT, WC_VEHICLE_VIEW, - WDF_UNCLICK_BUTTONS | WDF_CONSTRUCTION, + WDF_CONSTRUCTION, _nested_vehicle_refit_widgets, lengthof(_nested_vehicle_refit_widgets) ); @@ -1614,7 +1614,7 @@ public: static WindowDesc _vehicle_list_desc( WDP_AUTO, 260, 246, WC_INVALID, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_vehicle_list, lengthof(_nested_vehicle_list) ); @@ -2073,7 +2073,7 @@ struct VehicleDetailsWindow : Window { static const WindowDesc _train_vehicle_details_desc( WDP_AUTO, 405, 178, WC_VEHICLE_DETAILS, WC_VEHICLE_VIEW, - WDF_UNCLICK_BUTTONS, + 0, _nested_train_vehicle_details_widgets, lengthof(_nested_train_vehicle_details_widgets) ); @@ -2081,7 +2081,7 @@ static const WindowDesc _train_vehicle_details_desc( static const WindowDesc _nontrain_vehicle_details_desc( WDP_AUTO, 405, 113, WC_VEHICLE_DETAILS, WC_VEHICLE_VIEW, - WDF_UNCLICK_BUTTONS, + 0, _nested_nontrain_vehicle_details_widgets, lengthof(_nested_nontrain_vehicle_details_widgets) ); @@ -2140,7 +2140,7 @@ static const NWidgetPart _nested_vehicle_view_widgets[] = { static const WindowDesc _vehicle_view_desc( WDP_AUTO, 250, 116, WC_VEHICLE_VIEW, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_vehicle_view_widgets, lengthof(_nested_vehicle_view_widgets) ); @@ -2151,7 +2151,7 @@ static const WindowDesc _vehicle_view_desc( static const WindowDesc _train_view_desc( WDP_AUTO, 250, 134, WC_VEHICLE_VIEW, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_vehicle_view_widgets, lengthof(_nested_vehicle_view_widgets) ); diff --git a/src/viewport_gui.cpp b/src/viewport_gui.cpp index a9fdc05198..661ee05575 100644 --- a/src/viewport_gui.cpp +++ b/src/viewport_gui.cpp @@ -156,7 +156,7 @@ public: static const WindowDesc _extra_view_port_desc( WDP_AUTO, 300, 268, WC_EXTRA_VIEW_PORT, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_extra_view_port_widgets, lengthof(_nested_extra_view_port_widgets) ); diff --git a/src/waypoint_gui.cpp b/src/waypoint_gui.cpp index 202f7c7f69..cd50a9ca8f 100644 --- a/src/waypoint_gui.cpp +++ b/src/waypoint_gui.cpp @@ -173,7 +173,7 @@ static const NWidgetPart _nested_waypoint_view_widgets[] = { static const WindowDesc _waypoint_view_desc( WDP_AUTO, 260, 118, WC_WAYPOINT_VIEW, WC_NONE, - WDF_UNCLICK_BUTTONS, + 0, _nested_waypoint_view_widgets, lengthof(_nested_waypoint_view_widgets) ); diff --git a/src/window.cpp b/src/window.cpp index 072d4b5a4f..26e93dfa1c 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -1628,7 +1628,7 @@ static void DecreaseWindowCounters() CLRBITS(w->flags, WF_TIMEOUT); w->OnTimeout(); - if (w->desc_flags & WDF_UNCLICK_BUTTONS) w->RaiseButtons(true); + w->RaiseButtons(true); } } } diff --git a/src/window_gui.h b/src/window_gui.h index 1f1b87a3f8..268f39132b 100644 --- a/src/window_gui.h +++ b/src/window_gui.h @@ -185,9 +185,8 @@ struct WindowDesc : ZeroedMemoryAllocator { */ enum WindowDefaultFlag { WDF_CONSTRUCTION = 1 << 0, ///< This window is used for construction; close it whenever changing company. - WDF_UNCLICK_BUTTONS = 1 << 1, ///< Unclick buttons when the window event times out - WDF_MODAL = 1 << 2, ///< The window is a modal child of some other window, meaning the parent is 'inactive' - WDF_NO_FOCUS = 1 << 3, ///< This window won't get focus/make any other window lose focus when click + WDF_MODAL = 1 << 1, ///< The window is a modal child of some other window, meaning the parent is 'inactive' + WDF_NO_FOCUS = 1 << 2, ///< This window won't get focus/make any other window lose focus when click }; /**