From 103c0fa6e6ea85779e5de965b5b353833926732f Mon Sep 17 00:00:00 2001 From: Brian Semrau Date: Thu, 7 Jul 2022 14:20:10 -0400 Subject: Add support for multiple virtual keyboard types --- doc/classes/DisplayServer.xml | 31 ++++++++++++++++++++++++++++--- doc/classes/LineEdit.xml | 28 ++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 3 deletions(-) (limited to 'doc/classes') 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 @@ - + @@ -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. @@ -1323,6 +1323,31 @@ + + Default text virtual keyboard. + + + Multiline virtual keyboard. + + + Virtual number keypad, useful for PIN entry. + + + Virtual number keypad, useful for entering fractional numbers. + + + Virtual phone number keypad. + + + Virtual keyboard with additional keys to assist with typing email addresses. + + + 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]. + + + Virtual keyboard with additional keys to assist with typing URLs. + diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml index 84471bafc0..2ff13a676b 100644 --- a/doc/classes/LineEdit.xml +++ b/doc/classes/LineEdit.xml @@ -246,6 +246,9 @@ If [code]true[/code], the native virtual keyboard is shown when focused on platforms that support it. + + Specifies the type of virtual keyboard to show. + @@ -356,6 +359,31 @@ Represents the size of the [enum MenuItems] enum. + + Default text virtual keyboard. + + + Multiline virtual keyboard. + + + Virtual number keypad, useful for PIN entry. + + + Virtual number keypad, useful for entering fractional numbers. + + + Virtual phone number keypad. + + + Virtual keyboard with additional keys to assist with typing email addresses. + + + 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]. + + + Virtual keyboard with additional keys to assist with typing URLs. + -- cgit v1.2.3