Difference between revisions of "love.keyboard.setTextInput"
(Added documentation for 0.10.0's setTextInput(enable,x,y,w,h) variant) |
m |
||
Line 1: | Line 1: | ||
{{newin|[[0.9.0]]|090|type=function}} | {{newin|[[0.9.0]]|090|type=function}} | ||
Enables or disables [[love.textinput|text input]] events. It is enabled by default on Windows, Mac, and Linux, and disabled by default on iOS and Android. | Enables or disables [[love.textinput|text input]] events. It is enabled by default on Windows, Mac, and Linux, and disabled by default on iOS and Android. | ||
+ | |||
+ | On touch devices, this shows the system's native on-screen keyboard when it's enabled. | ||
== Function == | == Function == | ||
=== Synopsis === | === Synopsis === | ||
Line 13: | Line 15: | ||
== Function == | == Function == | ||
{{newin|[[0.10.0]]|0100|type=variant}} | {{newin|[[0.10.0]]|0100|type=variant}} | ||
+ | On iOS and Android this variant tells the OS that the specified rectangle is where text will show up in the game, which prevents the system on-screen keyboard from covering the text. | ||
=== Synopsis === | === Synopsis === | ||
<source lang="lua"> | <source lang="lua"> | ||
Line 19: | Line 22: | ||
=== Arguments === | === Arguments === | ||
{{param|boolean|enable|Whether text input events should be enabled.}} | {{param|boolean|enable|Whether text input events should be enabled.}} | ||
− | {{param|number|x| | + | {{param|number|x|Text rectangle x position.}} |
− | {{param|number|y| | + | {{param|number|y|Text rectangle y position.}} |
− | {{param|number|w| | + | {{param|number|w|Text rectangle width.}} |
− | {{param|number|h| | + | {{param|number|h|Text rectangle height.}} |
=== Returns === | === Returns === | ||
Nothing. | Nothing. |
Latest revision as of 00:18, 30 July 2017
Available since LÖVE 0.9.0 |
This function is not supported in earlier versions. |
Enables or disables text input events. It is enabled by default on Windows, Mac, and Linux, and disabled by default on iOS and Android.
On touch devices, this shows the system's native on-screen keyboard when it's enabled.
Contents
Function
Synopsis
love.keyboard.setTextInput( enable )
Arguments
boolean enable
- Whether text input events should be enabled.
Returns
Nothing.
Function
Available since LÖVE 0.10.0 |
This variant is not supported in earlier versions. |
On iOS and Android this variant tells the OS that the specified rectangle is where text will show up in the game, which prevents the system on-screen keyboard from covering the text.
Synopsis
love.keyboard.setTextInput( enable, x, y, w, h )
Arguments
boolean enable
- Whether text input events should be enabled.
number x
- Text rectangle x position.
number y
- Text rectangle y position.
number w
- Text rectangle width.
number h
- Text rectangle height.
Returns
Nothing.
See Also
Other Languages
Dansk –
Deutsch –
English –
Español –
Français –
Indonesia –
Italiano –
Lietuviškai –
Magyar –
Nederlands –
Polski –
Português –
Română –
Slovenský –
Suomi –
Svenska –
Türkçe –
Česky –
Ελληνικά –
Български –
Русский –
Српски –
Українська –
עברית –
ไทย –
日本語 –
正體中文 –
简体中文 –
Tiếng Việt –
한국어
More info