Disabling and enable widgets

I would like to disable widgets, in particular the stepper widget but possibly others too when the user turns on some feature.

i found this thread that suggests overriding the widget library https://forums.coronalabs.com/topic/42642-stepper-and-slider/ but havent tried it. I would hope not to rely on this for forward compatibility.

what are the other possible ways to workaround the lask of disable functionality.

Im not familiar with all of coronas library, but i think i could possibly:

remove/add listeners (i gave it a shot but couldnt figure it out straight away)

adding some sort of mask that hides the widget (but i want it still visble)

what is the most elegant way to do this with multiple widgets on a screen that you want to disable and enable again.

It will take a little work, but make a screen shot of the stepper widget. Go into photoshop and gray it out to give you the disabled look. Draw that image at the same place as the widget. When you disable the stepper, remove it, revealing the “disabled” version below it.

Rob

Thanks for the reply rob and thanks for the idea.

what about this solution? https://forums.coronalabs.com/topic/61723-enable-disable-touch-input-on-picker-wheel/?hl=disable

should this work? i tried it, but the the stepper still receives events, therefore not ‘disabling’ it.

That’s basically the same idea. Mine has the benefit of making it look disabled. But dropping an invisible object on top that steals the touch and tap events is solid.

Rob

Ok, so i got it to work, and i used your idea but just created another rectangle the same size as the event masking shape , set the colour to the same as the background and set alpha to .7 and toggle them as required. thanks for the input Rob.

It will take a little work, but make a screen shot of the stepper widget. Go into photoshop and gray it out to give you the disabled look. Draw that image at the same place as the widget. When you disable the stepper, remove it, revealing the “disabled” version below it.

Rob

Thanks for the reply rob and thanks for the idea.

what about this solution? https://forums.coronalabs.com/topic/61723-enable-disable-touch-input-on-picker-wheel/?hl=disable

should this work? i tried it, but the the stepper still receives events, therefore not ‘disabling’ it.

That’s basically the same idea. Mine has the benefit of making it look disabled. But dropping an invisible object on top that steals the touch and tap events is solid.

Rob

Ok, so i got it to work, and i used your idea but just created another rectangle the same size as the event masking shape , set the colour to the same as the background and set alpha to .7 and toggle them as required. thanks for the input Rob.