1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-27 16:54:52 +01:00

Update dropdown item fields and functions to new code style

This commit is contained in:
Gymnasiast
2025-08-21 21:33:22 +02:00
parent 1c6e23bd46
commit 8fd9658cd3
29 changed files with 317 additions and 320 deletions

View File

@@ -649,12 +649,12 @@ namespace OpenRCT2::Ui::Windows
const auto numItems = std::min<size_t>(items.size(), Dropdown::kItemsMaxSize);
for (size_t i = 0; i < numItems; i++)
{
gDropdownItems[i].Format = STR_OPTIONS_DROPDOWN_ITEM;
gDropdownItems[i].format = STR_OPTIONS_DROPDOWN_ITEM;
if (selectedIndex == static_cast<int32_t>(i))
gDropdownItems[i].Format = STR_OPTIONS_DROPDOWN_ITEM_SELECTED;
gDropdownItems[i].format = STR_OPTIONS_DROPDOWN_ITEM_SELECTED;
auto sz = items[i].c_str();
std::memcpy(&gDropdownItems[i].Args, &sz, sizeof(const char*));
std::memcpy(&gDropdownItems[i].args, &sz, sizeof(const char*));
}
WindowDropdownShowTextCustomWidth(
{ windowPos.x + widget->left, windowPos.y + widget->top }, widget->height() + 1,