31
General / Re: Help with a switch statement
« on: August 06, 2013, 05:52:31 pm »
Ok than tell if this would work as well:
...
switch(event.type){
case sf::Event::Closed:
Window.close();
break;
case sf::Event::KeyPressed:
if(event == sf::Keyboard::Escape){
Window.close();
}
break;
}
switch(event.type){
case sf::Event::Closed:
Window.close();
break;
case sf::Event::KeyPressed:
if(event == sf::Keyboard::Escape){
Window.close();
}
break;
}