Game Development Community

Math Facts

by Jason McIntosh · in Torque Game Builder · 03/04/2005 (2:00 pm) · 4 replies

I wanted to learn about the GUI system, and my kids needed a good math facts drill program, so I made one. I'm still trying to figure out how to make the input box focused programatically.

www.griminventions.com/dl/mathfacts_01.jpg

#1
03/04/2005 (3:57 pm)
Edutainment
#2
03/04/2005 (4:07 pm)
Nice Jason :)
#3
03/04/2005 (5:43 pm)
I replied in another thread.... but I'll do it again with a bit more information.

This is a case where you will want to name your GUI control. Something like txtAnswerBox

should look like this in the file

new guiTextEditCtrl(txtAnswerBox) {


You can then call the following to set focus to that control:

txtAnswerBox.makeFirstResponder(true);
#4
03/04/2005 (10:36 pm)
@Harold: I saw that function, but couldn't find documentation for the parameters so I didn't try it. Thanks very much! I'll give it a shot.

Edit: Just tried it and it works. Thanks a ton!