SFML community forums
Help => Window => Topic started by: BMB on December 19, 2011, 03:36:21 pm
-
Why is it that a window created with SFML cannot be closed with the X button in its title bar? And how can I catch this click to make it close?
I am using SFML2 and Windows XP, if it makes a difference.
-
http://www.sfml-dev.org/documentation/2.0/
// Process events
sf::Event event;
while (window.PollEvent(event))
{
// Close window : exit
if (event.Type == sf::Event::Closed)
window.Close();
}
-
http://www.sfml-dev.org/documentation/2.0/
// Process events
sf::Event event;
while (window.PollEvent(event))
{
// Close window : exit
if (event.Type == sf::Event::Closed)
window.Close();
}
Thank you. I must of missed it.