Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pop up prompt when user tries to exit main game #10

Closed
puzzud opened this issue Oct 13, 2015 · 0 comments
Closed

Pop up prompt when user tries to exit main game #10

puzzud opened this issue Oct 13, 2015 · 0 comments

Comments

@puzzud
Copy link
Owner

puzzud commented Oct 13, 2015

Right now, pressing Exit in the Game state will immediately kill the state and return the user to the main menu.

Pressing Exit could be an accident. Therefore, we want to pop up a modal prompt dialog asking the user if they really want to exit the game. The user has the options of Yes or No.

In the case of Yes, the user is proceeded to the main menu (as usual).
In the case of No, the user is returned back to game play as the modal prompt is removed.

When the modal prompt is first displayed, a Game state method called setPaused is given the parameter "true". Similarly, when the prompt is removed, setPaused is called with the parameter "false". setPaused should be implemented and it should set a Game state member called paused to "true" or "false". However, that is the limit of this enhancement. It is up to the game logic to determine completely how setPaused behaves and how paused is observed.

puzzud added a commit that referenced this issue Nov 19, 2015
… game play screen and main menu (quitting game).
@puzzud puzzud closed this as completed Nov 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant