Camera.allowdrop readwrite

widget only

This property 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.
Get or set the Camera widget's ability to be used as the target of a drag-and-drop operation. When set to true, the Camera:onDrop() event will be fired when content is dropped on the widget.

Example

--! luart-extensions import ui, capture local win = ui.Window("Camera.allowdrop sample", "fixed", 640, 520) local cam = ui.Camera(win, 10, 10, 620, 460) cam.allowdrop = true function cam:onDrop(kind, content) ui.info("Dropped: "..kind) end await win:showasync()