Key bindings
by Christian · in Torque Game Engine · 03/27/2007 (9:31 pm) · 6 replies
I am making a key binding system. 2 questions, is there a way to make accelerator do multiple keys such as 'shift t'? And when I have my guitextedit boxes (used to assign new keys) go invisible; The movement keys and all keyboard buttons will go directly into that box still. Is there a way to get the cursor out of that box? Thank ya's.
#2
Instead of rebinding the key is starts doin function Red1.
03/28/2007 (10:37 am)
Thank you Amr. The push and Pop Dialog works. As far as the keybindings. I'm not sure how to do this exactly. Something along the lines of:%d1 = tb1.text; moveMap.bind(keyboard, %d1 , Red1());
Instead of rebinding the key is starts doin function Red1.
#3
03/28/2007 (10:44 am)
.
#4
@Christian - In Torque, the way to get the text out of text boxes is to use the getText method. All you need to do to get your code to work is change the following:
03/28/2007 (11:21 am)
@Berserk - Torque already supports this kind of functionality natively. All it needs is something like this:moveMap.bind(keyboard, "shift c", yourFunc);
@Christian - In Torque, the way to get the text out of text boxes is to use the getText method. All you need to do to get your code to work is change the following:
%d1 = tb1.[b]getText();[/b] moveMap.bind(keyboard, %d1 , Red1());
#5
11/04/2010 (9:47 pm)
it is not right, man
#6
11/05/2010 (12:52 am)
What exactly is not right?
Torque Owner Amr Bekhit
moveMap.bind(keyboard, "shift c", yourFunc);
As for your text box, what I would do is put my text box in a seperate GUI, then when I want to show it I push that GUI on and then pop it when I'm done with it.
--Amr