diff options
Diffstat (limited to 'scene/gui/spin_box.h')
-rw-r--r-- | scene/gui/spin_box.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/scene/gui/spin_box.h b/scene/gui/spin_box.h index fb10379296..f2299ce1c2 100644 --- a/scene/gui/spin_box.h +++ b/scene/gui/spin_box.h @@ -40,6 +40,7 @@ class SpinBox : public Range { LineEdit *line_edit; int last_w = 0; + bool update_on_text_changed = false; Timer *range_click_timer; void _range_click_timeout(); @@ -47,6 +48,8 @@ class SpinBox : public Range { void _text_submitted(const String &p_string); virtual void _value_changed(double) override; + void _text_changed(const String &p_string); + String prefix; String suffix; @@ -65,7 +68,7 @@ class SpinBox : public Range { inline void _adjust_width_for_icon(const Ref<Texture2D> &icon); protected: - void _gui_input(const Ref<InputEvent> &p_event); + virtual void gui_input(const Ref<InputEvent> &p_event) override; void _notification(int p_what); @@ -79,7 +82,7 @@ public: void set_align(LineEdit::Align p_align); LineEdit::Align get_align() const; - void set_editable(bool p_editable); + void set_editable(bool p_enabled); bool is_editable() const; void set_suffix(const String &p_suffix); @@ -88,6 +91,9 @@ public: void set_prefix(const String &p_prefix); String get_prefix() const; + void set_update_on_text_changed(bool p_enabled); + bool get_update_on_text_changed() const; + void apply(); SpinBox(); |