SFML community forums

Help => Graphics => Topic started by: inlinevoid on December 12, 2009, 05:47:42 am

Title: Displaying Numbers
Post by: inlinevoid on December 12, 2009, 05:47:42 am
Just a quick question... How would I go about displaying variables like int, float, double, etc.

This won't work: sf::String Player1Score(iScore, Font, 50);

Is there some separate function for displaying numbers instead of a string of text or do I have to manually convert the integer into a string before displaying it each time?

Thanks in advance.
Title: Displaying Numbers
Post by: Oz1571 on December 12, 2009, 07:42:39 am
Unless something has changed since 1.5, when I last used the sf::String class, you need to convert it manually first.
Title: Displaying Numbers
Post by: inlinevoid on December 12, 2009, 08:07:13 am
Alright thanks.
Title: Displaying Numbers
Post by: Nexus on December 12, 2009, 12:45:01 pm
Quote from: "Oz1571"
Unless something has changed since 1.5, when I last used the sf::String class, you need to convert it manually first.
When you use the latest SVN version, the class is now named sf::Text instead of sf::String. sf::String terms the unicode string class.