Skip to content

luxe: ui/check.control


import "luxe: ui/check.control" for Data

no docs found

var state : Bool = false
var override : Object = Object
import "luxe: ui/check.control" for UICheck

UICheck is a Control that represents a boolean toggle.

var check = UICheck.create(ui)
UICheck.set_state(check, true)
Control.set_events(check) {|event|
if(event.type == UIEvent.change) {
Log.print("Check is toggled %(event.change ? "on" : "off")")
}
}

UICheck.create(ui_entity : Entity) : UICheck

Create a new check control.

UICheck.set_state(control : UICheck, state : Bool) : None

Set the current state of a check.

UICheck.get_state(control : UICheck) : Bool

Get whether a check is toggled on or off.