mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-20 14:23:08 +01:00
Add 'const utf8*' to the args type union
This commit is contained in:
@@ -12,6 +12,7 @@
|
|||||||
#include <array>
|
#include <array>
|
||||||
#include <openrct2-ui/UiStringIds.h>
|
#include <openrct2-ui/UiStringIds.h>
|
||||||
#include <openrct2/core/EnumUtils.hpp>
|
#include <openrct2/core/EnumUtils.hpp>
|
||||||
|
#include <openrct2/core/StringTypes.h>
|
||||||
#include <openrct2/interface/Window.h>
|
#include <openrct2/interface/Window.h>
|
||||||
#include <span>
|
#include <span>
|
||||||
|
|
||||||
@@ -84,6 +85,7 @@ namespace OpenRCT2::Dropdown
|
|||||||
union
|
union
|
||||||
{
|
{
|
||||||
int64_t generic;
|
int64_t generic;
|
||||||
|
const utf8* string;
|
||||||
ImageId image;
|
ImageId image;
|
||||||
} args{};
|
} args{};
|
||||||
ItemFlags flags{};
|
ItemFlags flags{};
|
||||||
|
|||||||
@@ -627,11 +627,11 @@ namespace OpenRCT2::Dropdown
|
|||||||
{
|
{
|
||||||
Item MenuLabel(const utf8* string)
|
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)
|
Item PlainMenuLabel(const utf8* string)
|
||||||
{
|
{
|
||||||
return Item{ STR_STRING, reinterpret_cast<int64_t>(string) };
|
return Item{ STR_STRING, { .string = string } };
|
||||||
}
|
}
|
||||||
} // namespace OpenRCT2::Dropdown
|
} // namespace OpenRCT2::Dropdown
|
||||||
|
|||||||
Reference in New Issue
Block a user