Page 1 of 1

Show / hide hotspot button

Posted: Fri Feb 08, 2019 5:04 am
by edgar_ali
[bt][/bt]Has anyone got an SVG button for hide/show hotspots?..

I would like to add that action to my skin however I do not have an SVG button...

How can I start creating SVG files?...what software should I used?

Re: Show / hide hotspot button

Posted: Sat Feb 09, 2019 2:09 pm
by Tony
How can I start creating SVG files?...what software should I used?
Inkscape and Illustrator are two software programs that create SVG files.

Inkscape: Free and available at https://inkscape.org/ Tutorial: https://youtu.be/SeJhexpT408

Illustrator: Part of Creative Cloud and not free, available at https://www.adobe.com/au/products/illustrator.html Tutorial: https://youtu.be/R0mepffwmt4

Tony

Re: Show / hide hotspot button

Posted: Tue Feb 12, 2019 4:30 am
by edgar_ali
Tony:

Thanks for that advice. I went and installed inskape and was able to create an SVG. I also realised that there is a site called www.iconfinder.com where you can find basic SVG files.

Now that I have created the SVG file I was looking at the video of how to show/hide hotspots using true/false variables:

https://ggnome.com/doc/pano2vr/6/skin-p ... -variables

In my tour I have polygon hotspots that provides information:
https://tonyredhead.com/pano2vr/polygon-hotspots-proxy

So I am trying to apply the true/false variable in my skin to create a button that show/hide the polygon hotspots aforementioned.

One of the issues that I am finding is that in the videos where they explain how to set the true/false variable to show/hide the hotspots, they use two buttons, however I want to use just one button to show/hide the hotspots.

The other thing that I am struggling to understand is whrere to set the actions for the button...since in my case I got a container with the following actions for the polygons:


<action>
<source>over</source>
<type>setalpha</type>
<actionvalue>1.0000</actionvalue>
<actiontarget>tooltip_poly</actiontarget>
<actiontransitiontime>0</actiontransitiontime>
</action>


<action>
<source>click</source>
<type>settext</type>
<actionvalue>$(hd)</actionvalue>
<actiontarget>info_text_body_poly</actiontarget>
<actiontransitiontime>0</actiontransitiontime>
</action>

<action>
<source>click</source>
<type>setvariablevalue</type>
<actionvalue>0</actionvalue>
<actionvalue2>true</actionvalue2>
<actiontarget>vis_info_popup</actiontarget>
<actiontransitiontime>67125272</actiontransitiontime>
</action>

<action>
<source>leave</source>
<type>setalpha</type>
<actionvalue>0.0000</actionvalue>
<actiontarget>tooltip_poly</actiontarget>
<actiontransitiontime>67125272</actiontransitiontime>
</action>
</actions>

Re: Show / hide hotspot button

Posted: Tue Feb 12, 2019 6:45 am
by edgar_ali
I tried doing what is explained in this post:

viewtopic.php?f=6&t=11409&p=47024&hilit ... ges#p47024

but got lost in the part where I have to assigned the actions to the hotspot template

I'm attaching my attemp...if possible check it out and give me a hand

Re: Show / hide hotspot button

Posted: Tue Feb 12, 2019 7:28 pm
by Hopki
Hu,
Please see project attached.
How it works:
In the skin I added a variable: vis_hotspot
Both Node and Image Hotspot templates have a visible logic block set so when the variable is set to false they hide.
The two buttons change the variable between true and false.
The variable is also swopping the buttons so you see the correct button.
Regards,
Hopki

Re: Show / hide hotspot button

Posted: Wed Feb 13, 2019 5:45 am
by edgar_ali
Hopki:

Thanks for replying...

I created the same variable in the skin : vis_hotspots initial value: true

I created the two buttons and when preview they change colors (show/hide)

However I have not been able to make the hotspots show or hide...

One different with my template is that I am using polygon hotspots that show information:
https://tonyredhead.com/pano2vr/polygon-hotspots-proxy

These polygons hotspot are the one that I want to show/hide

So not sure how to make these hotspots to show or hide...

In your template (example) you use the logic block of the element ro assign the action, in my case i’ve Got a container and I’m not sure if I need to assign the action to the logic block of the container or within the actions of the container

Currently the polygon hotspots show/hide when the mouse hover over the hotspots and also when you click on the polygon...

If we install these buttons, that hovering function could be deleted...

I'm attaching the skin, if you can have a look at it, that would be great.

Re: Show / hide hotspot button

Posted: Wed Feb 13, 2019 4:11 pm
by Hopki
Hi,
Ahhh Poly Hotspot, now that's different.
Ignore all of the above, remove variable etc.

In the button to hide the poly hotspots:

Source: Mouse Click
Action: Player Settings
Type: Change Poly Mode
Mode: Always Hidden
Then you would have an action to mouse click hide self and then mouse click show the other button.

Then in the Show Poly button...

Source: Mouse Click
Action: Player Settings
Type: Change Poly Mode
Mode: Always Visible
Then have the actions to swop the buttons again.

Regards,
Hopki

Re: Show / hide hotspot button

Posted: Thu Feb 14, 2019 1:50 am
by edgar_ali
Hopki:

Thanks for your reply...

I'm almost there...the buttons are showing and hiding the poly hotspots, however I came across the following issues:

At the very first moment when you launch the tour, the very first click in button (show/hide poly spot) does not do anything..you have to click it again...

After you click for the first time then the buttons work normally....this behavior only happens for the very first click after you launch the tour..Then it works normally...

My configuration is like this:
Image

Image

My other issue is that before I set up the show/hide buttons I had configured the poly hotspot to have a tooltip (meaning a text box) that would show whenever the user hover with his mouse over the poly hotspot. Now that setting is not working..any suggestions:

My configurations is:
Image

Image

I'm also attaching the skin just in case.

Re: Show / hide hotspot button

Posted: Thu Feb 14, 2019 5:29 pm
by Hopki
Hi,
Tested with Mac with Chrome, Firefox and Safari and all working as should with no need to double click to hide.
I did notice that you have both buttons visible, the show poly button needs its visible deselected.
As the only button visible should be the hide poly.
Which browser are you using?
Regards,
Hopki

Re: Show / hide hotspot button

Posted: Fri Feb 15, 2019 3:29 am
by edgar_ali
Hopki:

I deselected the visible in show poly and tested in Chrome, firefox and Opera, using Windows 10 pro, however The issue of double clicking at the beginning still persist. as you can see in this video, it is at the second click that the hotspot appears

https://vimeo.com/317388248


I also tested it in safari, using MAC and still got the same result...

You reckon it's got something to do with the trial version?