Hi guys,
I'm a beginner at LUA and after creating an account system with MySQL (which works just fine), I'm trying to make the GUI more comfortable, so that the players can just enter their password (I somehow managed to focus on the textedit element haha) and hit their Enter-key on their keyboard!
I know how the bindKey function works, and I managed to get it working on keys like F1, F2, ... but it just won't let me do it with the Enter-key!
My code:
guiSetVisible(tabPanel, true)
guiBringToFront(edtPass)
--guiSetInputMode("allow_binds") I tried it with and without guiSetInputMode (I would prefer without)
unbindKey("enter")
bindKey("enter", "down",
function(player, key, state)
clientSubmitLogin("left", "up")
end)
showCursor(true)
guiSetInputEnabled(true)
I want it to execute my clientSubmitLogin function. It works with F1 and so on, but not with Enter, I'd appreciate any help.