Page 1 of 1

Disable a GUI dynamically

Posted: Wed Mar 02, 2022 6:00 pm
by chjan
I want the user to select number of instances of a GUI-containing object.

A GUI object can be set to Visible or Invisible. How do you do the same thing dynamically, i.e. per user action?

Re: Disable a GUI dynamically

Posted: Wed Mar 02, 2022 7:20 pm
by Tepeix
Hi,

Not sure it's the best method but here is one.
Maybe it's better to modify all control with a boolean input and use a selector and a redraw inside them.
But this way the controls could be not modified but just placed in a module.
(Don't know if there's some drawback like loosing time to redraw on base of a ghost v input ??

Edit: Finally i think that the method is ok.
This version is more similar to what is done when modifying one control.
(just connecting nothing to the v selector for the first input us another module)

Re: Disable a GUI dynamically

Posted: Wed Mar 02, 2022 8:14 pm
by RJHollins
That works nice.

Thanks !

Re: Disable a GUI dynamically

Posted: Thu Mar 03, 2022 8:55 am
by chjan
Perfect! I tried something very similar yesterday but did not work. I suspect I forgot the redraw feature. This variant could easily be part of the standard module as I see it. Very handy.

Thanks.