Game Development Community

Pressing "Enter" in TextBox

by Playware · in Torque Game Builder · 08/15/2007 (12:56 am) · 2 replies

Hi,

I am making one gui asking for UserName and Password. Now I need to give the Enter command on Edit Box, thats means once you fed player name and password, You can press "Enter" key to process further funtion abc().

for this I bound the key like

moveMap.bindCmd(keyboard, "enter","abc();", "");

But it is not calling from Password editBox. What could be the reason ? Any idea or suggestion ?


Thanks.

#1
08/15/2007 (5:31 am)
Yeah, actionMaps are not active while the cursor is on. You'll need to look at the InputManager to find out how keyboard events are handled when the cursor is on.

Ian
#2
08/15/2007 (8:37 am)
I tried to solve this by putting a button below with an accelerator = "return" then make command = "abc();". But this actually has the same problem, if there is a guitexteditctrl it will steal all the keyboard inputs and the button will not recieve the accelerator keypress...

I've had this problem before also, and I 'thought' I fixed it but have forgotten already! Anyone have an idea?

Heres a thread with one way to fix it if you can do C++ code changes.
http://www.garagegames.com/mg/forums/result.thread.php?qt=21066