Currently, dynamic lists of menu items are only possible in a very restricted way: it is not possible to arbitrarily mix and match navigation and selection items.
Unfortunately, we can't make the menu items object-safe because:
What we can do instead is to wrap menu items in an enum. We only need this to support "polymorphism" in add_items, and there are two key questions to consider:
- ergonomics
- support user-defined menu items (i.e. easily define a wrapper enum around N specific menu item impls)
Currently, dynamic lists of menu items are only possible in a very restricted way: it is not possible to arbitrarily mix and match navigation and selection items.
Unfortunately, we can't make the menu items object-safe because:
draw).What we can do instead is to wrap menu items in an enum. We only need this to support "polymorphism" in
add_items, and there are two key questions to consider: