1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-10 09:32:29 +01:00

Add 'const utf8*' to the args type union

This commit is contained in:
Gymnasiast
2025-08-26 23:00:26 +02:00
parent 6a43719d49
commit fc832524c3
2 changed files with 4 additions and 2 deletions

View File

@@ -12,6 +12,7 @@
#include <array>
#include <openrct2-ui/UiStringIds.h>
#include <openrct2/core/EnumUtils.hpp>
#include <openrct2/core/StringTypes.h>
#include <openrct2/interface/Window.h>
#include <span>
@@ -84,6 +85,7 @@ namespace OpenRCT2::Dropdown
union
{
int64_t generic;
const utf8* string;
ImageId image;
} args{};
ItemFlags flags{};

View File

@@ -627,11 +627,11 @@ namespace OpenRCT2::Dropdown
{
Item MenuLabel(const utf8* string)
{
return Item{ STR_OPTIONS_DROPDOWN_ITEM, reinterpret_cast<int64_t>(string) };
return Item{ STR_OPTIONS_DROPDOWN_ITEM, { .string = string } };
}
Item PlainMenuLabel(const utf8* string)
{
return Item{ STR_STRING, reinterpret_cast<int64_t>(string) };
return Item{ STR_STRING, { .string = string } };
}
} // namespace OpenRCT2::Dropdown