diff --git a/src/openrct2-ui/windows/Dropdown.cpp b/src/openrct2-ui/windows/Dropdown.cpp index 4f08d386d7..f952f45740 100644 --- a/src/openrct2-ui/windows/Dropdown.cpp +++ b/src/openrct2-ui/windows/Dropdown.cpp @@ -64,6 +64,7 @@ namespace OpenRCT2::Ui::Windows int32_t NumRows; int32_t ItemWidth; int32_t ItemHeight; + int32_t ItemPadding; bool ListVertically; public: @@ -88,7 +89,7 @@ namespace OpenRCT2::Ui::Windows return Config::Get().interface.enlargedUi ? 6 : 0; } - static void drawTextItem( + void drawTextItem( RenderTarget& rt, ScreenCoordsXY screenCoords, int32_t width, const Dropdown::Item& item, bool highlighted, StringId format, Colour background) { @@ -98,7 +99,7 @@ namespace OpenRCT2::Ui::Windows if (item.isDisabled()) colour = { background, { ColourFlag::inset } }; - auto yOffset = GetAdditionalRowPadding(); + auto yOffset = ItemPadding; Formatter ft; ft.Add(item.text); @@ -212,6 +213,7 @@ namespace OpenRCT2::Ui::Windows { // Set and calculate num items, rows and columns ItemHeight = (txtFlags & Dropdown::Flag::CustomHeight) ? customItemHeight : GetDefaultRowHeight(); + ItemPadding = (txtFlags & Dropdown::Flag::CustomHeight) ? 0 : GetAdditionalRowPadding(); gDropdown.numItems = static_cast(numItems); if (gDropdown.numItems > 1)