Hello,
First of all I would like to say that I'm pretty bad at english.
But anyway, the problem is I would like to pause my game, but it doesnt really works what I've now.
while(App.GetEvent(event))
{
if((event.Type == sf::Event::KeyReleased) && (event.Key.Code == sf::Key::P))
{
gamePause = true;
while(gamePause == true)
{
std::cout << "GAME PAUSED" << std::endl;
//delay before able to unpause
if(timer.GetElapsedTime() > 1)
{
if((event.Type == sf::Event::KeyReleased) && (event.Key.Code == sf::Key::P))
{
gamePause = false;
std::cout << "GAME UNPAUSED" << std::endl;
}
}
}
timer.Reset();
}
}
Please Help me, and sorry if this is posted in the wrong board :roll:
It's SFML 1.6 as you will probably notice :wink:
Thanks