-
Notifications
You must be signed in to change notification settings - Fork 0
EmuCheckbox
Dragonite edited this page Dec 29, 2020
·
1 revision
A class representing a checkbox which stores a true / false value.
Inheritance: EmuCore / EmuCallback
EmuCheckbox(x, y, w, h, text, value, callback)
Parameter | Type | Description |
---|---|---|
x | real | The x coordinate where the checkbox will be created |
y | real | The y coordinate where the checkbox will be created |
w | real | The width of the checkbox |
h | real | The height of the checkbox |
text | string | The text label shown on the checkbox |
value | boolean | The initial value of the checkbox |
callback | function | The callback that will be invoked when the checkbox is toggled |
var checkbox = new EmuCheckbox(32, 32, 256, 32, "Toggle", false, function() {
show_debug_message("The state of the checkbox is " + (value ? "on" : "off"));
});
container.AddContent(checkbox);
This will create an EmuCheckbox which will be added to a previously-created container.