diff options
Diffstat (limited to 'scene/gui/line_edit.h')
-rw-r--r-- | scene/gui/line_edit.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/scene/gui/line_edit.h b/scene/gui/line_edit.h index e9314ba8dd..5294d99da0 100644 --- a/scene/gui/line_edit.h +++ b/scene/gui/line_edit.h @@ -87,6 +87,10 @@ private: int cached_width; int cached_placeholder_width; + bool clear_button_enabled; + + Ref<Texture> right_icon; + struct Selection { int begin; @@ -105,6 +109,13 @@ private: List<TextOperation> undo_stack; List<TextOperation>::Element *undo_stack_pos; + struct ClearButtonStatus { + bool press_attempt; + bool pressing_inside; + } clear_button_status; + + bool _is_over_clear_button(const Point2 &p_pos) const; + void _clear_undo_stack(); void _clear_redo(); void _create_undo_state(); @@ -150,6 +161,8 @@ public: virtual bool can_drop_data(const Point2 &p_point, const Variant &p_data) const; virtual void drop_data(const Point2 &p_point, const Variant &p_data); + virtual CursorShape get_cursor_shape(const Point2 &p_pos) const; + void menu_option(int p_option); void set_context_menu_enabled(bool p_enable); bool is_context_menu_enabled(); @@ -201,6 +214,11 @@ public: void set_expand_to_text_length(bool p_enabled); bool get_expand_to_text_length() const; + void set_clear_button_enabled(bool p_enabled); + bool is_clear_button_enabled() const; + + void set_right_icon(const Ref<Texture> &p_icon); + virtual bool is_text_field() const; LineEdit(); ~LineEdit(); |