Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Displaying Numbers  (Read 2831 times)

0 Members and 1 Guest are viewing this topic.

inlinevoid

  • Newbie
  • *
  • Posts: 49
    • MSN Messenger - inlinevoidmain@gmail.com
    • AOL Instant Messenger - inlinevoid
    • View Profile
    • Email
Displaying Numbers
« 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.

Oz1571

  • Newbie
  • *
  • Posts: 28
    • View Profile
Displaying Numbers
« Reply #1 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.

inlinevoid

  • Newbie
  • *
  • Posts: 49
    • MSN Messenger - inlinevoidmain@gmail.com
    • AOL Instant Messenger - inlinevoid
    • View Profile
    • Email
Displaying Numbers
« Reply #2 on: December 12, 2009, 08:07:13 am »
Alright thanks.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Displaying Numbers
« Reply #3 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.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

 

anything