You are not logged in.

1

Tuesday, June 17th 2014, 1:19pm

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.

Umalo

Professional

Posts: 1,051

Location: Osijek, Croatia, EU

  • Send private message

2

Tuesday, June 17th 2014, 1:35pm

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

3

Tuesday, June 17th 2014, 2:06pm

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 ?

Source code

1
2
3
<!-- events for handling dynamic changes -->
	<events name="defaultskin_buttons" keep="true"
 onviewchange="<action name="changeOpacity" bgalpha="0.3"</action>"

This post has been edited 3 times, last edit by "Mfranquelo" (Jun 17th 2014, 4:12pm)


Umalo

Professional

Posts: 1,051

Location: Osijek, Croatia, EU

  • Send private message

4

Tuesday, June 17th 2014, 5:59pm

Find action skin_startup and at the end add:

Source code

1
2
3
4
5
6
7
8
9
10
<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>

5

Tuesday, June 17th 2014, 7:43pm

Im sorry for my ignorance,
but i cannot find action skin_startup on defaulskin.xml , its certainly not in there. (i've attached my file)
Mfranquelo has attached the following file:

Umalo

Professional

Posts: 1,051

Location: Osijek, Croatia, EU

  • Send private message

6

Tuesday, June 17th 2014, 11:05pm

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:

Source code

1
2
3
4
5
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.

7

Tuesday, June 17th 2014, 11:56pm

Thank you Umalo, its working wonders right now! just what i needed.
Yeah i meant the buttons, sorry for the confusion.

Cheers,
Manuel.