summaryrefslogtreecommitdiffstats
path: root/doc/classes/LineEdit.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/LineEdit.xml')
-rw-r--r--doc/classes/LineEdit.xml21
1 files changed, 20 insertions, 1 deletions
diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml
index f938460c2f..a37dd47914 100644
--- a/doc/classes/LineEdit.xml
+++ b/doc/classes/LineEdit.xml
@@ -4,7 +4,14 @@
An input field for single-line text.
</brief_description>
<description>
- [LineEdit] provides an input field for editing a single line of text. It features many built-in shortcuts that are always available ([kbd]Ctrl[/kbd] here maps to [kbd]Cmd[/kbd] on macOS):
+ [LineEdit] provides an input field for editing a single line of text.
+ - When the [LineEdit] control is focused using the keyboard arrow keys, it will only gain focus and not enter edit mode.
+ - To enter edit mode, click on the control with the mouse or press the "ui_text_submit" action (default: [kbd]Enter[/kbd] or [kbd]Kp Enter[/kbd]).
+ - To exit edit mode, press "ui_text_submit" or "ui_cancel" (default: [kbd]Escape[/kbd]) actions.
+ - Check [method is_editing] and [signal editing_toggled] for more information.
+ [b]Important:[/b]
+ - Focusing the [LineEdit] with "ui_focus_next" (default: [kbd]Tab[/kbd]) or "ui_focus_prev" (default: [kbd]Shift + Tab[/kbd]) or [method Control.grab_focus] still enters edit mode (for compatibility).
+ [LineEdit] features many built-in shortcuts that are always available ([kbd]Ctrl[/kbd] here maps to [kbd]Cmd[/kbd] on macOS):
- [kbd]Ctrl + C[/kbd]: Copy
- [kbd]Ctrl + X[/kbd]: Cut
- [kbd]Ctrl + V[/kbd] or [kbd]Ctrl + Y[/kbd]: Paste/"yank"
@@ -139,6 +146,12 @@
Inserts [param text] at the caret. If the resulting value is longer than [member max_length], nothing happens.
</description>
</method>
+ <method name="is_editing" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns whether the [LineEdit] is being edited.
+ </description>
+ </method>
<method name="is_menu_visible" qualifiers="const">
<return type="bool" />
<description>
@@ -301,6 +314,12 @@
</member>
</members>
<signals>
+ <signal name="editing_toggled">
+ <param index="0" name="toggled_on" type="bool" />
+ <description>
+ Emitted when the [LineEdit] switches in or out of edit mode.
+ </description>
+ </signal>
<signal name="text_change_rejected">
<param index="0" name="rejected_substring" type="String" />
<description>