Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: ENAY on May 28, 2012, 02:58:45 AM
-
Have started today implementing a chat window but I am starting to get weird behaviour.
Even though I set my Max Height to 100, it doesn't clip it at 100 at all, it just goes on forever. Have been unable to figure it out but I believe it is down to the font used. For example when I open up "Example 12 Chat Window", if I try changing the SciFi font instead my own font. Weird things start happening, text doesn't appear etc. I guess this is down to how the font labels are being calculated right? I am using a Japanese unicode font, could this be the issue I wonder?
-
Max height? There is no such property.
-
There is "UIText List(Script)" has a property called "Max Height" it is set to 410 as default.
I think I am maybe understanding why the text is overflowing. If I manually input text whilst the program is running it overflows, I guess it is because a mesh update (rearranging of the new text) is not automatically being called?
-
Oh, you're using a text list... sorry, I should have read the original post more carefully. You know you need to be adding text to your text list via UITextList.Add, right?
-
Yes I am doing that using UITextList.Add, I wasn't at first. Well I was just testing it out in the GUI, which in reality is a BAD thing to do since the behaviour is random. Everything is working fine now. Sorry for creating a potentially useless thread.
In a way though I am actually pleased I managed to solve this problem myself, it means I am finally getting better at Unity and using NGUI properly. Note for anyone else, don't manually change the text in the GUI, or else it ain't gonna work.
-
Actually I do have a question.
How do you change the colour in the middle of the text string?
I tried putting in stuff like "[FFFF00]" into the text string in code but it just prints out the text string instead of turning yellow. I noticed your example uses AAAAAA but I can't get that to work on mine.
-
DOH! I forgot to tick the encoding box :o