an
bool is_enabled();
method on the menu items would be useful to allow items to be turned on/off based on other state information in the player or component.
Can you add a separator programmatically from the menu_item interface?
ie. from
virtual const char * enum_item(int n)
Already implemented as the return value for get_display_data().
Already implemented as the return value for get_display_data().
Sorry, I don't see how I use that to disable (MF_GRAYED style) one of my menu items.
For is_checked() I get a chance for each item in my menu instance to set or not set the check mark. I'd like the same thing for enabling or disabling the item.
Sorry, I don't see how I use that to disable (MF_GRAYED style) one of my menu items.
Maybe you can override
virtual enabled_state get_enabled_state(int idx)
and return
MENU_DEFAULT_OFF when you don't want to display a specific menu item (but yes I know - that's not MF_GRAYED).
~ Florian
Sorry, I don't see how I use that to disable (MF_GRAYED style) one of my menu items.
Maybe you can override virtual enabled_state get_enabled_state(int idx)
and return MENU_DEFAULT_OFF when you don't want to display a specific menu item (but yes I know - that's not MF_GRAYED).
~ Florian
Damn, I totally overlooked that as I was looking down in the derived object's interface.
Thanks.
So, the last question remains,
Is there a way to add separators in
virtual const char * enum_item(int n)
{
return NULL;
}