SFML community forums
Help => Graphics => Topic started by: djzmo on October 03, 2010, 05:11:56 pm
-
Hello there,
Is it possible to give a text some different colors by just drawing a sf::String?
For example: Hello world!
The text will be dynamic and prolly long, so I cannot simply make string objects with different colors.
If no, can you tell me an alternative way to do that?
Thanks :)
-
No, not with ONE sf::String/sf::Text. Use a container/class to store all your strings. (Take a look at the wiki, there may be something over there useful.)
-
No, not with ONE sf::String/sf::Text. Use a container/class to store all your strings. (Take a look at the wiki, there may be something over there useful.)
Sweet.
So here's the answer to my own question :P
http://www.sfml-dev.org/wiki/en/sources/richtext
Thanks.
-
No, not with ONE sf::String/sf::Text. Use a container/class to store all your strings. (Take a look at the wiki, there may be something over there useful.)
Sweet.
So here's the answer to my own question :P
http://www.sfml-dev.org/wiki/en/sources/richtext
Thanks.
I was going to happily spam that wiki entry, but you saw it first! Take care with the '\n' characters. To use multiple lines you should use a stl container or something similar.