SFML community forums
Help => Graphics => Topic started by: Halfwarr on April 21, 2009, 04:37:30 pm
-
I have a function that gets the players HPs and returns an int, so I convert that to a String and then output that, to String.SetText(String), and draw it everything seems fine but as soon as the Player's HPs change it leaves behind the text.
Not sure what I am doing wrong but here it is the code.
message = ("HP:" + intToString(m_jons->getCurrentHP()));
m_text->SetText(message);
m_app->Draw(*m_text);
m_app->Display();
now here is the weird thing that I just discovered if I minimize the window and bring it back the "ghosting" effect is cleared.
Here is a picture of what I am talking about.
(http://img523.imageshack.us/img523/6371/textq.jpg)
Any ideas would be appreciated?
-
ah I think I figured out what the problem was :D there was nothing in the background where I was loading the text, which apparently causes the ghosting effect to happen.
-
Don't use function Clear ?