Lavire Posted May 18, 2011 Share Posted May 18, 2011 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. Link to comment
Wojak Posted May 18, 2011 Share Posted May 18, 2011 https://wiki.multitheftauto.com/wiki/OnClientGUIAccepted Link to comment
Lavire Posted May 18, 2011 Author Share Posted May 18, 2011 Oh that's something! Thanks dude! Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now