Hello Fellow Lovers,
New to Lua and Love2d, so I'm having trouble trying to get input from the user, I looked on the website and I found
Code: Select all
function love.textinput(t)
I'm trying to if a save is "[EMPTY]" and the user presses 'enter', it should take their next inputs until the length is longer or equal to 3 and then change the save name from "[empty]" to what they entered
Within the update function
Code: Select all
if love.keyboard.wasPressed("enter") or love.keyboard.wasPressed("return") then
if save[highlighted] == "[EMPTY]" then
-- save[highlighted] = [inputted text from user]
end
end
thanks in advance,