SFML community forums
Help => Window => Topic started by: Daepilin on June 23, 2013, 04:22:00 pm
-
Hi :)
I was wondering if there is a way to get the current window style?
background is, that i would only want to recreate the window when the style changes (fullscreen to windowed and vice versa) and not always uppon applying my settings.
(atm i just recreate it either with one or the other style, but every time).
if(mSettings->GetFullscreen()){
mMainStateWindow->create(sf::VideoMode(sf::VideoMode::getDesktopMode()), "Test", sf::Style::Fullscreen);
}
else{
mMainStateWindow->create(sf::VideoMode(mSettings->GetXRes(), mSettings->GetYRes(), 32), "Testn", sf::Style::Close);
}
sure, i could have a history of my fullscreen setting but i don't really like that solution.
-
It's fairly simple to figure out on your own. ;)
Go to the documentation, open the overview for the sf::Window class and go over all the function names. Then ask yourself: "Is there a function that sounds similar to getStyle()?"
I've just done it, just to make sure and can now tell you: nope there isn't. :)
It's fairly simple to keep track of the different styling yourself.
-
been there, done that, but i thought i have overseen something^^
guess i have to it this way...