You are not logged in.

> The forum rules have been updated. Please take a moment to read them.


#1 2013-02-04 19:47:29

ATXcloud
Member
From: AUSTIN, TX USA
Registered: 2011-06-06
Posts: 75

Button hides/shows all graphics (nav, logos, thumbnail, maps, hotspot)

By chance, does anybody know of xml plugin that would hide all/show all overlaying graphical plugins ( e.g. navigation buttons, logos, stack tumbnails, maps)?

I'm wanting to add a button at the bottom menu bar that clears all the graphics and makes a clean view.

Thank you much for your consideration.

Last edited by ATXcloud (2013-02-04 19:48:59)

Offline

 

#2 2013-02-04 22:50:41

gkaefer
Member
From: Salzburg
Registered: 2009-06-09
Posts: 2711
Website

Re: Button hides/shows all graphics (nav, logos, thumbnail, maps, hotspot)

I did something for navbar only.
I added an extra icon for the function to reduce the navebar.
and same to enlage to normal again.
I did combine it to disable normal and small navbar when intros are displayed.

so if you've time: review sourcecode cool

its easy in concept. but complext to implement for the extra button you create two plugins (in my case) one for minimizing and one for maximizing all other navbar elements:

Code:

    <plugin name="minimize"  
        debug=""
        debug-offset-y=""
        url="$(STYLEDIR)/gigapixel-menu-1a.png"
        width="" 
        height="prop" 
        blendmode="normal"
        keep="true" 
        align="bottom" 
        x="55"    
        y="23" 
        onclick="    closeMenu(); 
                    if(    plugin[soundOFF].visible==false,
                        remove-volumebar()
                        );
                    if(    settings[themevars].use-template-slideshow==true,
                        set(plugin[slideshowStart].visible,true);
                        );
                    "
        crop="320|60|20|20"
        onovercrop="320|260|20|20"
        visible="false"
        enabled="true"
        handcursor=""
        zorder="15"
        scale=""
        onloaded="    set(scale,get(settings[themevars].menu-button-scale));
                    set(handcursor,get(settings[themevars].menu-button-handcursor));
                    set(debug,get(settings[themevars].debug));
                    set(debug-offset-y,get(settings[themevars].debug-offset-y));
                    if(debug == true, add(y,y,debug-offset-y));
                    "
    />
    <plugin name="maximize"
        debug=""
        debug-offset-y=""
        url="$(STYLEDIR)/gigapixel-menu-1a.png"
        width="" 
        height="prop" 
        blendmode="normal"
        keep="true"
        align="bottom"
        x="0"
        y="2"
        onclick="openMenu();if(plugin[soundOFF].visible==true,add-volumebar());"
        crop="0|1200|180|50"
        onovercrop="0|1250|180|50"
        ondowncrop="0|1300|180|50"
        visible="false"
        enabled="true"
        handcursor=""
        zorder="20"
        scale=""
        onloaded="    set(scale,get(settings[themevars].menu-button-scale));
                    set(handcursor,get(settings[themevars].menu-button-handcursor));
                    set(debug,get(settings[themevars].debug));
                    set(debug-offset-y,get(settings[themevars].debug-offset-y));
                    if(debug == true, add(y,y,debug-offset-y));
                    "
    />

the interesting lines are the onloaded="..." statements, where I did implement a routine named openMenu() and closeMenu(). These routines look like:

