Skip to content

Commit

Permalink
Pop all states on Closed event
Browse files Browse the repository at this point in the history
  • Loading branch information
ufrshubham committed Nov 11, 2023
1 parent 111d58c commit 13abc82
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/GameOver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ void GameOver::ProcessInput()
{
if (event.type == sf::Event::Closed)
{
m_context->m_window->close();
m_context->m_states->PopAll();
}
else if (event.type == sf::Event::KeyPressed)
{
Expand Down
2 changes: 1 addition & 1 deletion src/GamePlay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ void GamePlay::ProcessInput()
{
if (event.type == sf::Event::Closed)
{
m_context->m_window->close();
m_context->m_states->PopAll();
}
else if (event.type == sf::Event::KeyPressed)
{
Expand Down
2 changes: 1 addition & 1 deletion src/MainMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ void MainMenu::ProcessInput()
{
if (event.type == sf::Event::Closed)
{
m_context->m_window->close();
m_context->m_states->PopAll();
}
else if (event.type == sf::Event::KeyPressed)
{
Expand Down
2 changes: 1 addition & 1 deletion src/PauseGame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ void PauseGame::ProcessInput()
{
if (event.type == sf::Event::Closed)
{
m_context->m_window->close();
m_context->m_states->PopAll();
}
else if (event.type == sf::Event::KeyPressed)
{
Expand Down

0 comments on commit 13abc82

Please sign in to comment.