diff --git a/scene/gui/color_picker.cpp b/scene/gui/color_picker.cpp index f8f8b1f6d1e..ab791d1b66d 100644 --- a/scene/gui/color_picker.cpp +++ b/scene/gui/color_picker.cpp @@ -661,10 +661,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 4559bc7391b..f5de9822007 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(); };