Sie sind nicht angemeldet.

1

Dienstag, 1. September 2020, 08:57

Change the Thumbnails Orientation to Vertical

Good day,

I am new to KRPano and been reading a lot of topics and managed to change my skin to this (screenshot_3).

Now, I have a problem and got stuck with changing the orientation of the thumbnails to Vertical style.

Can anyone help me with this?

I am just running between this two codes. As for my understanding, these two are responsible for the Population of thumbnails and it's orientation.


Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<action name="skin_addthumbs">
	if(skin_settings.thumbs == false,
		set(layer[skin_btn_thumbs].visible,false);
	  ,
		copy(thumbwidth, skin_settings.thumbs_width);
		copy(thumbheight, skin_settings.thumbs_height);
		copy(thumbpadding, skin_settings.thumbs_padding);
		copy(thumbcrop, skin_settings.thumbs_crop);

		calc(thumbxoffset, 110);
		calc(thumbxcenter, thumbxoffset * 0.5);
		calc(thumbbarwidth, thumbxoffset * scene.count + thumbpadding);
		calc(thumbbarheight, thumbpadding + thumbheight + thumbpadding);

		if(skin_settings.thumbs_scrollindicator,
			copy(layer[skin_thumbs_scrollindicator].y, thumbbarheight);
			add(thumbbarheight, layer[skin_thumbs_scrollindicator].height);
		);

		set(layer[skin_thumbs], width=get(thumbbarwidth), height=get(thumbbarheight) );

		calc(layer[skin_thumbs_scrollleft].y, thumbbarheight * 0.5);
		calc(layer[skin_thumbs_scrollright].y, thumbbarheight * 0.5);

		for(set(i,0), i LT scene.count, inc(i),
			calc(thumbname, 'skin_thumb_' + i);
			addlayer(get(thumbname));

			set(layer[get(thumbname)],
				url=get(scene[get(i)].thumburl),
				keep=true,
				parent='skin_thumbs',
				align='righttop',
				crop=get(thumbcrop),
				width=get(thumbwidth),
				height=get(thumbheight),
				y=calc(thumbpadding + i*thumbxoffset),
				x=get(thumbpadding),
				linkedscene=get(scene[get(i)].name),
				onclick='copy(layer[skin_thumbborder].parent, name); skin_loadscene(get(linkedscene),get(skin_settings.loadscene_blend));'
			);
			
			set(scene[get(i)], 
				thumbx=calc(thumbpadding + i*thumbxoffset + thumbxcenter),
				thumby=get(thumbpadding)
			);
			
			if(skin_settings.tooltips_thumbs,
				set(layer[get(thumbname)].tooltip, get(scene[get(i)].title) );
				layer[get(thumbname)].loadstyle(skin_tooltips);
			);
			if(skin_settings.thumbs_text,
				calc(thumbtext, 'skin_thumbtext_' + i);
				addlayer(get(thumbtext));
				layer[get(thumbtext)].loadstyle(skin_thumbtext_style);
				set(layer[get(thumbtext)], keep=true, parent=get(thumbname), html=get(scene[get(i)].title) );
			);
		);

		if(scene.count == 1,
			set(layer[skin_thumbs].align, 'lefttop');
		);
	);
</action>

And

Quellcode

1
2
3
4
5
6
<layer name="skin_thumbs_container" type="container" align="lefttop" width="100%" height="100%" visible="false">
	<layer name="skin_thumbs_scrollleft"  style="skin_base|skin_glow" crop="0|64|64|64"  align="lefttop"  edge="left"  x="5" y="50" scale="0.5" zorder="2" alpha="1.0" ondown="asyncloop(pressed, layer[skin_thumbs].scrollby(+2,0));" visible="false" />
	<layer name="skin_thumbs_scrollright" style="skin_base|skin_glow" crop="64|64|64|64" align="righttop" edge="right" x="5" y="50" scale="0.5" zorder="2" alpha="1.0" ondown="asyncloop(pressed, layer[skin_thumbs].scrollby(-2,0));" visible="false" />
	<layer name="skin_thumbs_scrollindicator" type="container" bgcolor="0xFFFFFF" bgalpha="0.25" align="lefttop" width="0" y="100" height="2" visible="false" enabled="false" />
	<layer name="skin_thumbs" state="closed" url.flash="%VIEWER%/plugins/scrollarea.swf" url.html5="%VIEWER%/plugins/scrollarea.js" direction="h" align="top" width="100%" height="100" zorder="1" onloaded="skin_updatescroll();" onscroll="skin_updatethumbscroll();" />
</layer>

»tb.bax« hat folgende Bilder angehängt:
  • Screenshot_3.jpg
  • Screenshot_4.jpg

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »finehomeint.01« (1. September 2020, 09:47)


2

Mittwoch, 9. September 2020, 10:32

To create vertical display of the thumbs don't try to re-build skin. It's difficult and not useful.
Instead of it.
1. in tour settings set thumbs="false"
2. Use trhis part of standard code to crete your thumbs
for(set(i,0), i LT scene.count, inc(i),
calc(thumbname, 'skin_thumb_' + i);
addlayer(get(thumbname));

set(layer[get(thumbname)],
url=get(scene[get(i)].thumburl),
<--make design-->


etc....


3. Don't forget to shift your thumbs over y (not X) coordinates
vrTourSoft - Simple is better than Hard. Standalone WYSIWYG editor and development environment for krpano
https://www.vrtoursoft.com/

Ähnliche Themen