mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-02-03 04:05:49 +01:00
Fix weather dropdown item padding in enlarged UI
This commit is contained in:
@@ -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<const utf8*>(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<int32_t>(numItems);
|
||||
if (gDropdown.numItems > 1)
|
||||
|
||||
Reference in New Issue
Block a user