|
12 | 12 | - [kbd]Ctrl + Z[/kbd]: Undo
|
13 | 13 | - [kbd]Ctrl + ~[/kbd]: Swap input direction.
|
14 | 14 | - [kbd]Ctrl + Shift + Z[/kbd]: Redo
|
15 |
| - - [kbd]Ctrl + U[/kbd]: Delete text from the cursor position to the beginning of the line |
16 |
| - - [kbd]Ctrl + K[/kbd]: Delete text from the cursor position to the end of the line |
| 15 | + - [kbd]Ctrl + U[/kbd]: Delete text from the caret position to the beginning of the line |
| 16 | + - [kbd]Ctrl + K[/kbd]: Delete text from the caret position to the end of the line |
17 | 17 | - [kbd]Ctrl + A[/kbd]: Select all text
|
18 |
| - - [kbd]Up Arrow[/kbd]/[kbd]Down Arrow[/kbd]: Move the cursor to the beginning/end of the line |
| 18 | + - [kbd]Up Arrow[/kbd]/[kbd]Down Arrow[/kbd]: Move the caret to the beginning/end of the line |
19 | 19 | On macOS, some extra keyboard shortcuts are available:
|
20 |
| - - [kbd]Ctrl + F[/kbd]: Same as [kbd]Right Arrow[/kbd], move the cursor one character right |
21 |
| - - [kbd]Ctrl + B[/kbd]: Same as [kbd]Left Arrow[/kbd], move the cursor one character left |
22 |
| - - [kbd]Ctrl + P[/kbd]: Same as [kbd]Up Arrow[/kbd], move the cursor to the previous line |
23 |
| - - [kbd]Ctrl + N[/kbd]: Same as [kbd]Down Arrow[/kbd], move the cursor to the next line |
24 |
| - - [kbd]Ctrl + D[/kbd]: Same as [kbd]Delete[/kbd], delete the character on the right side of cursor |
25 |
| - - [kbd]Ctrl + H[/kbd]: Same as [kbd]Backspace[/kbd], delete the character on the left side of the cursor |
26 |
| - - [kbd]Ctrl + A[/kbd]: Same as [kbd]Home[/kbd], move the cursor to the beginning of the line |
27 |
| - - [kbd]Ctrl + E[/kbd]: Same as [kbd]End[/kbd], move the cursor to the end of the line |
28 |
| - - [kbd]Cmd + Left Arrow[/kbd]: Same as [kbd]Home[/kbd], move the cursor to the beginning of the line |
29 |
| - - [kbd]Cmd + Right Arrow[/kbd]: Same as [kbd]End[/kbd], move the cursor to the end of the line |
| 20 | + - [kbd]Ctrl + F[/kbd]: Same as [kbd]Right Arrow[/kbd], move the caret one character right |
| 21 | + - [kbd]Ctrl + B[/kbd]: Same as [kbd]Left Arrow[/kbd], move the caret one character left |
| 22 | + - [kbd]Ctrl + P[/kbd]: Same as [kbd]Up Arrow[/kbd], move the caret to the previous line |
| 23 | + - [kbd]Ctrl + N[/kbd]: Same as [kbd]Down Arrow[/kbd], move the caret to the next line |
| 24 | + - [kbd]Ctrl + D[/kbd]: Same as [kbd]Delete[/kbd], delete the character on the right side of caret |
| 25 | + - [kbd]Ctrl + H[/kbd]: Same as [kbd]Backspace[/kbd], delete the character on the left side of the caret |
| 26 | + - [kbd]Ctrl + A[/kbd]: Same as [kbd]Home[/kbd], move the caret to the beginning of the line |
| 27 | + - [kbd]Ctrl + E[/kbd]: Same as [kbd]End[/kbd], move the caret to the end of the line |
| 28 | + - [kbd]Cmd + Left Arrow[/kbd]: Same as [kbd]Home[/kbd], move the caret to the beginning of the line |
| 29 | + - [kbd]Cmd + Right Arrow[/kbd]: Same as [kbd]End[/kbd], move the caret to the end of the line |
30 | 30 | </description>
|
31 | 31 | <tutorials>
|
32 | 32 | </tutorials>
|
33 | 33 | <methods>
|
34 |
| - <method name="append_at_cursor"> |
35 |
| - <return type="void"> |
36 |
| - </return> |
37 |
| - <argument index="0" name="text" type="String"> |
38 |
| - </argument> |
39 |
| - <description> |
40 |
| - Adds [code]text[/code] after the cursor. If the resulting value is longer than [member max_length], nothing happens. |
41 |
| - </description> |
42 |
| - </method> |
43 | 34 | <method name="clear">
|
44 | 35 | <return type="void">
|
45 | 36 | </return>
|
|
54 | 45 | Removes all OpenType features.
|
55 | 46 | </description>
|
56 | 47 | </method>
|
57 |
| - <method name="delete_char_at_cursor"> |
| 48 | + <method name="delete_char_at_caret"> |
58 | 49 | <return type="void">
|
59 | 50 | </return>
|
60 | 51 | <description>
|
61 |
| - Deletes one character at the cursor's current position (equivalent to pressing [kbd]Delete[/kbd]). |
| 52 | + Deletes one character at the caret's current position (equivalent to pressing [kbd]Delete[/kbd]). |
62 | 53 | </description>
|
63 | 54 | </method>
|
64 | 55 | <method name="delete_text">
|
|
99 | 90 | <return type="int">
|
100 | 91 | </return>
|
101 | 92 | <description>
|
102 |
| - Returns the scroll offset due to [member caret_position], as a number of characters. |
| 93 | + Returns the scroll offset due to [member caret_column], as a number of characters. |
| 94 | + </description> |
| 95 | + </method> |
| 96 | + <method name="insert_text_at_caret"> |
| 97 | + <return type="void"> |
| 98 | + </return> |
| 99 | + <argument index="0" name="text" type="String"> |
| 100 | + </argument> |
| 101 | + <description> |
| 102 | + Inserts [code]text[/code] at the caret. If the resulting value is longer than [member max_length], nothing happens. |
103 | 103 | </description>
|
104 | 104 | </method>
|
105 | 105 | <method name="menu_option">
|
|
159 | 159 | <member name="align" type="int" setter="set_align" getter="get_align" enum="LineEdit.Align" default="0">
|
160 | 160 | Text alignment as defined in the [enum Align] enum.
|
161 | 161 | </member>
|
162 |
| - <member name="caret_blink" type="bool" setter="cursor_set_blink_enabled" getter="cursor_get_blink_enabled" default="false"> |
163 |
| - If [code]true[/code], the caret (visual cursor) blinks. |
| 162 | + <member name="caret_blink" type="bool" setter="set_caret_blink_enabled" getter="is_caret_blink_enabled" default="false"> |
| 163 | + If [code]true[/code], the caret (text cursor) blinks. |
164 | 164 | </member>
|
165 |
| - <member name="caret_blink_speed" type="float" setter="cursor_set_blink_speed" getter="cursor_get_blink_speed" default="0.65"> |
| 165 | + <member name="caret_blink_speed" type="float" setter="set_caret_blink_speed" getter="get_caret_blink_speed" default="0.65"> |
166 | 166 | Duration (in seconds) of a caret's blinking cycle.
|
167 | 167 | </member>
|
168 |
| - <member name="caret_force_displayed" type="bool" setter="cursor_set_force_displayed" getter="cursor_get_force_displayed" default="false"> |
| 168 | + <member name="caret_column" type="int" setter="set_caret_column" getter="get_caret_column" default="0"> |
| 169 | + The caret's column position inside the [LineEdit]. When set, the text may scroll to accommodate it. |
169 | 170 | </member>
|
170 |
| - <member name="caret_mid_grapheme" type="bool" setter="set_mid_grapheme_caret_enabled" getter="get_mid_grapheme_caret_enabled" default="false"> |
| 171 | + <member name="caret_force_displayed" type="bool" setter="set_caret_force_displayed" getter="is_caret_force_displayed" default="false"> |
| 172 | + </member> |
| 173 | + <member name="caret_mid_grapheme" type="bool" setter="set_caret_mid_grapheme_enabled" getter="is_caret_mid_grapheme_enabled" default="false"> |
171 | 174 | Allow moving caret, selecting and removing the individual composite character components.
|
172 | 175 | Note: [kbd]Backspace[/kbd] is always removing individual composite character components.
|
173 | 176 | </member>
|
174 |
| - <member name="caret_position" type="int" setter="set_cursor_position" getter="get_cursor_position" default="0"> |
175 |
| - The cursor's position inside the [LineEdit]. When set, the text may scroll to accommodate it. |
176 |
| - </member> |
177 | 177 | <member name="clear_button_enabled" type="bool" setter="set_clear_button_enabled" getter="is_clear_button_enabled" default="false">
|
178 | 178 | If [code]true[/code], the [LineEdit] will show a clear button if [code]text[/code] is not empty, which can be used to clear the text quickly.
|
179 | 179 | </member>
|
|
186 | 186 | <member name="editable" type="bool" setter="set_editable" getter="is_editable" default="true">
|
187 | 187 | If [code]false[/code], existing text cannot be modified and new text cannot be added.
|
188 | 188 | </member>
|
189 |
| - <member name="expand_to_text_length" type="bool" setter="set_expand_to_text_length" getter="get_expand_to_text_length" default="false"> |
| 189 | + <member name="expand_to_text_length" type="bool" setter="set_expand_to_text_length_enabled" getter="is_expand_to_text_length_enabled" default="false"> |
190 | 190 | If [code]true[/code], the [LineEdit] width will increase to stay longer than the [member text]. It will [b]not[/b] compress if the [member text] is shortened.
|
191 | 191 | </member>
|
192 | 192 | <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="2" />
|
|
276 | 276 | Copies the selected text.
|
277 | 277 | </constant>
|
278 | 278 | <constant name="MENU_PASTE" value="2" enum="MenuItems">
|
279 |
| - Pastes the clipboard text over the selected text (or at the cursor's position). |
| 279 | + Pastes the clipboard text over the selected text (or at the caret's position). |
280 | 280 | Non-printable escape characters are automatically stripped from the OS clipboard via [method String.strip_escapes].
|
281 | 281 | </constant>
|
282 | 282 | <constant name="MENU_CLEAR" value="3" enum="MenuItems">
|
|
359 | 359 | </constant>
|
360 | 360 | </constants>
|
361 | 361 | <theme_items>
|
| 362 | + <theme_item name="caret_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> |
| 363 | + Color of the [LineEdit]'s caret (text cursor). |
| 364 | + </theme_item> |
362 | 365 | <theme_item name="clear" type="Texture2D">
|
363 | 366 | Texture for the clear button. See [member clear_button_enabled].
|
364 | 367 | </theme_item>
|
|
368 | 371 | <theme_item name="clear_button_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )">
|
369 | 372 | Color used for the clear button when it's pressed.
|
370 | 373 | </theme_item>
|
371 |
| - <theme_item name="cursor_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> |
372 |
| - Color of the [LineEdit]'s visual cursor (caret). |
373 |
| - </theme_item> |
374 | 374 | <theme_item name="focus" type="StyleBox">
|
375 | 375 | Background used when [LineEdit] has GUI focus.
|
376 | 376 | </theme_item>
|
|
0 commit comments