Code:

    <action name="closeMenu">
        set(plugin[sound-maximize].visible,false);
        set(plugin[helpScreen].visible,false);
        set(plugin[helpScreen].visible,false);
        set(plugin[helpScreenEN].visible,false);
        set(plugin[helpScreenDE].visible,false);
        set(plugin[helpScreenAT].visible,false);
        set(plugin[helpLangFR].visible,false);
        set(plugin[helpLangEN].visible,false);
        set(plugin[helpLangDE].visible,false);
        set(plugin[helpLangAT].visible,false);
        set(plugin[helpScreenReplayFR].visible,false);
        set(plugin[helpScreenReplayEN].visible,false);
        set(plugin[helpScreenReplayDE].visible,false);
        set(plugin[helpScreenReplayAT].visible,false);
        set(plugin[helpScreenReplayBUTTON].visible,false);
        selectskin(false);
        set(plugin[soundON].visible,false);
        set(plugin[soundOFF].visible,false);
        set(plugin[in].visible,false);
        set(plugin[out].visible,false);
        set(plugin[left].visible,false);
        set(plugin[up].visible,false);
        set(plugin[autorotationON].visible,false);
        set(plugin[autorotationOFF].visible,false);
        set(plugin[down].visible,false);
        set(plugin[right].visible,false);
        set(plugin[openfs].visible,false);
        set(plugin[closefs].visible,false);
        set(plugin[home].visible,false);
        set(plugin[info].visible,false);
        set(plugin[minimize].visible,false);
        set(plugin[maximize].visible,true);
        delayedcall(0.5,tween(plugin[maximize].alpha,0.4,3.0));
    </action>

    <action name="openMenu">
        delayedcall(0.0,tween(plugin[maximize].alpha,1.0,0.5));
        switch(    openmenu-temp,
                helpScreen,helpScreenFR,helpScreenEN,helpScreenDE,helpScreenAT,helpLangFR,helpLangEN,
                helpLangDE,helpLangAT,helpScreenReplayFR,helpScreenReplayEN,helpScreenReplayDE,
                helpScreenReplayAT,maximize,helpScreenReplayBUTTON);
        loop(    get(openmenu-temp),set(plugin[get(openmenu-temp)].visible,false));
        selectskin(true);
        <!-- next 9 lines: to create an switch like above DOES NOT work, but why not? -->
        set(plugin[in].visible,true);
        set(plugin[out].visible,true);
        set(plugin[left].visible,true);
        set(plugin[up].visible,true);
        set(plugin[down].visible,true);
        set(plugin[right].visible,true);
        set(plugin[home].visible,true);
        set(plugin[info].visible,true);
        set(plugin[minimize].visible,true);
        if(    plugin[data].soundOn==true, 
            set(plugin[soundOFF].visible,true); set(plugin[soundON].visible,false);,
            set(plugin[soundOFF].visible,false); set(plugin[soundON].visible,true));
        if(    autorotate.enabled==false,
            set(plugin[autorotationOFF].visible,false); set(plugin[autorotationON].visible,true),
            set(plugin[autorotationOFF].visible,true); set(plugin[autorotationON].visible,false));
        if(    fullscreen==false,
            set(plugin[openfs].visible,true); set(plugin[closefs].visible,false),
            set(plugin[openfs].visible,false); set(plugin[closefs].visible,true));
        set(plugin[maximize].visible,false);
        if(    plugin[slideshowSTART].visible==true,
            set(plugin[slideshowSTART].visible,false);
            );
        if(    plugin[slideshowSTOP].visible==true,
            set(plugin[slideshowSTOP].visible,false);
            );
        if(    plugin[debug].action-openMenu == true,
            showlog();
            trace('--- action: ',%0,' ---');
            trace('plugin[data].soundOn is: ', get(plugin[data].soundOn)); 
            trace('autorotate is:           ', get(autorotate.enabled)); 
            trace('fullscreen is:           ', get(fullscreen)); 
            );
    </action>

and here interesting are the lines "set(plugin[out].visible,false);" to make the zoom out button invisible or "set(plugin[left].visible,true);" to make the left button visible again ... this has to be done for all buttons of navbar and also can be done with the pulldownmenu, the stackmenu and all other ptp features...

online example with above code: http://www.gigapixel.at/test2/build.html

Georg

Last edited by gkaefer (2013-02-04 22:56:05)

Offline

 

#3 2013-02-05 00:33:08

ATXcloud
Member
From: AUSTIN, TX USA
Registered: 2011-06-06
Posts: 75

Re: Button hides/shows all graphics (nav, logos, thumbnail, maps, hotspot)

Interesting... I'll give this a go with my experimentations.  Thank you once again!

Offline

 

#4 2013-02-05 04:46:34

Destiny
Moderator
From: Australia
Registered: 2010-04-27
Posts: 2417
Website

Re: Button hides/shows all graphics (nav, logos, thumbnail, maps, hotspot)

Hi..

Well you can add code to a button to turn content on and off like my compass, where I placed a button in the menu... I really need to make a double hit button to show red when off.. roll

http://members.westnet.com.au/dps/Compa … ltour.html

This is my xml code to achieve this.. You just have to link it to the relevant plugin..

I do have some code to hide the hotspot somewhere, but I might have to right it again since I lost it.. hmm

Destiny..

<!--************** Destiny COMPASS ON/OFF Button***************************************************************-->
    <plugin name="Destiny" align="bottom" crop="0|0|65|65" customColor="true" height="prop" keep="true" onclick="displayCompass();" onout="" onover="" onovercrop="0|65|65|65" url="virtualtourdata/graphics/menu/menu10.png" width="40" x="122" y="10"/>   
    <action name="displayCompass">
        set(plugin[compass].visible,false);
        set(plugin[Destiny].onclick,closeCompass()wink
    </action>
    <action name="closeCompass">
        set(plugin[compass].visible,true);
        set(plugin[Destiny].onclick,displayCompass()wink
    </action>


Virtual Tours and 3D/360 Object/Product Photographer - Our aim is to create a 3D/360 Virtual Tour Shop/Store with links to 3D/360 degree products. My gear, VR Drive II - D90 - Nikon 10.5 fisheye - Nikon D800 with Nikon-Nikkor 14-24 - NOVOFLEX Magic Balance - Acratech GP Ball-head - Nodal Ninja 4 + RD-16 Rotor - Manfrotto 190CXPRO4 Carbon Fiber Tripod smile smile

Offline

 

#5 2013-02-05 06:25:35

ATXcloud
Member
From: AUSTIN, TX USA
Registered: 2011-06-06
Posts: 75

Re: Button hides/shows all graphics (nav, logos, thumbnail, maps, hotspot)

Good crew coming through once again! cheers!

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson