So I've created my own chat, and i'm currently using textbounds to position the messages to the right of the sender text.
However, I do not find this efficient because i'd have to limit the message by a lot of characters.
I'm wondering if its possible to calculate the amount of spaces needed before the message text and use it that way.
Example:
Sender will be player1. Sender's message will be hello.
I want to know how it would be possible to make the message like this:
" hello"
the spaces at the left of 'hello' are the spaces which would allow room for the sender's text. It should like this:
player1: hello.
Any possible way to do this? Thanks

2 comments
The biggest problem with doing it that way is that most fonts are not monospaced, meaning different characters have different widths (eg: ' w ' and ' i '). Offsetting the text is probably the most accurate way to go, as this way you wont have to worry about character widths of the font you are using.
I'll only be using SourceSansBold, can i get an example for that font?