summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scene/gui/color_picker.cpp5
-rw-r--r--scene/gui/color_picker.h2
2 files changed, 7 insertions, 0 deletions
diff --git a/scene/gui/color_picker.cpp b/scene/gui/color_picker.cpp
index bd24b43761..d6bbdf2d21 100644
--- a/scene/gui/color_picker.cpp
+++ b/scene/gui/color_picker.cpp
@@ -664,10 +664,15 @@ bool ColorPickerButton::is_editing_alpha() const{
}
+ColorPicker *ColorPickerButton::get_picker() {
+ return picker;
+}
+
void ColorPickerButton::_bind_methods(){
ObjectTypeDB::bind_method(_MD("set_color","color"),&ColorPickerButton::set_color);
ObjectTypeDB::bind_method(_MD("get_color"),&ColorPickerButton::get_color);
+ ObjectTypeDB::bind_method(_MD("get_picker:ColorPicker"),&ColorPickerButton::get_picker);
ObjectTypeDB::bind_method(_MD("set_edit_alpha","show"),&ColorPickerButton::set_edit_alpha);
ObjectTypeDB::bind_method(_MD("is_editing_alpha"),&ColorPickerButton::is_editing_alpha);
ObjectTypeDB::bind_method(_MD("_color_changed"),&ColorPickerButton::_color_changed);
diff --git a/scene/gui/color_picker.h b/scene/gui/color_picker.h
index 4559bc7391..f5de982200 100644
--- a/scene/gui/color_picker.h
+++ b/scene/gui/color_picker.h
@@ -133,6 +133,8 @@ public:
void set_edit_alpha(bool p_show);
bool is_editing_alpha() const;
+ ColorPicker *get_picker();
+
ColorPickerButton();
};