Closed Elius94 closed 1 year ago
Control
Kind: global class Extends: Control
This class is an overload of Control that is used to create a button.
Emits the following events:
string
The id of the button.
The text of the button.
number
The width of the button.
The height of the button.
The x position of the button.
The y position of the button.
ButtonStyle
To set the style of the button.
boolean
If the button is visible. Default is true (make it hide using hide()).
If the button is enabled. Default is true (make it disabled using disable()).
function
The function to call when the button is clicked.
The function to call when the button is released.
Example
new Button("btnRun", "Run me!", 10, 3, 21, 18, { color: "magentaBright", bold: true, italic: true, borderColor: "green" }, () => { GUI.log("Button clicked!") })
Button ⇐
Control
Kind: global class
Extends:
Control
new Button(id, text, width, height, x, y, style, visible, enabled, onClick, onRelease)
This class is an overload of Control that is used to create a button.
Emits the following events:
string
The id of the button.
string
The text of the button.
number
The width of the button.
number
The height of the button.
number
The x position of the button.
number
The y position of the button.
ButtonStyle
To set the style of the button.
boolean
If the button is visible. Default is true (make it hide using hide()).
boolean
If the button is enabled. Default is true (make it disabled using disable()).
function
The function to call when the button is clicked.
function
The function to call when the button is released.
Example