I am working on a text-based chat system (a chatbox), and am trying to get it styled nicely. What I'd like to do is display the player's username in one color, and the actual text in another. I realized that I need to use 2 seperate text blocks to do this, but now have encountered a wrapping problem:

As you can see, I have my username, and then my text. The obvious problem is that the grey text is not wrapping underneath the username, but is just wrapping where the beginning of the text starts.
An easy way to fix this would be to have my grey text start where the username starts, and just overlay the red username onto the text. So instead of my text being "WWWWW.....", it would be "[Test_User]: WWWWW....." That way the grey text would wrap underneath the username. Here is what that looks like:

As you can see, the text now wraps underneath the username. The problem now is that if you look very closely at the red username, you can see that there is a bit of grey on the edges of the red, that is because behind the red, I have the username except in grey. Is there any way to have the text block start after the username, but wrap to be underneath it?
As you can see, I have my username, and then my text. The obvious problem is that the grey text is not wrapping underneath the username, but is just wrapping where the beginning of the text starts.
An easy way to fix this would be to have my grey text start where the username starts, and just overlay the red username onto the text. So instead of my text being "WWWWW.....", it would be "[Test_User]: WWWWW....." That way the grey text would wrap underneath the username. Here is what that looks like:
As you can see, the text now wraps underneath the username. The problem now is that if you look very closely at the red username, you can see that there is a bit of grey on the edges of the red, that is because behind the red, I have the username except in grey. Is there any way to have the text block start after the username, but wrap to be underneath it?
Comment