Button
This User Interface Component Add more interaction between your game and your user
Component Author: Jabo Release Date: April 15, 2020
new Button(Scene parentScene, String text, Vector2 position, Vector2 scale);getTransform(); // Returns Transform Object
setColor(Color backgroundColor, Color foregroundColor, Color hoverColor);
setFont(Font font); // Sets the text font
setText(String text); // Sets the text of the button
setBackgroundImage(Sprite spr);
onClick(); // Returns true if the user clicked the button
onHover(); // Returns true if the user is hovering on the buttonLast updated
Was this helpful?