I'm porting one of my old projects to sfml 2.0, and I had a background that I scaled using
Now, it seems like
setSize has ben removed in 2.0, and I'm wondering what the intended replacement is.
I know there is a
setScale function, and that I could do something like:
auto size = sprite.getTexture()->getSize(); sprite.setScale(float(windowWidth)/size.x, float(windowHeight)/size.y);
but I think this is really ugly and clunky, is there another way to do it?