Hello, I am somewhat new to SFML and did not know how (if it is possible) to scale a sprite to the window. For example, my render window uses sf::VideoMode::getDesktopMode()
for the render window, and I have a main menu sprite which I would like to be the same size as the window. What is the best way to go about doing this? I have searched and could not find an answer. I am using the most recent nightly build of SFML 2.0 for MinGW 4.71. Thanks in advance.
Sorry, I guess I didn't phrase that well - I want to know how to get the screen resolution to use (as in, I have the current, but not the wanted). The only way I know to get the resolution is the getDesktopMode function in my previous post, but how would I get two floats for the scale() function from this? How do I just get monitor width/height?
float scaleFactorX = (desktop resolution width)/ 1600;
float scaleFactorY = (desktop resolution height)/ 900;
menu.scale(scaleFactorX, scaleFactorY);
How do I get the width and height?