-
Notifications
You must be signed in to change notification settings - Fork 6
blur and focus fix for pausing game #5
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
blur and focus fix for pausing game #5
Conversation
src/container/plugins/PausePlugin.js
Outdated
| this._paused = paused; | ||
|
|
||
| if (this.client) | ||
| if ((this.client) && (!!this._disablePaused)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this if statement needs to be wrapping all the contents of the set function for the disable of pause to work properly... as if it is not it will still change the pause button state and still show the pause overlay
|
|
||
| if (this.client) | ||
| if (this._disablePause) | ||
| { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this line of code needs an exclamation mark in the front of it as the disable functionality is working backwards
|
👍 Looks good to me |
| this._isManualPause = false; | ||
|
|
||
| /** | ||
| * If the current application is paused |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_disablePaused -> _disablePause
|
@andrewstart good catch! thanks! |
|
This looks pretty good. I would suggest documenting the addition of |
|
Added documentation in the FeaturesPlugin for the |
|
Merged. |
If the disablePause parameter is set in the game, the container should not emit the pause event.