FixGUI Documentation
Back to summary
import "gui/view";
Button class
Button.
Inherits from View.
Initialization
static function create(label: String): Button
static function create(label: String, flags: Integer): Button
static function create(label: String, flags: Integer, action, data)
-
Creates a new button with given label. You can also optionally pass the flags
and a click action callback.
The flags are:
BTN_DEFAULT - makes the button a default one
Properties
function set_click_action(action, data)
-
Sets the click action callback. The given function takes just one parameter,
the provided data.
function get_label(): String
-
Returns the button label.
function set_label(text: String)
-
Sets the button label.
function is_enabled(): Boolean
-
Returns whether the button is enabled.
function set_enabled(enabled: Boolean)
-
Enables or disables the button.