IconMenuBaseDelegate

class omni.kit.menu.core.scripts.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.

build_title(self, item)

This method must be reimplemented to generate custom title.

get_style()

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.

build_title(self: omni.ui._ui.MenuDelegate, item: omni::ui::MenuHelper) None

This method must be reimplemented to generate custom title.

get_style()

Get current style

load_settings(extension)

Loads settings from /exts/{extension}/* which control how menus are built. Values read are; background_color (int), background_selected_color (int), icon_size (float), text_size (float), tick_size (float), separator_size ([float, float]), tick_spacing ([float, float]), margin_size ([float, float]), margin_size_posttick ([float, float]), post_label_spaces (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), menu_title_text_color (int), menu_title_color (int), menu_title_line_color (int), menu_title_text_height = float menu_title_text_spacer = [float, float], menu_title_close_icon_size (float), menu_title_close_color (int), show_menu_titles (bool), indent_all_ticks (bool),