summaryrefslogtreecommitdiff
path: root/doc/classes/DisplayServer.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/DisplayServer.xml')
-rw-r--r--doc/classes/DisplayServer.xml31
1 files changed, 28 insertions, 3 deletions
diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml
index d5db7da1f0..bc6cd88fa5 100644
--- a/doc/classes/DisplayServer.xml
+++ b/doc/classes/DisplayServer.xml
@@ -930,7 +930,7 @@
<return type="void" />
<argument index="0" name="existing_text" type="String" />
<argument index="1" name="position" type="Rect2" default="Rect2(0, 0, 0, 0)" />
- <argument index="2" name="multiline" type="bool" default="false" />
+ <argument index="2" name="type" type="int" enum="DisplayServer.VirtualKeyboardType" default="0" />
<argument index="3" name="max_length" type="int" default="-1" />
<argument index="4" name="cursor_start" type="int" default="-1" />
<argument index="5" name="cursor_end" type="int" default="-1" />
@@ -938,11 +938,11 @@
Shows the virtual keyboard if the platform has one.
[code]existing_text[/code] parameter is useful for implementing your own [LineEdit] or [TextEdit], as it tells the virtual keyboard what text has already been typed (the virtual keyboard uses it for auto-correct and predictions).
[code]position[/code] parameter is the screen space [Rect2] of the edited text.
- [code]multiline[/code] parameter needs to be set to [code]true[/code] to be able to enter multiple lines of text, as in [TextEdit].
+ [code]type[/code] parameter allows configuring which type of virtual keyboard to show.
[code]max_length[/code] limits the number of characters that can be entered if different from [code]-1[/code].
[code]cursor_start[/code] can optionally define the current text cursor position if [code]cursor_end[/code] is not set.
[code]cursor_start[/code] and [code]cursor_end[/code] can optionally define the current text selection.
- [b]Note:[/b] This method is implemented on Android, iOS and UWP.
+ [b]Note:[/b] This method is implemented on Android, iOS and HTML5.
</description>
</method>
<method name="warp_mouse">
@@ -1323,6 +1323,31 @@
</constant>
<constant name="SCREEN_SENSOR" value="6" enum="ScreenOrientation">
</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>
<constant name="CURSOR_ARROW" value="0" enum="CursorShape">
</constant>
<constant name="CURSOR_IBEAM" value="1" enum="CursorShape">