whitebeard86 Posted December 17, 2013 Share Posted December 17, 2013 I want to know how I can remove the auto start (while on pause) when there is a mouse click (or other possible alternative). Problem Example:I have a div that appears when I pause the game. When I try to click on the div options, the game automatically resumes. Thanks for the support. Link to comment Share on other sites More sharing options...
rich Posted December 17, 2013 Share Posted December 17, 2013 I don't fully get what you want, but I think this should do it?// Phaser will automatically pause if the browser tab the game is in loses focus. You can disable that here:this.game.stage.disableVisibilityChange = true; Link to comment Share on other sites More sharing options...
whitebeard86 Posted December 17, 2013 Author Share Posted December 17, 2013 No, not that Take this example:The game is running and then I set (paused = true), the game pauses.Then, If I do a mouse click the game automatically unpause. I want to prevent the game from unpause when there is a mouse click. Thanks. Link to comment Share on other sites More sharing options...
rich Posted December 17, 2013 Share Posted December 17, 2013 Can you fix your example link / code please (doesn't show anything here). Link to comment Share on other sites More sharing options...
whitebeard86 Posted December 17, 2013 Author Share Posted December 17, 2013 I can show you the game actually http://www.wi2play.com/games/santa/Click on the "Add Your Photo" button (top left). When you click, the game pauses but when you try to click in one of the buttons from the div, the game automatically starts. I want to prevent that because I only want the game to run when the div is closed. Thanks. Link to comment Share on other sites More sharing options...
rich Posted December 17, 2013 Share Posted December 17, 2013 Look in src/input/Pointer.js and search for this bit: // Fix to stop rogue browser plugins from blocking the visibility state eventThen comment out the check below it. Link to comment Share on other sites More sharing options...
whitebeard86 Posted December 18, 2013 Author Share Posted December 18, 2013 Look in src/input/Pointer.js and search for this bit: // Fix to stop rogue browser plugins from blocking the visibility state eventThen comment out the check below it. Thanks for the info If possible, this should be configurable in the game settings. Link to comment Share on other sites More sharing options...
rich Posted December 18, 2013 Share Posted December 18, 2013 Yes it's added in 1.1.4 so that if you have disableVisibilityChange set to true it will not resume the game. Link to comment Share on other sites More sharing options...
Recommended Posts