diff options
Diffstat (limited to 'scene/gui/line_edit.h')
-rw-r--r-- | scene/gui/line_edit.h | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/scene/gui/line_edit.h b/scene/gui/line_edit.h index 6db7a78f61..cbadf818cd 100644 --- a/scene/gui/line_edit.h +++ b/scene/gui/line_edit.h @@ -94,7 +94,7 @@ private: Point2 ime_selection; RID text_rid; - float full_width = 0; + float full_width = 0.0; bool selecting_enabled = true; @@ -129,19 +129,19 @@ private: Ref<Texture2D> right_icon; struct Selection { - int begin; - int end; - int cursor_start; - bool enabled; - bool creating; - bool doubleclick; - bool drag_attempt; + int begin = 0; + int end = 0; + int cursor_start = 0; + bool enabled = false; + bool creating = false; + bool doubleclick = false; + bool drag_attempt = false; } selection; struct TextOperation { - int cursor_pos; - int scroll_offset; - int cached_width; + int cursor_pos = 0; + int scroll_offset = 0; + int cached_width = 0; String text; }; List<TextOperation> undo_stack; @@ -163,6 +163,7 @@ private: void _clear_redo(); void _create_undo_state(); + int _get_menu_action_accelerator(const String &p_action); void _generate_context_menu(); void _shape(); @@ -188,6 +189,14 @@ private: void _editor_settings_changed(); + void _swap_current_input_direction(); + void _move_cursor_left(bool p_select, bool p_move_by_word = false); + void _move_cursor_right(bool p_select, bool p_move_by_word = false); + void _move_cursor_start(bool p_select); + void _move_cursor_end(bool p_select); + void _backspace(bool p_word = false, bool p_all_to_left = false); + void _delete(bool p_word = false, bool p_all_to_right = false); + void _gui_input(Ref<InputEvent> p_event); void _notification(int p_what); |