1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 11:33:03 +01:00

fix empty dropdowns

This commit is contained in:
wolfreak99
2017-07-24 18:49:02 -04:00
committed by Michael Steenbeek
parent 424f2fcef5
commit 150cc90f89

View File

@@ -167,6 +167,7 @@ void window_dropdown_show_text_custom_width(sint32 x, sint32 y, sint32 extray, u
_dropdown_item_height = (flags & DROPDOWN_FLAG_CUSTOM_HEIGHT) ? custom_height : 10;
gDropdownNumItems = (sint32)num_items;
_dropdown_num_columns = (gDropdownNumItems + DROPDOWN_TEXT_MAX_ROWS - 1) / DROPDOWN_TEXT_MAX_ROWS;
_dropdown_num_columns = max(1, _dropdown_num_columns);
_dropdown_num_rows = (gDropdownNumItems + _dropdown_num_columns - 1) / _dropdown_num_columns;
// Text dropdowns are listed horizontally