[SDL] Very quick SDL_TTF question
mrlachatte at gmail.com
Thu Nov 3 18:27:49 PST 2005
I did my own newline code. I grabbed a word at a time like Bill, and
compared TTF_TextWidth() (or whatever it's called) with the current text
position. If the width of the word was greater, increase the y by
TTF_TextHeight(). Actually, you could probably skip the TextWidth() step and
get the width directly from the blitted text (as long as you have some
proper alpha stuff). Anyways, it's not too hard to figure out.
On 11/3/05, Bill Kendrick <nbs at sonic.net> wrote:
> On Fri, Nov 04, 2005 at 01:40:42AM +0000, James O\'Meara wrote:
> > Is there some way I can get it to print out multiple lines without
> > having to have a different surface for every line? I'd imagine there
> > is, but I don't know what to do.
> Nope! I don't believe so!
> In Tux Paint, I rolled by own word-wrap code. I pretty much blit the
> paragraphs one word at a time.
> bill at newbreedsoftware.com
> SDL mailing list
> SDL at libsdl.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SDL