Basics
Guides
API Reference
Basics
Guides
API Reference
[13:7] extends: Button
Wraps FXGL's FXGLButton, a JavaFX Button subclass that adds the "fxgl-button" style class so it picks up FXGL theme styling. The full JavaFX Button API is reachable through .obj.
FXGLButton (string Text = "")
Creates a new FXGLButton with the given label text.
Text is the button label.getText ()
Returns the button text.
A string.setText (string Text)
Sets the button text.
Text is the new label.this objectonClick (callback Cb)
Registers a callback to run when the button is clicked.
Cb is a callback that takes the ActionEvent string.this object
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.