If you assign any number of buttons to a common ButtonGroup
, they will effectively become radio
style buttons, allowing only 1 to be pressed at a time. For example, if you create 3 Buttons and set their toggle_mode
to true
. Then, do something like:
func _ready():
var grp = ButtonGroup.new()
$Button.group = grp
$Button2.group = grp
$Button3.group = grp
That should get you close to the behavior you want (note, you can also use CheckButton
in place of the above Buttons
).