Game Development Community

Help with some gui stuff

by Anders Jacobsen · in Torque Game Engine · 06/30/2005 (12:56 pm) · 3 replies

Hello.

Was wondering if someone might tell me how I'd get a text field on the hud using the gui editor to enter text into and then pass that text onto the echo() function so it shows up in console?
I've tried a few things but seem to get an error message in console for each character typed into it. (I'm using the racing starter kit to try this out)

I think I noticed a few different Gui elements that would take text entered from the user. Which one would be best suited for this?

If I can get the text entered passed onto the echo command on a line by line basis I'll be one happy camper. I got a dedicated chat server written in python going, and want to pass entered text to a custom function I wrote for this, so getting this to work with echo() will mean I can take it from there myself. I'm just not a GUI god ;)

Thanks for any help/insight.

#1
06/30/2005 (3:47 pm)
Ok, this is what I've got.

Using the GuiTextEditCtrl to create a text edit box, and then assigning that the $chat var in the edit, then adding echo($chat); in the escapeCommand field I get the thing to do exactly what I want, but only when pressing ESC instead of Enter. What would be a good way to change that?
#2
06/30/2005 (3:58 pm)
It should be "altCommand" you want. It is one of the "*command" fields.

Robert
#3
06/30/2005 (4:01 pm)
Yes, that's it. Thank you very much :)