Hello, I'm a complete SFML rookie so I've been reading through the tutorials on the site.
I've got to the one that talks about using events to close the window and I've copied the code exactly.
This is the bit that handles the events:
sf::Event Event;
while (App.GetEvent(Event));
{
if (Event.Type == sf::Event::Closed)
App.Close();
if ((Event.Type == sf::Event::KeyPressed) && (Event.Key.Code == sf::Key::Escape))
App.Close();
}
The program runs fine and closes properly when I press the X but pressing escape does nothing.
I tried F5 because that was a key given in another example and it worked! Also, none of the letter keys work but the arrow keys do. It seems strange that some work and some don't.
I'm probably missing something really obvious but if anyone can help me solve this it would be much appreciated.
Thanks!