Hi to all,
Is there a way to use something like if then else in coding ?
I have two variables called :
_tooltip = true/false
_tooltip_txt = txt
When the mouseEnter an icon, I set the txt of the var _tooltip_txt to what I want
Then, the field show the txt of the variable _tooltip_txt
No problem until here.
What I try to find out is how I show or hide the tooltip field depending of the state of the var _tooltip
True I show the field, false I hide the field.
I suppose I must put a condition but where ?
That's my question
I suppose it can be easy for some of you, so forgive me because I'm really new to pn2vr !
Regards,
if then else in pn2vr ?
- dePassage66
- Posts: 86
- Joined: Mon Mar 20, 2023 11:19 am
- Attachments
-
- Capture d'écran 2023-10-11 215857.gif (68.8 KiB) Viewed 1758 times
pour Visites Guidées Panoramiques https://www.visitespanoramiques.com/index.html
(sorry, no translation available yet!)
(sorry, no translation available yet!)
Hi,
Basically you need to add some logic blocks to manage the visibility of the tooltips.
I've put together a small project that illustrates the use of the logic blocks. You can see the output here https://p2vr.s3.ap-southeast-2.amazonaw ... index.html
I've used your variable names and added a button that toggles the _tooltip variable. You can see the use of the Visible logic block in the next screenshot.
I've also exposed the variable in the Edit Skin Configuration
You can download the project here https://p2vr.s3.ap-southeast-2.amazonaw ... ooltip.zip
Regards,
Tony
Basically you need to add some logic blocks to manage the visibility of the tooltips.
I've put together a small project that illustrates the use of the logic blocks. You can see the output here https://p2vr.s3.ap-southeast-2.amazonaw ... index.html
I've used your variable names and added a button that toggles the _tooltip variable. You can see the use of the Visible logic block in the next screenshot.
I've also exposed the variable in the Edit Skin Configuration
You can download the project here https://p2vr.s3.ap-southeast-2.amazonaw ... ooltip.zip
Regards,
Tony
Tony Redhead | Panoramic Photographer | mobile: +61438501002 | website: https://tonyredhead.com - https://redsquare.com | Pano2VR Tutorials: https://tonyredhead.com/pano2vr | instagram: https://www.instagram.com/tonyredhead/
- dePassage66
- Posts: 86
- Joined: Mon Mar 20, 2023 11:19 am
Thank you very much Tony for this tutorial!
I didn't imagine the hierarchy of objects in this way but it's very interesting to explore further.
I understood that the sign Not(sign) means toogle, finally.
And not only that
Have a good day,
Regards,
I didn't imagine the hierarchy of objects in this way but it's very interesting to explore further.
I understood that the sign Not(sign) means toogle, finally.
And not only that
Have a good day,
Regards,
- Attachments
-
- Capture d'écran 2023-10-12 102117.png (27.13 KiB) Viewed 1743 times
pour Visites Guidées Panoramiques https://www.visitespanoramiques.com/index.html
(sorry, no translation available yet!)
(sorry, no translation available yet!)