Image-stitching and virtual tour solutions My account Updates
It is currently Wed Oct 01, 2014 7:03 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Tue Aug 05, 2014 9:51 pm 
Offline
Member
User avatar

Joined: Mon Jun 25, 2012 11:17 am
Posts: 19
Location: Brazil | Londrina
I have a tour with several types of hotspots, for example, A and B type

I wish I could create a button, not one that is in control bar, a side button, in order to show/hide only the hotspot group that I want.

I think programming in XML code is the way to go, but I'm no an expert in XML code. Could anyone help me how to modify the XML code to do that?

Regards,

Akio


Top
 Profile  
 
PostPosted: Wed Aug 06, 2014 10:34 am 
Offline
Member
User avatar

Joined: Tue Apr 09, 2013 10:59 am
Posts: 2349
Location: France
If type A and B are differents styles into the Style view you can do something like that. This demo is done only for one single scene some other things must be done to transit the button state on different scenes.

- Open the file YourTourdata/YourTour_skin.xml

- Look after the styles names of each kind of spot into xml (in the beginning part of the file).
For instance <style name="IconDefaultPointSpotStyle1" ... />

- Add a toggle button with Interface > Hide Hotspots and Interface > Show Hotspots actions

- Edit YourTourdata/YourTour_skin.xml to change the code of the new button added :

Edit change this kind of code
Code:
<action name="togglebuttonOnClick">
    if (state,
      set(state, false);hideHotspots();
      set(url,%FIRSTXML%/graphics/togglebutton/image1.jpg);
     ,
      set(state, true);showHotspots();
      set(url,%FIRSTXML%/graphics/togglebutton/image2.jpg);
    );
  </action>


Into this
Code:
  <action name="togglebuttonOnClick">
    if (state,
      set(state, false);
      for(set(i,0), i LT hotspot.count, inc(i),
        if(hotspot[get(i)].style == 'IconDefaultPointSpotStyle1',
          set(hotspot[get(i)].visible, false);
        );
      );
      set(url,%FIRSTXML%/graphics/togglebutton/image1.jpg);
     ,
      set(state, true);
      for(set(i,0), i LT hotspot.count, inc(i),
        if(hotspot[get(i)].style == 'IconDefaultPointSpotStyle1',
          set(hotspot[get(i)].visible, true);
        );
      );   
      set(url,%FIRSTXML%/graphics/togglebutton/image2.jpg);
    );
  </action>


Do the same for others spots styles.

It's the idea.

_________________
Benjamin
http://www.kolor.com


Top
 Profile  
 
PostPosted: Wed Aug 06, 2014 1:42 pm 
Offline
Member
User avatar

Joined: Mon Jun 25, 2012 11:17 am
Posts: 19
Location: Brazil | Londrina
Thanks Benjamin, I really appreciate your help.

Yesterday, I was trying to find by myself and I actually found were to change, but a very very hard way. Had to change the main.xml, main_skin.xml and main_core.xml, as you can see, the way you show me, is easier than mine, and faster.

Thanks


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group