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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Maxomann

Pages: [1]
1
Graphics / Drawing a child class of sf::Sprite
« on: April 28, 2013, 10:31:36 pm »
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?

Pages: [1]