Camera:onMouseDown(button, x, y)event

widget only

This event is only available when the ui module is loaded before capture and Camera is used as a widget.
This event is fired when the user presses a mouse button while over the Camera widget.

Parameters

button

A string indicating which button was pressed: "left", "right", or "middle".

x

The horizontal position of the mouse in the Camera widget area (zero means the left border).

y

The vertical position of the mouse in the Camera widget area (zero means the top border).

Return value

The event returns no value.

Example

--! luart-extensions import ui, capture local win = ui.Window("Camera:onMouseDown() sample", "fixed", 640, 520) local cam = ui.Camera(win, 10, 10, 620, 460) function cam:onMouseDown(button, x, y) win:status(button.." button pressed at "..x..", "..y) end await win:showasync()