Closed boruok closed 1 year ago
According to the documentation https://docs.godotengine.org/en/latest/classes/class_buttongroup.html
BaseButton.toggle_mode should be true.
So the intention of a ButtonGroup is to provide toggled buttons, of which only a single one can be pressed at the same time.
In your MRP toggle_mode
of the buttons is false
, so it seems like you are using ButtonGroup for a non-intended use-case.
To make your use-case work, you could change your _ready
-function to:
func _ready() -> void:
for c in get_children():
c.pressed.connect(_on_ButtonGroup_pressed.bind(c))
The description of ButtonGroup
doesn't seem to make its use-case very clear, I believe that the documentation could be improved.
sry, missed line where said BaseButton.toggle_mode should be true
Godot version
v4.0.beta8.official [45cac42c0]
System information
Ubuntu 22.10, GTX1060 Vulkan
Issue description
tried to connect multiple buttons with
ButtonGroup
, but unfortunatelyButtonGroup
doesn't emitpressed
signalSteps to reproduce
Minimal reproduction project
New Game Project.zip