Okay, I have a little problem with sf::Text that I need some help with, or some clarification.
Basically this happens:
sf::Text text;
std::cout << text.getGlobalBounds().width << std::endl; // 0
text.setString("");
std::cout << text.getGlobalBounds().width << std::endl; // 0
text.setString("a");
std::cout << text.getGlobalBounds().width << std::endl; // 16
text.setString("");
std::cout << text.getGlobalBounds().width << std::endl; //16
In words: Once sf::Text had some sort of string and is set to an empty string it still keeps the bounds of the previous one.
Now I'd like to know if this is intended, if I'm doing something wrong or if this shouldn't be that way. Is there maybe a better way to clear the string?
[edit]
Oh yes, I'm using 2.0 RC.