diff options
author | frosch <frosch@openttd.org> | 2012-11-11 16:10:43 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2012-11-11 16:10:43 +0000 |
commit | 03736af2aee50db4e36c2cd9127085630f82cd4b (patch) | |
tree | 417a584e588daf08f7a9a4f00a5883c48d6fae8d | |
parent | cd5525386519d878aade98c6708500f170c30e31 (diff) | |
download | openttd-03736af2aee50db4e36c2cd9127085630f82cd4b.tar.xz |
(svn r24700) -Cleanup: Remove WDF_UNCLICK_BUTTONS and make it the default.
41 files changed, 88 insertions, 89 deletions
diff --git a/src/ai/ai_gui.cpp b/src/ai/ai_gui.cpp index 20af1f295..0c1a342a6 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 630c32cf5..7b55c09d9 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 a54b454b5..6477797ed 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 a9459f967..89b743070 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 4921dfe44..6415493b3 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 40e153de8..18901c5da 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 1aa5f7bec..ae6f394e9 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 83d1b05dd..3162a4ef9 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 290080fc9..758c5f5af 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 5266d6fc3..566329e7e 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 db9f9c712..08dd60064 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 5c6902511..0d87bba00 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 a8aca15ad..bbb6e9d0e 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 49c0afcfa..26d84d236 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 ad87e09df..ee9782908 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 5ad6394b3..630b75013 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 ce952d466..72ed9f907 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 ca1cfdab6..d85307206 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 27093da66..0209f0f4f 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 c807b1bda..244d2c090 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 5b9927b9d..114895534 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 7efa2b212..f01ba40ee 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 b1ad635ff..f50ef73ed 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 9724a6c46..19214af1f 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 def4ec9e8..73d1a2684 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 ecb647893..a51b7cb51 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 6f23f81b9..113a45736 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 ddceba2bb..2bd442295 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 48def98f3..cb2207af3 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 119c928be..4a014d261 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 b89e17e71..15b6bf8cc 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 43e5f865c..91adc1239 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 41c61d347..de1352589 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 31613f2e9..a7548834d 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 5700ec2b7..031869c88 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 fbc4d5baa..1991559c2 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 b2dff7c2f..d93937586 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 a9fdc0519..661ee0557 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 202f7c7f6..cd50a9ca8 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 072d4b5a4..26e93dfa1 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 1f1b87a3f..268f39132 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 }; /** |