Hi everyone!
I’m trying to get a grip on how the textField object actually works. I’m currently using it to record the name of a player when he or she wishes to post a highscore I do however have a couple of questions regarding it.
- Is it possible to limit the amount of characters the use can input?
- Is it possible to only show the actual keyboard and the textField rather than getting the “fullscreen keyboard + white text box”?
Thanks in advance!
EDIT:
- I can’t seem to get the event.phase value in my listener that looks like this
local function test(event) -- printing event returns a table, printing event.phase returns nil
if event.phase == "submitted" then
native.setKeyboardFocus( nil )
end
end
Which is being called by this
local textField = native.newTextField(0, 0, rect.width \* 0.7 , 50 )
textField.userInput = test
textField:addEventListener ( "userInput", textField )
[import]uid: 129450 topic_id: 29358 reply_id: 329358[/import]
