0
\$\begingroup\$

With SDL TTF I've already gotten automatic line wrapping down using the built in "wrapped" function.

However, now I want to do what I guess you could call manual line wrapping. Basically, at certain points I want to start a new line.

Specifically, every time there is a open square bracket "[" I want to do a line ending, and continue the text on a new line. (The equivalent of hitting enter)

Any help would be awesome! (/n doesn't work with SDL TTF as far as I know)

\$\endgroup\$
2
\$\begingroup\$

The \n is supposed to work in the _Wrapped() function calls. So just replace the [ character with a \n character.

\$\endgroup\$
-2
\$\begingroup\$

That did the trick! Thanks!

To restate for future users: Using the "_Wrapped()" function, '/n' does actually work as you'd expect. But not in the other TTF modes.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.