Dylan M

  • Content count

  • Joined

  • Last visited

  1. Hello all. I am having a browser-specific issue with Phaser 2.10.0 that I cannot seem to understand. I have the following code for a button. minDimension = Math.min(game.width, game.height); resetButton = game.add.sprite(game.width * 0.5, game.height * 0.925, 'Reset'); resetButton.anchor.setTo(0.5, 0.5); resetButton.width = resetButton.height = minDimension * 0.075; resetButton.inputEnabled = true; resetButton.events.onInputDown.add(resetProcess, this); This puts a reset button image at the middle of the bottom of the browser window. As expected, when clicked or tapped, the resetProcess() function is called and the level in my game is reset. This works as expected in most browsers on desktop and mobile; however, in Android Chrome (in my case, Android 7.0.0 and Chrome 64.0.3282.137) the button appears but does not do anything when clicked. I verified that the issue is not in my resetProcess() function. It seems that the onInputDown event isn't working properly. I also tried the following code, using a button instead of an image. minDimension = Math.min(game.width, game.height); resetButton = game.add.button(game.width * 0.5, game.height * 0.925, 'Reset', resetProcess, this); resetButton.anchor.setTo(0.5, 0.5); resetButton.width = resetButton.height = minDimension * 0.075; This caused behavior identical to the snippet above. Previously, a few months ago, I was able to get my button working as expected no matter the browser, and no changes were made to this part of my code since then. Does anyone have any thoughts as to what might be causing this issue, and how to fix it? Thanks.