Fixed undo/redo behaviour of color picker and added ability to cancel/confirm color selection.

This commit is contained in:
Zi Ye 2024-02-22 18:01:28 -06:00
parent 99ff024f78
commit d827b34ea8
5 changed files with 48 additions and 10 deletions

View file

@ -317,12 +317,11 @@ public:
void set_edit_alpha(bool p_show);
bool is_editing_alpha() const;
int get_preset_size();
void _set_pick_color(const Color &p_color, bool p_update_sliders);
void set_pick_color(const Color &p_color);
Color get_pick_color() const;
void set_old_color(const Color &p_color);
Color get_old_color() const;
void set_display_old_color(bool p_enabled);
bool is_displaying_old_color() const;
@ -375,6 +374,10 @@ public:
~ColorPicker();
};
class ColorPickerPopupPanel : public PopupPanel {
virtual void _input_from_window(const Ref<InputEvent> &p_event) override;
};
class ColorPickerButton : public Button {
GDCLASS(ColorPickerButton, Button);