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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user