Page 1 of 1

Chat gui options - SFSIsland Demo

Posted: 23 Jun 2009, 15:58
by JalenBlade
Is it possible to change the chat background color etc? I can't find the images used if they are images.
Is it possible to make the chat window moveable/sizable by the player? If so how?
Is there any code around that allows us to change the way chat works? I would like the player to click in the window to chat and be able to keep chatting until they click the game screen again. No enter/type/enter/type action. If so, a link would be appreciated.
I've spent an hour or more trying to size and move the chat screen to the Bottom/Left of the game screen using this code in the chatController script...
void Start() {
chatWindow = new Rect(Screen.width - 1235, Screen.height - 200, 1235, 200);
The first number seems to set the horizontal position of the screen rather than the width. The third number seems to adjust the actual width. the second number seems to position the window vertically and the 4th number seems to determine the actual height of the that right?
Is there a way to make it 100% width? It seems like there must be an easier way to position it and make it work in all resolutions.

Any help with these questions would be greatly appreciated!

Posted: 24 Jun 2009, 16:56
by ThomasLund
Hi - yes to most of those questions.

But the real place to ask these things is over on the unity forums.

None of the questions are really SFS API relevant, and you would have much higher visibility and success rate asking Unity questions over there :-)

What you do need to do though is to read up on the documentation provided for the GUI as well as check out the general GUI reference documentation. Sorry to say, but most people will most likely tell you to go read the documentation - so I'll do that too :-) Teach a man to fish...... etc

They are usually installed here on your machine:


For the graphics part of the island demo I've used a skin that is automagic used by all UI elements.




Posted: 24 Jun 2009, 17:11
by JalenBlade
Thanks, yep, I found most of the answer to the GUI textures after posting but forgot to edit this post. I think I have the GUI side of things working, won't know til I get the server side extension figured out.

Moving, positioning and sizing the chat screen though? I thought SFS was in charge of the chat portion of this duo. Also, code that controls how chat is entered seems like SFS territory. No?

Posted: 24 Jun 2009, 18:10
by ThomasLund
Thats all Unity GUI territory - SFS is only responsible for the transport of the chat text + broadcasting it on the server side.

All rendering is purely Unity


Posted: 24 Jun 2009, 19:41
by JalenBlade
cool, good info to know!