(svn r24700) -Cleanup: Remove WDF_UNCLICK_BUTTONS and make it the default.

pull/155/head
frosch 12 years ago
parent d4bb40383e
commit 3b06409153

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -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);
}
}
}

@ -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
};
/**

Loading…
Cancel
Save