Clickable button. More...
Public Member Functions | |
Button (var x, var y, var width, var height, var text) | |
Create a button. | |
render () | |
Draw the button. | |
Public Attributes | |
var | x |
Coordinate X. | |
var | y |
Coordinate Y. | |
var | width |
Width of the button. | |
var | height |
Height of the button. | |
var | text |
Text in the button. | |
var | enabled |
Defines if button is interactable. | |
Clickable button.
This is just a clickable button.
GameEngine.GUI.Button.Button | ( | var | x, |
var | y, | ||
var | width, | ||
var | height, | ||
var | text | ||
) |
Create a button.
Create a button that can be rendered on the canvas.
x | The X coordinate of button on canvas. |
y | The Y coordinate of button on canvas. |
width | The width of the button in pixels. |
height | The height of the button in pixels. |
text | The text inside the button. |
GameEngine.GUI.Button.render | ( | ) |
Draw the button.
The button gets drawn on the canvas (automatically manages mouse events).
var GameEngine.GUI.Button.enabled |
Defines if button is interactable.
If enabled the button can be clicked, else it won't respond to input.
var GameEngine.GUI.Button.height |
Height of the button.
Height of the button in pixels.
var GameEngine.GUI.Button.text |
Text in the button.
The text that the button contains.
var GameEngine.GUI.Button.width |
Width of the button.
Width of the button in pixels.
var GameEngine.GUI.Button.x |
Coordinate X.
The X coordinate on the canvas of the button (from left).
var GameEngine.GUI.Button.y |
Coordinate Y.
The Y coordinate on the canvas of the button (from top).