Add function to get the color picker dialog from ColorPickerButton, closes #4415

This commit is contained in:
Juan Linietsky 2016-06-19 02:08:22 -03:00
parent 7c20c386c5
commit 400febf585
2 changed files with 7 additions and 0 deletions

View File

@ -664,10 +664,15 @@ bool ColorPickerButton::is_editing_alpha() const{
} }
ColorPicker *ColorPickerButton::get_picker() {
return picker;
}
void ColorPickerButton::_bind_methods(){ void ColorPickerButton::_bind_methods(){
ObjectTypeDB::bind_method(_MD("set_color","color"),&ColorPickerButton::set_color); ObjectTypeDB::bind_method(_MD("set_color","color"),&ColorPickerButton::set_color);
ObjectTypeDB::bind_method(_MD("get_color"),&ColorPickerButton::get_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("set_edit_alpha","show"),&ColorPickerButton::set_edit_alpha);
ObjectTypeDB::bind_method(_MD("is_editing_alpha"),&ColorPickerButton::is_editing_alpha); ObjectTypeDB::bind_method(_MD("is_editing_alpha"),&ColorPickerButton::is_editing_alpha);
ObjectTypeDB::bind_method(_MD("_color_changed"),&ColorPickerButton::_color_changed); ObjectTypeDB::bind_method(_MD("_color_changed"),&ColorPickerButton::_color_changed);

View File

@ -133,6 +133,8 @@ public:
void set_edit_alpha(bool p_show); void set_edit_alpha(bool p_show);
bool is_editing_alpha() const; bool is_editing_alpha() const;
ColorPicker *get_picker();
ColorPickerButton(); ColorPickerButton();
}; };