Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Jgwman

Pages: [1]
1
General / Re: How to make sprite scale with the window?
« on: February 18, 2013, 02:59:20 am »
Sorry, I looked and really didn't see that the first time... I may have been looking at the 1.6 documentation,  also on my computer, by accident. Thanks, and sorry about that!

2
General / Re: How to make sprite scale with the window?
« on: February 18, 2013, 02:15:39 am »
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?

3
General / How to make sprite scale with the window?
« on: February 17, 2013, 10:59:13 pm »
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.

Pages: [1]