Create many types of popups on demand

* LineEdit popups created on demand.
* TextEdit popups created on demand.
* SpinSlider popups created on demand.
* ResourcePicker popups created on demand.

Improves editor responsiveness.
This commit is contained in:
reduz 2021-07-16 18:36:05 -03:00
parent de83ee57e5
commit a3fb76cd45
12 changed files with 208 additions and 108 deletions

View file

@ -63,9 +63,9 @@ class EditorSpinSlider : public Range {
Vector2 grabbing_spinner_mouse_pos;
double pre_grab_value;
Popup *value_input_popup;
LineEdit *value_input;
bool value_input_just_closed;
Popup *value_input_popup = nullptr;
LineEdit *value_input = nullptr;
bool value_input_just_closed = false;
void _grabber_gui_input(const Ref<InputEvent> &p_event);
void _value_input_closed();
@ -79,6 +79,9 @@ class EditorSpinSlider : public Range {
void _evaluate_input_text();
void _update_value_input_stylebox();
void _ensure_input_popup();
protected:
void _notification(int p_what);
void _gui_input(const Ref<InputEvent> &p_event);