Hi all..
I created a thread a while ago concerning almost the same thing.
The thing is I just cannot let this go, look at this piece of code:
http://codepad.org/LPxddsRqAs seen,
object inherits from
sf::Drawable and
CSquare inherits from
object.
To make CSquare drawable via
App.Draw(mysquare);, the function
void Render(sf::RenderTarget& Target) const { Target.Draw(square); } is needed in CSquare.
But CSquare also has the functions SetPosition(), SetRotation(), SetScale() and so on inherited from sf::Drawable, but these functions won't actually do anything since they don't affect the
sf::Sprite square in CSquare.
Is there any way to solve this nicely or is the ONLY way to use a reference to a sf::RenderWindow and make a function CSquare::Draw();?
Thanks in advance!