Disable specific UI when button pushed

Hi there. Thank you in advance for taking the time to read this. I am building an app where I have buttons taking the player to 5 different screens which have have timelines and animations triggered.

All working well, however, I want to stop the player being able to use the mouse scroll-wheel or press a button (other than ‘6’ which is ‘back’) when they choose buttons 1,2,3,4 or 5.

Let’s say they press ‘2’. They are taken to screen 2 where they need to read some stuff. Buttons ‘1’, ‘3’, ‘4’ and ‘5’ plus the mouse scroll wheel need to be disabled. The only way they should be able to get back to the home screen is by pushing ‘2’ again or ‘6’ (which is back).

I hope all that makes sense.

Here are my events:

1 Answer

1

You’re probably not gonna like this answer but I’d recommend doing everything in code instead of button events. Not only are you going to have a lot more flexibility with what you can do but it’ll also be so much easier to debug and understand what’s going on too. It’ll also be the solution to your problem as you can just set up a bool variable for disabling inputs so I’d highly recommend doing that, especially the more you work on it the more you’ll add and it’ll become a million times more easier

Thank you very much for your response. I suspect you're right. I'm not great at C# but I'll try and get it working through code. I thing I can handle the bool variables for button pushes but do you have any idea how I can disable the mouse scroll wheel using a bool? I'd like to leave this 'unsolved' for now in case someone has an idea how I can achieve the disabling through the button event method.

–