How to change navigation bar opacity

  • Dear all,

    I've been trying to configure some basic skin properties of Krpano along these days! I dont really know how to code, just some basics in C#... *sad*
    I was wondering if i could easily change the opacity of the navigation bar to lets say 30% while scrolling and zooming through my flat pano, so everything is cleaner.
    Any ideas ?


    Thank you for your support!
    Manuel.

  • Edit vtourskin.xml

    <layer name="skin_control_bar" keep="true" type="container" bgcolor="0x1557ad" bgalpha="0.3"......./>

    If you want this opacity just when scrolling the pano than you can use onviewchange event and there set this layer opacity to 0.3 in e.g. combination with indetime set to 1 and triggered action you can set it back to 1

  • If you want this opacity just when scrolling the pano than you can use onviewchange event and there set this layer opacity to 0.3 in e.g. combination with indetime set to 1 and triggered action you can set it back to 1

    Okay thank you!
    - I can see where to write the dynamic event on defaultskin.xml , however i dont know exactly how to write what you're telling me. *sad* I guess i'll have to have a quick look at the documentation!

    Edit: Would it be something like this ?

    Code
    <!-- events for handling dynamic changes -->
    	<events name="defaultskin_buttons" keep="true"
     onviewchange="<action name="changeOpacity" bgalpha="0.3"</action>"
  • Find action skin_startup and at the end add:

    Code
    <action name="skin_startup">
    .
    .
    .
    delayedcall(2.0,			  			  
    set(idletime,0.2);
    set(events[skin_events].onviewchange,set(layer[skin_control_bar].bgalpha,0.3););
    set(events[skin_events].onidle,set(layer[skin_control_bar].bgalpha,1););
    );
    </action>
  • You confused me with the "navigation bar". I thought you use vtourskin. Now I will assume you ask how to make all buttons transparent when pano is being explored.
    In that case that find some action e.g. adjust_button_sizes and at the end add:

    Code
    delayedcall(2.0,
    set(idletime,0.2);
    set(events[defaultskin_buttons].onviewchange,tween(layer[defaultskin_buttons].alpha,0.1,0.2););
    set(events[defaultskin_buttons].onidle,tween(layer[defaultskin_buttons].alpha,1,,0.2););
    );


    If we set onviewchange event regulary than buttons will be 0.1 at start. Don't know why this event is triggered when scene is loading so with small delay we can do this this way.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!