Closed Elius94 closed 1 year ago
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.
ButtonKey
undefined
To set a key to press to click the button.
function
The function to call when the button is clicked.
The function to call when the button is released.
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()).
new Button(id, text, width, height, x, y, style, key, onClick, onRelease, visible, enabled)
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.
ButtonKey
|undefined
To set a key to press to click the button.
function
The function to call when the button is clicked.
function
The function to call when the button is released.
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()).