Thanks for your response.
How will sf::RenderStates states be different?
I know nothing about states...
states.Transform.Translate(GetPosition());
states.Transform.Scale(GetScale());
How does the above two lines work? Is it a SFML thing or just 2. or your own bag of tricks?
sf::Edit() (<-
)
{
Does this look like what you were talking about?
struct Picture : public sf::Drawable
{
bool Load(const std::string filename);
void Draw(sf::RenderTarget& target, /**/sf::RenderStates states/**/) const;
sf::Image Image_m;
sf::Sprite Sprite_m;
};
bool Picture::Load(const std::string filename)
{
if (Image_m.LoadFromFile(filename))
{
Sprite_m.SetTexture(m_Texture);
return true;
}
else
return false;
}
void Picture::Draw(sf::RenderTarget& target, /**/sf::RenderStates states/**/) const
{
states.Transform.Translate(GetPosition());
states.Transform.Scale(GetScale());
target.Draw(m_Sprite, states);
}
}