inupt TEXT FIELD for user of the application
by Darije Milak · in Torque Game Builder · 06/22/2010 (2:20 am) · 7 replies
HI,
I need, as very important feature to create a input text field (for user) into my application. I need to use them, a lot, and I need to know Can I hide those field like other objects or not. Same gose for masking, is it possible to mask them as needed.
If anyone knows how to do create Quiz in Torque where player needs to insert answers trough keybord, please let me know the best way.
Thanks,
Darije
I need, as very important feature to create a input text field (for user) into my application. I need to use them, a lot, and I need to know Can I hide those field like other objects or not. Same gose for masking, is it possible to mask them as needed.
If anyone knows how to do create Quiz in Torque where player needs to insert answers trough keybord, please let me know the best way.
Thanks,
Darije
#2
and thank you for reply William.
Ca I have any little exemple how it works?
06/24/2010 (1:32 am)
Hi, and thank you for reply William.
Ca I have any little exemple how it works?
#3
echo( inputText_gui.text ); // echo: click on me and write something here
but when i start typing, and start to repeatedly echo my inputText_gui.text i always get the same text no mather what i write in there. Althou i can set the display text with:
inputText_gui.text = "a";
which will erase display text in my text field.
06/30/2010 (6:35 am)
I just dont get it, how to make text inputs accessible in the script. I i wrote some default text in my gui (named: inputText_gui) then:echo( inputText_gui.text ); // echo: click on me and write something here
but when i start typing, and start to repeatedly echo my inputText_gui.text i always get the same text no mather what i write in there. Althou i can set the display text with:
inputText_gui.text = "a";
which will erase display text in my text field.
#4
06/30/2010 (6:39 am)
For the gui elements, I believe that getText() and setText() work better than just .text.
#6
Where are they documented? Have a link?
07/02/2010 (5:08 am)
Where did you found those two methods anyway?Where are they documented? Have a link?
#7
07/02/2010 (6:28 am)
I can't find it in the docs - incredibly frustrating. I probably asked in the forums at some point.
Associate William Lee Sims
Machine Code Games
Also, if you need to tie it to some area in the TGB scene, you can use the attachGui function to make the GUI follow an object in the scene (both when the camera moves or the object moves).