IconMenuBaseDelegate
- class omni.kit.menu.utils.scripts.app_menu.IconMenuBaseDelegate(**kwargs)
Bases:
MenuDelegate
Icon Menu Delegate class.
Methods
__init__
(self, **kwargs)Constructor.
build_item
(item)Build menu omni.ui for item, only uiMenu or uiMenuItem are handled by this function, anything else is handled by the ui.MenuDelegate base-class.
Get current style
load_settings
(extension)Loads settings from /exts/{extension}/* which control how menus are built.
Attributes
- __init__(self: omni.ui._ui.MenuDelegate, **kwargs) → None
Constructor.
- `kwargsdict`
See below
### Keyword Arguments:
- `on_build_item`
Called to create a new item.
- `on_build_title`
Called to create a new title.
- `on_build_status`
Called to create a new widget on the bottom of the window.
- `propagate`
Determine if Menu children should use this delegate when they don’t have the own one.
- build_item(item: Widget)
Build menu omni.ui for item, only uiMenu or uiMenuItem are handled by this function, anything else is handled by the ui.MenuDelegate base-class. Can be overridden on subclass along with _build_item_header, _build_item_tick, _build_item_glyph, _build_item_label, _build_item_hotkey, _build_item_subdir.
- get_style()
Get current style
- load_settings(extension)
Loads settings from /exts/{extension}/* which control how menus are built. Values read are; icon_size (float), text_size (float), tick_size (float), tick_spacing ([float, float]), margin_size ([float, float]), root_spacing (float), submenu_pre_spacing (float), submenu_spacing (float), submenu_icon_size (float), item_spacing ([float, float]), icon_spacing ([float, float]), hotkey_spacing ([float, float]), color_label_enabled (int), color_label_disabled (int), color_tick_enabled (int), color_tick_disabled (int), color_separator (int),