widget only
This event is only available when the
ui module is loaded before capture and Camera is used as a widget.Camera:onMouseUp(button, x, y)event
This event is fired when the user releases a mouse button while over the Camera widget.
Parameters
button
A string indicating which button was released: "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:onMouseUp() sample", "fixed", 640, 520)
local cam = ui.Camera(win, 10, 10, 620, 460)
function cam:onMouseUp(button, x, y)
win:status(button.." button released at "..x..", "..y)
end
await win:showasync()