Toggle button to show and hide hotspot-images

Q&A about the latest versions
Post Reply
User avatar
panox
Posts: 221
Joined: Mon Mar 12, 2007 11:03 pm
Contact:

Toggle button to show and hide hotspot-images

Post by panox » Mon Nov 07, 2016 10:13 am

The only solution which I got in the German forum was to upload two separate panoramas and to switch from one to the other. The first panorama is showing all the hotspot-images, the second has no hotspot-images.

Is there a better solution?

I wish to have two buttons at the same place, "Show hotspots" and "Hide hotspots". At first, the hotspots in the panorama are hidden. A click on "Show hotspots" sets all hotspots to "visible" and the "Show hotspots"-Button to "hidden". The "Hide hotspot"-Button appears.

The toggle-button is not the problem, but I could not create the hotspot-behaviour.

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

Re: Toggle button to show and hide hotspot-images

Post by Hopki » Tue Nov 08, 2016 8:36 pm

Hi panox,
You would use variables and logic blocks to do this.
Click in an empty area of the skin canvas and add a variable, example ht_show, type: True/False, Init: false.
Stack two buttons on top of each other, one to show the hotspots and one to hide them.

The Show button would be set like so.
Visible selected,
Visible logic block *ht_show = true: Visible: false
Actions: mouse click, set variable value ht_show, Set(=), true

The Hide button would be set like so.
Visible deselected
Visible logic block *ht_show = true: Visible: true
Actions: mouse click, set variable value ht_show, Set(=), false

The hotspot template needs to be set up like so:
Visible deselected
Visible logic block *ht_show = true: Visible: true

Regards,
Hopki

User avatar
panox
Posts: 221
Joined: Mon Mar 12, 2007 11:03 pm
Contact:

Re: Toggle button to show and hide hotspot-images

Post by panox » Thu Nov 10, 2016 3:17 pm

Thank you, Hopki, for your step-by-step advices!

I managed the most but got stuck with the hotspot template:
A hotspot template enables you to add a custom image to a point hotspot. You add the template to your skin and then use a custom image for the template (child of the template). Calling its ID from within the hotspot editor will allow you to assign different images to different hotspots.
Managing a hotspot created in the skin editor is working.

But how can I set the same behaviour to the image-hotspots I created in the workspace area?

This screencast might help understandíng the problem:

http://www.pano.szenerien.de/Camtasia_S ... spots.html

And here is the panorama-example:

http://www.pano.szenerien.de/Camtasia_S ... index.html

The project-file:

http://www.pano.szenerien.de/Camtasia_S ... tspot.p2vr

Thank you in advance! :D

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

Re: Toggle button to show and hide hotspot-images

Post by Hopki » Sat Nov 12, 2016 2:19 pm

Hi Harald,
I glad you made your video as you confused me.
There is a difference between pinned video and images and hotspots.
I see you have got the requested feature working, on a button click you can hide hotspots.
However pinned media can not be hidden, there is a feature request in for this so on the developers radar.
Regards,
Hopki

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

Re: Toggle button to show and hide hotspot-images

Post by Hopki » Sun Nov 13, 2016 2:49 pm

Hi Harald,
To be clear you can not hide and show pinned images or video.
The next image shows what can be hidden and what elements can not, for now.
1.jpg
1.jpg (29.59 KiB) Viewed 1677 times
I have attached a project that uses a modified silhouette.ggsk renamed to Harald.
The skin was saved to the project folder and the unused elements removed, example video_popup_file and the ht_video file template.
The skin also has a variable, hs_hide, True/False, false.

The information button in the skin no longer opens the user data popup which has also been removed but now changes the variable value.
All the hotspot now show and hide on click.
The project also has an information popup which also explains this.

Note the node hotspot remains visible with only information and media hotspot show and hiding.

The text boxes show on mouse hover but can also be visible all the time if need be.
Re Polygon hotspots, Pano2VR can on a button can show and hide poly hotspots and beta 5.1 will also allow different colour polys.
In fact If you use the default colour in the poly hotspot viewer mode you can also change the colours of poly hotspots on a button click.
All these new things will have documentation but for now the beta documents are still being worked on.

Regards,
Hopki
Attachments
Harald.zip
(782.31 KiB) Downloaded 89 times

User avatar
panox
Posts: 221
Joined: Mon Mar 12, 2007 11:03 pm
Contact:

Re: Toggle button to show and hide hotspot-images

Post by panox » Sun Nov 13, 2016 10:35 pm

Thank you, Hopki, for your excellent work! Your support is great and you showed me very elegant ways for my purpose. I am just transferring my content to your example and it is working very good. :D Both thumbs up!

A tiny issue seems to me that the previous image which is exchanged by the following is showing up for milliseconds:

http://www.pano.szenerien.de/Pano2VR_5. ... texte.html

Can this be avoided?

:idea:
I have managed closing the infotext-images by clicking on themselves in order to avoid long mouse-movements to the upper right cormer of the screen.



Best regards

Harald

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests