Camera:tofront([widget])method

widget only

This method is only available when the ui module is loaded before capture and Camera is used as a widget. Accessing it in object mode will raise an error.
Brings the Camera widget in front of all other widgets, or in front of the specified widget.

Parameters

[widget]

An optional widget above which the Camera will be placed.

Return value

This method returns no value.

Example

--! luart-extensions import ui, capture local win = ui.Window("Camera:toback() sample", "fixed", 640, 520) local cam = ui.Camera(win, 10, 20, 620, 460) local lbl = ui.Label(win, capture.devices.video[1] or error("No Webcam detected")) cam:tofront() await win:showasync()