2021-04-08 06:55 AM
I would expect obscured controls to not respond to clicks.
Solved! Go to Solution.
2021-04-09 12:40 AM
What I do usually is to add an empty container widget and enable the ClickListener ability in the setting tabs of the widget under "mixin". When I want the buttons to be clickable again I set the container to "non visible" in code. I'll attach an example I gave recently to another user if someone else finds this post in the future and wants another solution.
/Romain
2021-04-08 07:22 AM
If I just need to deactivate the button, I use button.isToucheble (false) and make it more transparent with button.setAlpha (x)
In my experience only modal window obscures other widgets. I have not been able to make a modal window of custom size to obscure only certain widgets on the screen. However, it is possible to put those widgets and/or modal window in a separate container and then add it to the screen.
2021-04-08 07:28 AM
Thanks, unfortunately there are a whole load of buttons under the box that I want to prevent being clicked (I'm kind of doing a modal thing). I've come up with a kludge where from back to front I have buttons I don't want activated, a big blocking button that fills the screen, buttons I do want activated. The big blocking button is a flexButton with only a text element and the text is a space so it is invisible and invisibly consumes any clicks that would pass through to the buttons below.
2021-04-08 11:08 AM
In MIXINS for Box check "ClickListener" to add event and do not implement.
2021-04-09 12:40 AM
What I do usually is to add an empty container widget and enable the ClickListener ability in the setting tabs of the widget under "mixin". When I want the buttons to be clickable again I set the container to "non visible" in code. I'll attach an example I gave recently to another user if someone else finds this post in the future and wants another solution.
/Romain