1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-29 01:35:06 +01:00

Create dropdown item flags

This commit is contained in:
Gymnasiast
2022-02-13 00:08:06 +01:00
parent 723867e0a0
commit 4abbfcb32b
2 changed files with 41 additions and 14 deletions

View File

@@ -59,15 +59,32 @@ uint32_t DropdownGetAppropriateImageDropdownItemsPerRow(uint32_t numItems);
namespace Dropdown
{
enum class ItemFlag : uint8_t
{
IsDisabled = (1 << 0),
IsChecked = (1 << 1),
};
struct Item
{
rct_string_id Format;
int64_t Args;
uint8_t Flags;
constexpr bool IsSeparator() const
{
return Format == SeparatorString;
}
constexpr bool IsDisabled() const
{
return (Flags & EnumValue(ItemFlag::IsDisabled));
}
constexpr bool IsChecked() const
{
return (Flags & EnumValue(ItemFlag::IsChecked));
}
};
struct ItemExt