by foleyjo » Mon Jun 09, 2014 11:18 am
Does your speech bubble have a set size and will each line in the speech bubble be different sized?
If set sized bubble you could have each line of the speach bubble as a different string.
Set a pointer to the firstline string and everytime the user inputs a character amend the string until you have reached the maximum number of characters.
Now set the pointer to the secondline string and repeat until all string lines have been maxed out.
Only thing that this won't deal with is when words are split over two lines. Maybe instead of doing it by letter you could do it by word. (using space character to check when the word is entered) and then compare the length of the new word with the spaces left in the current lines string. If the new word is greater then move onto the next line.
KISS -Keep It Simple Stoopid