Hewo! So I am currently working on a game and i just found out how to slide the pause menu screen over ontop the current screen successfully, but there are button beneath this menu which can still be clicked while the menu is on top. Is there anyway to disable the click through or disable those buttons for the time the menu is ontop of it? (screenshots attached)
Thanks
Most easy solution is to put each menu layer on well different layer
OR make them visible/invisible depending on which menu layer (not game layer) you wanna see
And now you use that as condition to allow or disallow objects being clicked
Look here
You can click settings button in upper right
But as soon as you click it and see sliders
You cannot interact with reset button in upper left
Same as if base layer is visible you cannot interact with sliders or AI opponent toggle
(Base layer is one where you see board)
Same as you cannot interact with board when base layer is not visible
And all i do to achieve that is disable button behavior based on some variable i made
Thanks for your detailed reply! So basically just add the buttons underneath the menu to a seperate layer and then hide that layer when the menu comes ontop of it?
You CAN hide/show individual objects per whatever
But then you need to specify each object for certain scenario
For example i could go with
Show music slider
Show sound slider
Show toggle AI text
Which are 3 actions
Or i could simply go (as i did)
Show Settings layer
Which is one action
Imagine if i have more crap in settings layer
I would need to use more actions to show/hide stuff
So i say going with layer is most optimal solution
THEN you can control it by simply checking if one layer is visible to hide other layers
Or go with variables
And now depending on if SOME layer is visible you allow or not allow some objects to be interacted with
In testing this out, all your steps work except for the fact that multitoucbutton behavior is for touch screen inputs only. Is there a way to do this same set up for clicks as this will be a pc game?
So after converting them into button objects and do as you said, it still lets me click the buttons even tho the layer is hidden and the button are supposely not able to be interacted with… Any help would be great, as this is confusing me lol
If you are using “Cursor touch is on object” for all your conditions of making the buttons do things, then Activating or Deactivating interactions with the buttons is not going to do anything. Because you are not using the built in interactions for the buttons, you are just using regular “cursor on object”. The button interactions are called “Is Clicked” as in “Pause button is clicked”.
If you are using “is clicked” elsewhere I apologize, I was just looking at the events shown. In that case something must be interfering with hiding the layer. I tried it with button (panel sprite) objects and hiding/showing an empty layer and it worked.
That seemed to fix it! Thank you so much for your help! I was so used to sprite buttons with animations I wasn’t quite sure how the button objects worked.