Hide/Show toggle elements

Special forum to share and discuss skins for Pano2VR and Object2VR
Post Reply
Lou
Posts: 31
Joined: Wed Oct 04, 2017 4:54 pm

Hide/Show toggle elements

Post by Lou » Sat Jan 05, 2019 3:42 pm

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!

Lou
Posts: 31
Joined: Wed Oct 04, 2017 4:54 pm

Re: Hide/Show toggle elements

Post by Lou » Sat Jan 05, 2019 3:45 pm

Skin attachment:

Lou
Posts: 31
Joined: Wed Oct 04, 2017 4:54 pm

Re: Hide/Show toggle elements

Post by Lou » Sat Jan 05, 2019 3:46 pm

Ok, not sure skin attachement is sending! :?

User avatar
Hopki
Gnome
Posts: 9081
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Re: Hide/Show toggle elements

Post by Hopki » Sat Jan 05, 2019 5:22 pm

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

Lou
Posts: 31
Joined: Wed Oct 04, 2017 4:54 pm

Re: Hide/Show toggle elements

Post by Lou » Sat Jan 05, 2019 5:28 pm

Hi Hopki,

That's great, thanks so much :)

Best,
Lou

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests