Added get_popup() method to ColorPickerButton. This allows to check if the picker is open or not using Popup signals.
Ammend: Added docs for the method.
This commit is contained in:
parent
14d1d69916
commit
d6d0df4ba6
@ -17,6 +17,13 @@
|
|||||||
<description>
|
<description>
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
|
<method name="get_popup">
|
||||||
|
<return type="PopupPanel">
|
||||||
|
</return>
|
||||||
|
<description>
|
||||||
|
Returns the control's [PopupPanel] which allows you to connect to Popup Signals. This allows you to handle events when the ColorPicker is shown or hidden.
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
</methods>
|
</methods>
|
||||||
<members>
|
<members>
|
||||||
<member name="color" type="Color" setter="set_pick_color" getter="get_pick_color">
|
<member name="color" type="Color" setter="set_pick_color" getter="get_pick_color">
|
||||||
|
@ -664,11 +664,16 @@ ColorPicker *ColorPickerButton::get_picker() {
|
|||||||
return picker;
|
return picker;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PopupPanel *ColorPickerButton::get_popup() {
|
||||||
|
return popup;
|
||||||
|
}
|
||||||
|
|
||||||
void ColorPickerButton::_bind_methods() {
|
void ColorPickerButton::_bind_methods() {
|
||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("set_pick_color", "color"), &ColorPickerButton::set_pick_color);
|
ClassDB::bind_method(D_METHOD("set_pick_color", "color"), &ColorPickerButton::set_pick_color);
|
||||||
ClassDB::bind_method(D_METHOD("get_pick_color"), &ColorPickerButton::get_pick_color);
|
ClassDB::bind_method(D_METHOD("get_pick_color"), &ColorPickerButton::get_pick_color);
|
||||||
ClassDB::bind_method(D_METHOD("get_picker"), &ColorPickerButton::get_picker);
|
ClassDB::bind_method(D_METHOD("get_picker"), &ColorPickerButton::get_picker);
|
||||||
|
ClassDB::bind_method(D_METHOD("get_popup"), &ColorPickerButton::get_popup);
|
||||||
ClassDB::bind_method(D_METHOD("set_edit_alpha", "show"), &ColorPickerButton::set_edit_alpha);
|
ClassDB::bind_method(D_METHOD("set_edit_alpha", "show"), &ColorPickerButton::set_edit_alpha);
|
||||||
ClassDB::bind_method(D_METHOD("is_editing_alpha"), &ColorPickerButton::is_editing_alpha);
|
ClassDB::bind_method(D_METHOD("is_editing_alpha"), &ColorPickerButton::is_editing_alpha);
|
||||||
ClassDB::bind_method(D_METHOD("_color_changed"), &ColorPickerButton::_color_changed);
|
ClassDB::bind_method(D_METHOD("_color_changed"), &ColorPickerButton::_color_changed);
|
||||||
|
@ -130,6 +130,7 @@ public:
|
|||||||
bool is_editing_alpha() const;
|
bool is_editing_alpha() const;
|
||||||
|
|
||||||
ColorPicker *get_picker();
|
ColorPicker *get_picker();
|
||||||
|
PopupPanel *get_popup();
|
||||||
|
|
||||||
ColorPickerButton();
|
ColorPickerButton();
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user