Hi, I am developing a simple infinite runner game. There are 3 windows (Start, Game and GameOver). On the GameOver window there is a Replay button. The user is supposed to use this to restart the game. The issue is, the user is able to click/touch anywhere on the screen to restart the game. I don’t want it this way. The user should be able to click/touch only on the Replay button area to restart the game.
The method I have used for this button is quite simple. It just toggles activity of the panels and somehow it’s getting applied to the whole screen instead of only this Replay button.
One more thing - The same method is working properly on Start Screen where the Play button is. There are two buttons (i.e. Start game and mute) on Start screen whereas there is only one button on GameOver Screen (i.e. Replay)
I am not much of a coder and I almost checked 100 questions on this forum but couldn’t find the answer. I would really appreciate if you come up with a solution.