Page 1 of 1

Hide/Show toggle elements

Posted: Sat Jan 05, 2019 3:42 pm
by Lou
Hi Hopki,

I've set 3 buttons to open up a single box each but when I hit the next button, the previous box remains visible?

Is there a way to set it so when a different button is clicked, the others will hide?

Please see attached skin.

Many thanks!

Re: Hide/Show toggle elements

Posted: Sat Jan 05, 2019 3:45 pm
by Lou
Skin attachment:

Re: Hide/Show toggle elements

Posted: Sat Jan 05, 2019 3:46 pm
by Lou
Ok, not sure skin attachement is sending! :?

Re: Hide/Show toggle elements

Posted: Sat Jan 05, 2019 5:22 pm
by Hopki
Hi Lou,
I would use a numbered variable.
So in the skin set a numbered variable starting with 0.
All the popups will have visible deselected so all hidden.
In the first popup use a visible logic block that when the variable = 1 visible is true.
The second popup will have the visible logic block that when the variable = 2 visible is true.
And so on, so you can have as many popups as you want.

The open popup button will have the action: mouse click, set variable value, 1.
So popup 1 will show. To hide you have a close button, this has the logic block, mouse click, set variable value to 0.

Of course if 1 is open, changing the variable to 2 will hide 1 and show 2.
Regards,
Hopki

Re: Hide/Show toggle elements

Posted: Sat Jan 05, 2019 5:28 pm
by Lou
Hi Hopki,

That's great, thanks so much :)

Best,
Lou