Fix ColorPickerButton close popup on mouse click

Fixes #91813
This commit is contained in:
Pablo Andres Fuente 2024-10-22 13:55:13 -03:00 committed by Pablo Andres Fuente
parent 8b4b93a82e
commit 2ef3ebf934
2 changed files with 23 additions and 0 deletions

View file

@ -521,6 +521,7 @@ class ColorPickerButton : public Button {
Color color;
bool edit_alpha = true;
bool edit_intensity = true;
bool popup_was_open = false;
struct ThemeCache {
Ref<StyleBox> normal_style;
@ -540,6 +541,7 @@ class ColorPickerButton : public Button {
protected:
void _notification(int);
static void _bind_methods();
virtual void gui_input(const Ref<InputEvent> &p_event) override;
public:
void set_pick_color(const Color &p_color);