So i have class wallet
class wallet :public sf::Drawable
{
int gold;
sf::Text goldText;
sf::Sprite coin;
sf::Texture coinTexture;
public:
wallet();
~wallet();
void draw(sf::RenderTarget & target, sf::RenderStates states) const;
int getGold();
bool isAfford(int amount);
void pay(int amount);
void setPosition(const sf::Vector2f position);
sf::Vector2f getSize();
};
And in constructor i setText
goldText.setFont(*game::getInstance()->getFont());
goldText.setString("85");
goldText.setCharacterSize(30);
goldText.setColor(sf::Color(30, 40, 30));
goldText.setPosition(sf::Vector2f(100.f,20.f));
Here is the draw method
void wallet::draw(sf::RenderTarget & target, sf::RenderStates states) const
{
target.draw(coin);
target.draw(goldText);
}
When i draw wallet's object all is good except those chars