ClickGesture#

class omni.ui.scene.ClickGesture#

Bases: ShapeGesture

The gesture that provides a way to capture click mouse event.

Methods

__init__(self, _on_ended, None] = None, **kwargs)

Constructs an gesture to track when the user clicked the mouse.

call_on_ended_fn(self, arg0)

Called when the user releases the button.

has_on_ended_fn(self)

Called when the user releases the button.

set_on_ended_fn(self, fn, None])

Called when the user releases the button.

Attributes

modifiers

The modifier that should be pressed to trigger this gesture.

mouse_button

The mouse button this gesture is watching.

__init__(self: omni.ui_scene._scene.ClickGesture, _on_ended: Callable[[omni::ui::scene::AbstractShape], None] = None, **kwargs) None#

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_ended_fn`

Called when the user releases the button.

`name`

The name of the object. It’s used for debugging.

`manager`

The Manager that controld this gesture.

call_on_ended_fn(
self: omni.ui_scene._scene.ClickGesture,
arg0: omni::ui::scene::AbstractShape,
) None#

Called when the user releases the button.

has_on_ended_fn(
self: omni.ui_scene._scene.ClickGesture,
) bool#

Called when the user releases the button.

set_on_ended_fn(self: omni.ui_scene._scene.ClickGesture, fn: Callable[[omni::ui::scene::AbstractShape], None]) None#

Called when the user releases the button.

property modifiers#

The modifier that should be pressed to trigger this gesture.

property mouse_button#

The mouse button this gesture is watching.