MenuHelper#
- class omni.ui.MenuHelper#
Bases:
pybind11_object
The helper class for the menu that draws the menu line.
Methods
__init__
(*args, **kwargs)call_triggered_fn
(self)Sets the function that is called when an action is activated by the user; for example, when the user clicks a menu option, or presses an action's shortcut key combination.
has_triggered_fn
(self)Sets the function that is called when an action is activated by the user; for example, when the user clicks a menu option, or presses an action's shortcut key combination.
set_triggered_fn
(self, fn)Sets the function that is called when an action is activated by the user; for example, when the user clicks a menu option, or presses an action's shortcut key combination.
Attributes
This property holds whether this menu item is checkable.
delegate
Hide or keep the window when the user clicked this item.
This property holds the menu's hotkey text.
menu_compatibility
This property holds the menu's text.
- __init__(*args, **kwargs)#
- call_triggered_fn(self: omni.ui._ui.MenuHelper) → None#
Sets the function that is called when an action is activated by the user; for example, when the user clicks a menu option, or presses an action’s shortcut key combination.
- has_triggered_fn(self: omni.ui._ui.MenuHelper) → bool#
Sets the function that is called when an action is activated by the user; for example, when the user clicks a menu option, or presses an action’s shortcut key combination.
- set_triggered_fn(
- self: omni.ui._ui.MenuHelper,
- fn: Callable[[], None],
Sets the function that is called when an action is activated by the user; for example, when the user clicks a menu option, or presses an action’s shortcut key combination.
- property checkable#
This property holds whether this menu item is checkable. A checkable item is one which has an on/off state.
- property hide_on_click#
Hide or keep the window when the user clicked this item.
- property hotkey_text#
This property holds the menu’s hotkey text.
- property text#
This property holds the menu’s text.