Commit 6ca2128f by George Marques Committed by GitHub

Merge pull request #6807 from volzhs/buttongroup-signal

Add "button_selected" signal to ButtonGroup
parents 292132ef 870ed6f2
......@@ -60,6 +60,9 @@ void ButtonGroup::_pressed(Object *p_button) {
BaseButton *bb=E->get();
bb->set_pressed( b==bb );
if (b==bb){
emit_signal("button_selected", b);
}
}
}
......@@ -153,6 +156,7 @@ void ButtonGroup::_bind_methods() {
ObjectTypeDB::bind_method(_MD("_pressed"),&ButtonGroup::_pressed);
ObjectTypeDB::bind_method(_MD("set_pressed_button","button:BaseButton"),&ButtonGroup::_pressed);
ADD_SIGNAL( MethodInfo("button_selected",PropertyInfo(Variant::OBJECT,"button",PROPERTY_HINT_RESOURCE_TYPE,"BaseButton")));
}
ButtonGroup::ButtonGroup() : BoxContainer(true)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment