SFML community forums
Help => Graphics => Topic started by: evil_twinkie on January 26, 2011, 11:38:07 pm
-
On Event::Resized (when someone clicks and drags the corner of the App window to be smaller/larger) all of my sprites and shapes get smaller/larger respectively. Is there a way that I can disable this from happening? I'm running an OpenGL visualization with sprites that make up my menu.
My code is a bit intricate to post right now, but later I can put together an example to better illustrate my question. Thanks for the help.
-
you could change the window view to the new size.
-
Nice, that did the trick! Thank you.
Here's the code I added:
static sf::View view;
sf::FloatRect rect(0, 0, newWidth, newHeight);
view.SetFromRect(rect);
App.SetView(view);