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

[Question] onBlur and onFocus events without game pausing. #911

Closed
j0hnskot opened this issue Jun 15, 2014 · 1 comment
Closed

[Question] onBlur and onFocus events without game pausing. #911

j0hnskot opened this issue Jun 15, 2014 · 1 comment

Comments

@j0hnskot
Copy link
Contributor

This topic http://www.html5gamedevs.com/topic/7178-detect-visibility-change-without-pause/
made me wonder. Is there a specific reason that the onBlur and onFocus events can't be dispatched without dispatching the game.gamePaused event?
If not, shouldn't be a good addition for a method that can set if the game will pause when it loses focus?
for example :
focusLoss: function (event) {

    this.onBlur.dispatch(event);
    if (shouldPause){
        this.gamePaused(event);
    }

},

I offered him a bad patch to let him do his job for now.
Maybe there is something i'm missing and this can already happen.

photonstorm added a commit that referenced this issue Jul 2, 2014
…Stage.disableVisibilityChange is true or false, so you can respond to these events without your game automatically pausing or resuming (#911)
@photonstorm
Copy link
Collaborator

Fair enough, seems like a harmless change so have implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants