I was having trouble earlier with drawing paragraphed text, and after some googling for results I wasn't the only one struggling, although a lot of the posts were older, I thought I'd put this utility up for anyone who wishes for some help.
I found an old utility for this and updated it for my purposes. I thought I'd share it for anyone else who wanted to do this.
Original credits given in the gist.
You may ask, what is the benefit of using this instead of multiple DLabels?
You do not need to create a new DLabel and size/position it for each line
You can align the text unlike a DLabel
The text won't sit halfway up the height (Which was my main problem with DLabels for variable-sized paragraphs)
The paragraph size is returned allowing you to add things under it easily. (Add the returned value to the Y of anything below it)
Insert other cool reasons here
Yes, it's similar to using "\n" in a DLabel but I find this far better.
There may also be a bug with aligning the text to the bottom, the solution would be to change how the Offset is added.
There are probably a lot of people who don't need this, but I hope it comes in handy for those who do!
Sorry, you need to Log In to post a reply to this thread.