love
love copied to clipboard
iOS: love.textinput(text) callback stops working after Love app looses focus
Noted when using love console libraries love-console and Vudu that unable to enter further text in console after returning to Love app after Love app looses focus (e.g. after utilizing browser app and returning to Love app). Problem seems to be in love.textinput callback; love.keypressed() still works after returning to Love app after Love app looses focus. Problem does not occur in Love on Linux or Mac.
Tested with the following script (top left of screen shows input received by keypressed; below that shows input received by textinput which stops showing user input after Love app looses focus)
function love.load() love.keyboard.setKeyRepeat(true) love.keyboard.setTextInput(true) keyvalue = "" textvalue = "" end
function love.keypressed(key, scancode, isrepeat) if key then keyvalue = key end end
function love.textinput(text) if text then textvalue = textvalue..text end end
function love.update(dt) end
function love.draw() love.graphics.setColor(0,1,0) love.graphics.print(keyvalue,20,30) love.graphics.setColor(0,0,1) love.graphics.print(textvalue,20,80) end
Fyi,
Thanks