HoverGesture#
- class omni.ui.scene.HoverGesture#
Bases:
ShapeGesture
The gesture that provides a way to capture event when mouse enters/leaves the item.
Methods
__init__
(self, **kwargs)Constructs an gesture to track when the user clicked the mouse.
call_on_began_fn
(self, arg0)Called when the mouse enters the item.
call_on_changed_fn
(self, arg0)Called when the mouse is hovering the item.
call_on_ended_fn
(self, arg0)Called when the mouse leaves the item.
has_on_began_fn
(self)Called when the mouse enters the item.
has_on_changed_fn
(self)Called when the mouse is hovering the item.
has_on_ended_fn
(self)Called when the mouse leaves the item.
set_on_began_fn
(self, fn, None])Called when the mouse enters the item.
set_on_changed_fn
(self, fn, None])Called when the mouse is hovering the item.
set_on_ended_fn
(self, fn, None])Called when the mouse leaves the item.
Attributes
The modifier that should be pressed to trigger this gesture.
The mouse button this gesture is watching.
- __init__(
- self: omni.ui_scene._scene.HoverGesture,
- **kwargs,
Constructs an gesture to track when the user clicked the mouse.
### Arguments:
- `onEnded :`
Function that is called when the user clicked the mouse button.
- `kwargsdict`
See below
### Keyword Arguments:
- `mouse_button`
The mouse button this gesture is watching.
- `modifiers`
The modifier that should be pressed to trigger this gesture.
- `on_began_fn`
Called if the callback is not set and the mouse enters the item.
- `on_changed_fn`
Called if the callback is not set and the mouse is hovering the item.
- `on_ended_fn`
Called if the callback is not set and the mouse leaves the item.
- `name`
The name of the object. It’s used for debugging.
- `manager`
The Manager that controld this gesture.
- call_on_began_fn(
- self: omni.ui_scene._scene.HoverGesture,
- arg0: omni::ui::scene::AbstractShape,
Called when the mouse enters the item.
- call_on_changed_fn(
- self: omni.ui_scene._scene.HoverGesture,
- arg0: omni::ui::scene::AbstractShape,
Called when the mouse is hovering the item.
- call_on_ended_fn(
- self: omni.ui_scene._scene.HoverGesture,
- arg0: omni::ui::scene::AbstractShape,
Called when the mouse leaves the item.
- has_on_began_fn( ) bool #
Called when the mouse enters the item.
- has_on_changed_fn( ) bool #
Called when the mouse is hovering the item.
- has_on_ended_fn( ) bool #
Called when the mouse leaves the item.
- set_on_began_fn(self: omni.ui_scene._scene.HoverGesture, fn: Callable[[omni::ui::scene::AbstractShape], None]) None #
Called when the mouse enters the item.
- set_on_changed_fn(self: omni.ui_scene._scene.HoverGesture, fn: Callable[[omni::ui::scene::AbstractShape], None]) None #
Called when the mouse is hovering the item.
- set_on_ended_fn(self: omni.ui_scene._scene.HoverGesture, fn: Callable[[omni::ui::scene::AbstractShape], None]) None #
Called when the mouse leaves the item.
- property modifiers#
The modifier that should be pressed to trigger this gesture.
- property mouse_button#
The mouse button this gesture is watching.