SFML community forums
Help => Window => Topic started by: PhiLLe on April 21, 2010, 07:29:11 pm
-
Is there a way to get the style of a window that exists?
I want to check if my window is fullscreen and didn't find a function for that purpose in the documentation.
-
There no GetStyle() function, you must store the style on your side.
-
Is there going to be one one in 2.0 or is there a reason why there is none?
-
Is there going to be one one in 2.0
I don't know, maybe.
is there a reason why there is none?
I don't like the idea of putting a pair of getter/setter for every member of every class. Classes provide services, not data. And one service that a window provides is changing its title. Retrieving it is another service that is much less relevant (in my opinion).
-
I don't like the idea of putting a pair of getter/setter for every member of every class. Classes provide services, not data. And one service that a window provides is changing its title. Retrieving it is another service that is much less relevant (in my opinion).
I see what you mean. My opinion is that a class should have a method to get each member that it can set. It makes everything a lot easier.
Maybe a simple solution would be if the sf::Style would be added to the sf::WindowSettings member of the sf::Window. What do you think?
-
My opinion is that a class should have a method to get each member that it can set. It makes everything a lot easier.
I understand your point of view.
Maybe a simple solution would be if the sf::Style would be added to the sf::WindowSettings member of the sf::Window. What do you think?
No, WindowSettings are all the settings that are related to the OpenGL context (it's called ContextSettings in SFML 2).
If I add it, it will be a Window::GetStyle() function.