mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-19 13:03:11 +01:00
Introduce widget::width and widget::height helper functions (#12053)
This commit is contained in:
@@ -486,9 +486,8 @@ static void window_editor_objective_options_show_objective_dropdown(rct_window*
|
||||
numItems++;
|
||||
|
||||
window_dropdown_show_text_custom_width(
|
||||
{ w->windowPos.x + dropdownWidget->left, w->windowPos.y + dropdownWidget->top },
|
||||
dropdownWidget->bottom - dropdownWidget->top + 1, w->colours[1], 0, DROPDOWN_FLAG_STAY_OPEN, numItems,
|
||||
dropdownWidget->right - dropdownWidget->left - 3);
|
||||
{ w->windowPos.x + dropdownWidget->left, w->windowPos.y + dropdownWidget->top }, dropdownWidget->height() + 1,
|
||||
w->colours[1], 0, DROPDOWN_FLAG_STAY_OPEN, numItems, dropdownWidget->width() - 3);
|
||||
|
||||
objectiveType = gScenarioObjectiveType;
|
||||
for (int32_t j = 0; j < numItems; j++)
|
||||
@@ -514,9 +513,8 @@ static void window_editor_objective_options_show_category_dropdown(rct_window* w
|
||||
gDropdownItemsArgs[i] = ScenarioCategoryStringIds[i];
|
||||
}
|
||||
window_dropdown_show_text_custom_width(
|
||||
{ w->windowPos.x + dropdownWidget->left, w->windowPos.y + dropdownWidget->top },
|
||||
dropdownWidget->bottom - dropdownWidget->top + 1, w->colours[1], 0, DROPDOWN_FLAG_STAY_OPEN, 5,
|
||||
dropdownWidget->right - dropdownWidget->left - 3);
|
||||
{ w->windowPos.x + dropdownWidget->left, w->windowPos.y + dropdownWidget->top }, dropdownWidget->height() + 1,
|
||||
w->colours[1], 0, DROPDOWN_FLAG_STAY_OPEN, 5, dropdownWidget->width() - 3);
|
||||
dropdown_set_checked(gS6Info.category, true);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user