pyux.set_on_left_click_handler - pytha-3d-cad/pytha-lua-api GitHub Wiki

Sets the on_left_click handler for mouse clicks in the graphics area.

pyui.set_on_left_click_handler(function)

Parameters

Type Description
function function A lua function that is invoked for every mouse click. nil will remove the handler.

Callback

The parameters to the handler function are as follows:

function on_click_handler(info)
Type Description
info {...} A table containing the following key-value pairs:
info.coos_vp {u, v} Normalized viewport coordinates of the mouse cursor. Can be nil.
info.ctrl_key boolean Status of the virtual CTRL key.
info.shift_key boolean Status of the virtual SHIFT key.
info.alt_key boolean Status of the virtual ALT key.

Note:

This handler is specific to the current modal environment / dialog and can only be set within a dialog.

Version requirements

This function is available in V26 and above.

See also

Control Gallery, set_on_right_click_handler, set_on_left_dragstart_handler, set_on_left_dragmove_handler, set_on_left_dragend_handler, show_cursor_crosshair