Difference between revisions of "love.textinput"
(Created page) |
m |
||
Line 1: | Line 1: | ||
{{newin|[[0.9.0]]|090|type=function}} | {{newin|[[0.9.0]]|090|type=function}} | ||
− | + | Called when text has been entered by the user. For example if shift-2 is pressed on an American keyboard layout, the text "@" will be generated. | |
== Function == | == Function == | ||
=== Synopsis === | === Synopsis === | ||
Line 30: | Line 30: | ||
* [[love.keypressed]] | * [[love.keypressed]] | ||
[[Category:Callbacks]] | [[Category:Callbacks]] | ||
− | {{#set:Description= | + | {{#set:Description=Called when text has been entered by the user.}} |
== Other Languages == | == Other Languages == | ||
{{i18n|love.textinput}} | {{i18n|love.textinput}} |
Revision as of 15:12, 26 August 2013
Available since LÖVE 0.9.0 |
This function is not supported in earlier versions. |
Called when text has been entered by the user. For example if shift-2 is pressed on an American keyboard layout, the text "@" will be generated.
Function
Synopsis
love.textinput( text )
Arguments
string text
- The UTF-8 encoded unicode text.
Returns
Nothing.
Examples
Record and print text the user writes.
function love.load()
text = "Type away! -- "
end
function love.textinput(t)
text = text .. t
end
function love.draw()
love.graphics.printf(text, 0, 0, love.graphics.getWidth())
end
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