Same hotspot template but different actions

Special forum to share and discuss skins for Pano2VR and Object2VR
Post Reply
nidrig
Posts: 27
Joined: Wed Aug 22, 2018 11:39 am

hi,

Sorry if this question has been asked before, but I couldn't find any answer.

The situation:

I have several hotspots which share the same hotspot template (all have the same icons).
But for each hotspot, I need to do a different action (open a different popup) window.

How to achieve this?

Do I need to create a new hotspot template for each? (currently, the action which opens the popup is coded in the hotspot template).
Or is there a way to trigger a different action depending on which hotspot has called the template (since we have the hotspot ID)?

Thanks in advance.
User avatar
Hopki
Gnome
Posts: 13005
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi nidrig,
Normally hotspot template use placeholders that fetch data as set in the hotspot editor.
Example the title uses a text box with the placeholder $(hs).
This reads the title text entered in the hotspot so each can be different.
Of course it does depend on what the hotspot will do, example in the simplex_v6 skin you will see hotspot that do different tasks, one for images, this one hotspot can open many different images but not be used to change nodes.
Please see this page.
Regards,
Hopki
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
nidrig
Posts: 27
Joined: Wed Aug 22, 2018 11:39 am

Thanks for your reply.

How to retrieve the hotspot ID in the skin editor? I couldn't find it in the placeholders.
User avatar
Hopki
Gnome
Posts: 13005
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi,
Not sure I understand.
Why you asking?
Regards,
Hopki
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
nidrig
Posts: 27
Joined: Wed Aug 22, 2018 11:39 am

hi,
Because I need to know which hotspot triggered the template, as each one will display a different gui element. But I was able to achieve this another way.

Out of curiosity, what use is the hotspot ID? can we access it?
User avatar
Hopki
Gnome
Posts: 13005
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi,
The Hotspot ID can be used with a skin elements Hotspot Proxy ID.
This is good for Poly hotspots but also works with point hotspots.
Example, to show and hide a rectangle.

Add a rectangle to the skin, of course this can also be an image or any other element.
Under the rectangles properties you will see a text field called Hotspot Proxy ID, enter say "popup".
Deselect visible and give it the action: mouse click, toggle visibility, $self.


Now add a hotspot, change the ID to "popup".
This will now add a link between the hotspot and rectangle in the skin, when you click the hotspot it will be like clicking the rectangle, which means it will show and hide.

Regards,
Hopki
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
nidrig
Posts: 27
Joined: Wed Aug 22, 2018 11:39 am

Thanks! Somehow that's what I was looking for! :)
Post Reply