Game Development Community

Creating a chat gui?

by J Sears · in Torque Game Builder · 12/07/2006 (6:36 pm) · 2 replies

I'm trying to look through the GUI reference and figure out the best way to make a chat box. I figure I'd need one guibox below the display box that the person could enter the text and hit enter or click send, that part shouldn't be too hard it's the display that is tough for me to figure out.
I saw the scroller box which I figure I should be able to attacha another gui to that would allow a person to scroll back through the text. but what box would be best to receive the text and each have each new message be on a new line? Can anyone give me an idea of the best way to approach this?

#1
12/08/2006 (11:36 am)
There is an existing chat framework with TGB in the common folder. This includes a basic Chat Gui as well as all the scripts.

To use this you can run two instances of TGB (on two different computers)... then bring up the Sever menu GUI with

canvas.pushDialog(networkMenu);

On one instance start a server, on the other join the server. Then you need to bring up the chat GUI on the one that started the server with:

loadChat();

Then r un the same on the client that connected to the server.
#2
12/08/2006 (2:09 pm)
Oh wow I didn't know there was already a chat function in the common, that makes it a lot easier thank you I will check that out