summaryrefslogtreecommitdiff
path: root/doc/classes/LineEdit.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/LineEdit.xml')
-rw-r--r--doc/classes/LineEdit.xml60
1 files changed, 44 insertions, 16 deletions
diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml
index 84471bafc0..20703f680c 100644
--- a/doc/classes/LineEdit.xml
+++ b/doc/classes/LineEdit.xml
@@ -45,10 +45,10 @@
</method>
<method name="delete_text">
<return type="void" />
- <argument index="0" name="from_column" type="int" />
- <argument index="1" name="to_column" type="int" />
+ <param index="0" name="from_column" type="int" />
+ <param index="1" name="to_column" type="int" />
<description>
- Deletes a section of the [member text] going from position [code]from_column[/code] to [code]to_column[/code]. Both parameters should be within the text's length.
+ Deletes a section of the [member text] going from position [param from_column] to [param to_column]. Both parameters should be within the text's length.
</description>
</method>
<method name="deselect">
@@ -90,9 +90,9 @@
</method>
<method name="insert_text_at_caret">
<return type="void" />
- <argument index="0" name="text" type="String" />
+ <param index="0" name="text" type="String" />
<description>
- Inserts [code]text[/code] at the caret. If the resulting value is longer than [member max_length], nothing happens.
+ Inserts [param text] at the caret. If the resulting value is longer than [member max_length], nothing happens.
</description>
</method>
<method name="is_menu_visible" qualifiers="const">
@@ -103,17 +103,17 @@
</method>
<method name="menu_option">
<return type="void" />
- <argument index="0" name="option" type="int" />
+ <param index="0" name="option" type="int" />
<description>
Executes a given action as defined in the [enum MenuItems] enum.
</description>
</method>
<method name="select">
<return type="void" />
- <argument index="0" name="from" type="int" default="0" />
- <argument index="1" name="to" type="int" default="-1" />
+ <param index="0" name="from" type="int" default="0" />
+ <param index="1" name="to" type="int" default="-1" />
<description>
- Selects characters inside [LineEdit] between [code]from[/code] and [code]to[/code]. By default, [code]from[/code] is at the beginning and [code]to[/code] at the end.
+ Selects characters inside [LineEdit] between [param from] and [param to]. By default, [param from] is at the beginning and [param to] at the end.
[codeblocks]
[gdscript]
text = "Welcome"
@@ -183,7 +183,7 @@
Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
</member>
<member name="max_length" type="int" setter="set_max_length" getter="get_max_length" default="0">
- Maximum amount of characters that can be entered inside the [LineEdit]. If [code]0[/code], there is no limit.
+ Maximum number of characters that can be entered inside the [LineEdit]. If [code]0[/code], there is no limit.
When a limit is defined, characters that would exceed [member max_length] are truncated. This happens both for existing [member text] contents when setting the max length, or for new text inserted in the [LineEdit], including pasting. If any input text is truncated, the [signal text_change_rejected] signal is emitted with the truncated substring as parameter.
[b]Example:[/b]
[codeblocks]
@@ -221,8 +221,8 @@
<member name="secret" type="bool" setter="set_secret" getter="is_secret" default="false">
If [code]true[/code], every character is replaced with the secret character (see [member secret_character]).
</member>
- <member name="secret_character" type="String" setter="set_secret_character" getter="get_secret_character" default="&quot;*&quot;">
- The character to use to mask secret input (defaults to "*"). Only a single character can be used as the secret character.
+ <member name="secret_character" type="String" setter="set_secret_character" getter="get_secret_character" default="&quot;•&quot;">
+ The character to use to mask secret input (defaults to "•"). Only a single character can be used as the secret character.
</member>
<member name="selecting_enabled" type="bool" setter="set_selecting_enabled" getter="is_selecting_enabled" default="true">
If [code]false[/code], it's impossible to select the text using mouse nor keyboard.
@@ -246,22 +246,25 @@
<member name="virtual_keyboard_enabled" type="bool" setter="set_virtual_keyboard_enabled" getter="is_virtual_keyboard_enabled" default="true">
If [code]true[/code], the native virtual keyboard is shown when focused on platforms that support it.
</member>
+ <member name="virtual_keyboard_type" type="int" setter="set_virtual_keyboard_type" getter="get_virtual_keyboard_type" enum="LineEdit.VirtualKeyboardType" default="0">
+ Specifies the type of virtual keyboard to show.
+ </member>
</members>
<signals>
<signal name="text_change_rejected">
- <argument index="0" name="rejected_substring" type="String" />
+ <param index="0" name="rejected_substring" type="String" />
<description>
Emitted when appending text that overflows the [member max_length]. The appended text is truncated to fit [member max_length], and the part that couldn't fit is passed as the [code]rejected_substring[/code] argument.
</description>
</signal>
<signal name="text_changed">
- <argument index="0" name="new_text" type="String" />
+ <param index="0" name="new_text" type="String" />
<description>
Emitted when the text changes.
</description>
</signal>
<signal name="text_submitted">
- <argument index="0" name="new_text" type="String" />
+ <param index="0" name="new_text" type="String" />
<description>
Emitted when the user presses [constant KEY_ENTER] on the [LineEdit].
</description>
@@ -356,6 +359,31 @@
<constant name="MENU_MAX" value="28" enum="MenuItems">
Represents the size of the [enum MenuItems] enum.
</constant>
+ <constant name="KEYBOARD_TYPE_DEFAULT" value="0" enum="VirtualKeyboardType">
+ Default text virtual keyboard.
+ </constant>
+ <constant name="KEYBOARD_TYPE_MULTILINE" value="1" enum="VirtualKeyboardType">
+ Multiline virtual keyboard.
+ </constant>
+ <constant name="KEYBOARD_TYPE_NUMBER" value="2" enum="VirtualKeyboardType">
+ Virtual number keypad, useful for PIN entry.
+ </constant>
+ <constant name="KEYBOARD_TYPE_NUMBER_DECIMAL" value="3" enum="VirtualKeyboardType">
+ Virtual number keypad, useful for entering fractional numbers.
+ </constant>
+ <constant name="KEYBOARD_TYPE_PHONE" value="4" enum="VirtualKeyboardType">
+ Virtual phone number keypad.
+ </constant>
+ <constant name="KEYBOARD_TYPE_EMAIL_ADDRESS" value="5" enum="VirtualKeyboardType">
+ Virtual keyboard with additional keys to assist with typing email addresses.
+ </constant>
+ <constant name="KEYBOARD_TYPE_PASSWORD" value="6" enum="VirtualKeyboardType">
+ Virtual keyboard for entering a password. On most platforms, this should disable autocomplete and autocapitalization.
+ [b]Note:[/b] This is not supported on HTML5. Instead, this behaves identically to [constant KEYBOARD_TYPE_DEFAULT].
+ </constant>
+ <constant name="KEYBOARD_TYPE_URL" value="7" enum="VirtualKeyboardType">
+ Virtual keyboard with additional keys to assist with typing URLs.
+ </constant>
</constants>
<theme_items>
<theme_item name="caret_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
@@ -389,7 +417,7 @@
The caret's width in pixels. Greater values can be used to improve accessibility by ensuring the caret is easily visible, or to ensure consistency with a large font size.
</theme_item>
<theme_item name="minimum_character_width" data_type="constant" type="int" default="4">
- Minimum horizontal space for the text (not counting the clear button and content margins). This value is measured in count of 'M' characters (i.e. this amount of 'M' characters can be displayed without scrolling).
+ Minimum horizontal space for the text (not counting the clear button and content margins). This value is measured in count of 'M' characters (i.e. this number of 'M' characters can be displayed without scrolling).
</theme_item>
<theme_item name="outline_size" data_type="constant" type="int" default="0">
The size of the text outline.