feat: add support for state values in palettes
This commit is contained in:
parent
2783120aef
commit
3901d0cce5
1 changed files with 3 additions and 0 deletions
|
@ -40,8 +40,11 @@ pub fn Create(options: type) type {
|
||||||
view_pos: usize = 0,
|
view_pos: usize = 0,
|
||||||
total_items: usize = 0,
|
total_items: usize = 0,
|
||||||
|
|
||||||
|
value: ValueType = if (@hasDecl(options, "defaultValue")) options.defaultValue else {},
|
||||||
|
|
||||||
const Entry = options.Entry;
|
const Entry = options.Entry;
|
||||||
const Self = @This();
|
const Self = @This();
|
||||||
|
const ValueType = if (@hasDecl(options, "ValueType")) options.ValueType else void;
|
||||||
|
|
||||||
pub const MenuState = Menu.State(*Self);
|
pub const MenuState = Menu.State(*Self);
|
||||||
pub const ButtonState = Button.State(*Menu.State(*Self));
|
pub const ButtonState = Button.State(*Menu.State(*Self));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue