summaryrefslogtreecommitdiff
path: root/scene/gui/base_button.h
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui/base_button.h')
-rw-r--r--scene/gui/base_button.h24
1 files changed, 22 insertions, 2 deletions
diff --git a/scene/gui/base_button.h b/scene/gui/base_button.h
index ed39b34aa8..898c19e811 100644
--- a/scene/gui/base_button.h
+++ b/scene/gui/base_button.h
@@ -59,9 +59,11 @@ class BaseButton : public Control {
} status;
- ButtonGroup *group;
+ Ref<ButtonGroup> button_group;
+ void _unpress_group();
+
protected:
@@ -109,11 +111,29 @@ public:
virtual String get_tooltip(const Point2& p_pos) const;
+ void set_button_group(const Ref<ButtonGroup>& p_group);
+ Ref<ButtonGroup> get_button_group() const;
+
BaseButton();
~BaseButton();
};
-VARIANT_ENUM_CAST( BaseButton::DrawMode );
+VARIANT_ENUM_CAST( BaseButton::DrawMode )
+
+
+class ButtonGroup : public Resource {
+
+ GDCLASS(ButtonGroup,Resource)
+friend class BaseButton;
+ Set<BaseButton*> buttons;
+protected:
+ static void _bind_methods();
+public:
+
+ BaseButton* get_pressed_button();
+ void get_buttons(List<BaseButton*> *r_buttons);
+ ButtonGroup();
+};
#endif