I programmed a child class of sf::Sprite which overrides the Sprites draw function.
TextBox.h
class TextBox : virtual private sf::Sprite
{
sf::Text m_text;
public:
virtual void draw( sf::RenderTarget& target, RenderStates states ) const;
};
TextBox.cpp
void TextBox::draw( sf::RenderTarget& target, RenderStates states )const
{
//Here I want to draw the Sprites content
target.draw( this->m_text, states );
};
How can I draw the Sprites content in the function?