tembac Posted June 28, 2017 Share Posted June 28, 2017 Is it possible to make a button input that ignores the transparent area of the image? I have several buttons on the same position and the transparent areas overlaps so it is not allowing me to press the buttons on the bottom. Link to comment Share on other sites More sharing options...
tembac Posted June 28, 2017 Author Share Posted June 28, 2017 I tried with pixelperfect = true but I can't press the buttons that are behind the transparent areas. Link to comment Share on other sites More sharing options...
tembac Posted June 29, 2017 Author Share Posted June 29, 2017 Solved! I need to use pixel perfect for click and for over. var btnFigura = new Phaser.Button(this.game, x, y, 'figura01UiImg', this.btnFiguraOnClick, this, "Figura01__" + pieceName + "_normal", "Figura01__" + pieceName + "_normal", "Figura01__" + pieceName + "_selected", "Figura01__" + pieceName + "_normal"); btnFigura.colorPiece = colorPiece; btnFigura.input.pixelPerfectClick = true; btnFigura.input.pixelPerfectOver = true; this.add(btnFigura); jpdev 1 Link to comment Share on other sites More sharing options...
Recommended Posts