Skip to content

Instantly share code, notes, and snippets.

@WolfgangSenff
Last active September 3, 2025 16:34
Show Gist options
  • Save WolfgangSenff/3c35eb80a450aee983c9e7277f7ee6ad to your computer and use it in GitHub Desktop.
Save WolfgangSenff/3c35eb80a450aee983c9e7277f7ee6ad to your computer and use it in GitHub Desktop.
button_group_container.gd
extends Container # Can make this extend any type you want, and give it an appropriate name accordingly
class_name ButtonGroupContainer
var _group = ButtonGroup.new()
func _ready() -> void:
for child in get_children():
if child is BaseButton:
child.toggle_mode = true
child.button_group = _group
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment