Hey
first at all, I´m new at programming and total new on programming with an API.
My first steps with SFML were very comfortable, it´s really easie to load some sprites, etc. But now I thought I could write the sf::Image, or sf::String function in a class, to make my source more clearly.
I read some post in the forum and came to a solution
class CSprite
{
public:
sf::String string;
virtual void Render(const sf::RenderWindow &Window) const
{
Window.Draw(string);
}
};
The main function
CSprite sprite;
And what now?
How should the render function look like?
sprite.Render(Window);
/* ??? */
And what is the best option to set the parameters?
Sorry for the many questions but I´ve never worked with an API befor and I spent a lot of time infront of my screen but I didn´t get a result :?
So are my ideas possible, or how would you handle this situation?