1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-29 09:44:52 +01:00

Remove rct_window::enabled_widgets (#16643)

`enabled_widgets` was used to enable input for widgets. However I do not recall anywhere this being used to specifically disable a widget which doesn't use the dedicated `disabled_widgets` flag. I don't think there is any purpose in keeping this, so I have removed all uses of it.
This commit is contained in:
Ted John
2022-02-13 23:06:19 +00:00
committed by GitHub
parent 09897ede9e
commit da89a4e413
73 changed files with 15 additions and 1021 deletions

View File

@@ -176,27 +176,6 @@ static rct_window_event_list *window_editor_objective_options_page_events[] = {
#pragma region Enabled widgets
static uint64_t window_editor_objective_options_page_enabled_widgets[] = {
(1ULL << WIDX_CLOSE) |
(1ULL << WIDX_TAB_1) |
(1ULL << WIDX_TAB_2) |
(1ULL << WIDX_OBJECTIVE) |
(1ULL << WIDX_OBJECTIVE_DROPDOWN) |
(1ULL << WIDX_OBJECTIVE_ARG_1_INCREASE) |
(1ULL << WIDX_OBJECTIVE_ARG_1_DECREASE) |
(1ULL << WIDX_OBJECTIVE_ARG_2_INCREASE) |
(1ULL << WIDX_OBJECTIVE_ARG_2_DECREASE) |
(1ULL << WIDX_PARK_NAME) |
(1ULL << WIDX_SCENARIO_NAME) |
(1ULL << WIDX_CATEGORY) |
(1ULL << WIDX_CATEGORY_DROPDOWN) |
(1ULL << WIDX_DETAILS),
(1ULL << WIDX_CLOSE) |
(1ULL << WIDX_TAB_1) |
(1ULL << WIDX_TAB_2),
};
static uint64_t window_editor_objective_options_page_hold_down_widgets[] = {
(1ULL << WIDX_OBJECTIVE_ARG_1_INCREASE) |
(1ULL << WIDX_OBJECTIVE_ARG_1_DECREASE) |
@@ -225,7 +204,6 @@ rct_window* WindowEditorObjectiveOptionsOpen()
w = WindowCreateCentred(450, 228, &window_objective_options_main_events, WC_EDITOR_OBJECTIVE_OPTIONS, WF_10);
w->widgets = window_editor_objective_options_main_widgets;
w->enabled_widgets = window_editor_objective_options_page_enabled_widgets[WINDOW_EDITOR_OBJECTIVE_OPTIONS_PAGE_MAIN];
w->pressed_widgets = 0;
w->hold_down_widgets = window_editor_objective_options_page_hold_down_widgets[WINDOW_EDITOR_OBJECTIVE_OPTIONS_PAGE_MAIN];
WindowInitScrollWidgets(w);
@@ -296,7 +274,6 @@ static void WindowEditorObjectiveOptionsSetPage(rct_window* w, int32_t page)
w->var_492 = 0;
w->no_list_items = 0;
w->selected_list_item = -1;
w->enabled_widgets = window_editor_objective_options_page_enabled_widgets[page];
w->hold_down_widgets = window_editor_objective_options_page_hold_down_widgets[page];
w->event_handlers = window_editor_objective_options_page_events[page];
w->widgets = window_editor_objective_options_widgets[page];