ButtonGroup
Inherits: Resource < RefCounted < Object
Description
Section titled “Description”A group of buttons that doesn’t allow more than one button to be pressed at a time.
A group of BaseButton-derived buttons. The buttons in a ButtonGroup are treated like radio buttons: No more than one button can be pressed at a time. Some types of buttons (such as CheckBox) may have a special appearance in this state.
Every member of a ButtonGroup should have BaseButton.toggle_mode set to true.
Properties
Section titled “Properties”| Type | Name | Default |
|---|---|---|
| bool | allow_unpress |
false |
| bool | resource_local_to_scene |
true (overrides Resource) |
Methods
Section titled “Methods”| Returns | Method |
|---|---|
| Array[BaseButton] | get_buttons() |
| BaseButton | get_pressed_button() |
Signals
Section titled “Signals”pressed
pressed(button: BaseButton)
Emitted when one of the buttons of the group is pressed.
Property descriptions
Section titled “Property descriptions”allow_unpress
bool allow_unpress = false
If true, it is possible to unpress all buttons in this ButtonGroup.
Method descriptions
Section titled “Method descriptions”get_buttons
Array[BaseButton] get_buttons()
Returns an Array of Buttons who have this as their ButtonGroup (see BaseButton.button_group).
get_pressed_button
BaseButton get_pressed_button()
Returns the current pressed button.
