Commit 870ed6f2 by volzhs

Add "button_selected" signal to ButtonGroup

parent 12843167
......@@ -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