You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

servaas

Intermediate

  • "servaas" started this thread

Posts: 206

Location: Belgium

  • Send private message

1

Thursday, February 20th 2014, 5:22pm

thumbnails location

Hello,

I've got a code that was made by someone a while ago.
In that code the thumbnails are aligned on the left side.. Now I want them to be centralized, but I can't find how to change this..
I wandered if someone could help me..

Thanks in advance !

This is the code

Source code

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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<action name="load_thumbnails">
		copy(thumb_menu_yoffset, menu.yoffset);
		add(thumb_menu_xoffset, menu.xoffset, menu.floor.width);
		add(thumb_menu_xoffset, 10);
		add(thumb_menu_yoffset, -0);
		
		for(set(scene_count, 0), scene_count LT panoramas.pano.count, inc(scene_count),
			<!-- if the panorama is binded to this floor, show the thumbnail -->
			if(panoramas.pano[get(scene_count)].floor == floors.current,
				<!-- create the thumbnail -->
				copy(thumb, scene[get(panoramas.pano[get(scene_count)].name)].thumburl);
				
				txtadd(thumbname,'thumb_', get(panoramas.pano[get(scene_count)].name));				
				addplugin(get(thumbname));
				
				copy(plugin[get(thumbname)].ref, panoramas.pano[get(scene_count)].name);
				copy(plugin[get(thumbname)].tooltip, panoramas.pano[get(scene_count)].tooltip);
				if(panoramas.pano[get(scene_count)].name == panoramas.current,
					set(plugin[get(thumbname)].active, true);
					copy(plugin[get(thumbname)].alpha, menu.thumbnail.active.alpha);
					,
					copy(plugin[get(thumbname)].alpha, menu.thumbnail.normal.alpha);
					set(plugin[get(thumbname)].active, false);
				);
				set(plugin[get(thumbname)].url, get(thumb));
				set(plugin[get(thumbname)].added, true);
				set(plugin[get(thumbname)].keep, true);
				set(plugin[get(thumbname)].align, topleft);
				copy(plugin[get(thumbname)].width,  menu.thumbnail.width);
				copy(plugin[get(thumbname)].height, menu.thumbnail.height);
				
				<!-- put the buttons under eachother -->
				copy(plugin[get(thumbname)].y, thumb_menu_xoffset);
				add(thumb_menu_yoffset, get(plugin[get(thumbname)].height));
				add(thumb_menu_yoffset, menu.thumbnail.padding);
				add(thumb_menu_yoffset, menu.thumbnail.textheight);
				copy(plugin[get(thumbname)].x, thumb_menu_yoffset);
			
				<!-- mouse events -->
				set(plugin[get(thumbname)].onhover,show_tooltip(get(tooltip)));
				set(plugin[get(thumbname)].onover, 
					ifnot(active,
						copy(alpha, menu.thumbnail.over.alpha);	
						set(css,data:OverCSS);	
					);				
				);
				set(plugin[get(thumbname)].onout,
					ifnot(active,
						copy(alpha, menu.thumbnail.normal.alpha);	
						set(css,data:OverCSS);		
					);					
				);
				set(plugin[get(thumbname)].onclick,
					ifnot(active,
						change_location(get(ref));
					);
				);
				set(plugin[get(thumbname)].zorder, 100);
				
				
				set(plugin[get(thumbname)].effect,glow(0xFFFFFF,1.0,2,10000));
				set(plugin[get(thumbname)].jsborder,'1px solid #FFFFFF');
				
				<!-- create the text above the thumbnail -->
				txtadd(thumbtextname,'thumbtext_', get(panoramas.pano[get(scene_count)].name));
				addplugin(get(thumbtextname));
				set(plugin[get(thumbtextname)].url, %SWFPATH%/plugins/textfield.swf);
				copy(plugin[get(thumbtextname)].width, menu.thumbnail.width);
				copy(plugin[get(thumbtextname)].height, menu.thumbnail.textheight);
				set(plugin[get(thumbtextname)].align, leftbottom);				
				set(plugin[get(thumbtextname)].keep, true);
				set(plugin[get(thumbtextname)].parent, get(thumbname));
				
				set(plugin[get(thumbtextname)].handcursor, true);
				set(plugin[get(thumbtextname)].enabled, true);	
				set(plugin[get(thumbtextname)].edge, lefttop);
				set(plugin[get(thumbtextname)].capture, false);
				set(plugin[get(thumbtextname)].children, false);
				
				set(plugin[get(thumbtextname)].border, 0);
				set(plugin[get(thumbtextname)].bordercolor, 0xFFFFFF);
				set(plugin[get(thumbtextname)].effect, glow(0xFFFFFF,0,2,10000));
				set(plugin[get(thumbtextname)].jsborder, '');
				copy(plugin[get(thumbtextname)].backgroundcolor, menu.backgroundcolor);
				<!--set(plugin[get(thumbtextname)].x, get(plugin[get(thumbname)].x));
				set(plugin[get(thumbtextname)].y, get(plugin[get(thumbname)].y));-->
				set(plugin[get(thumbtextname)].zorder, 190);	
				
				set(_thumbtitle, '');
				txtadd(_thumbtitle, <p>, get(panoramas.pano[get(scene_count)].title), </p>);
				set(plugin[get(thumbtextname)].html, get(_thumbtitle));				
				set(plugin[get(thumbtextname)].css, data:ThumbnailCSS);				
				,
				<!-- else remove it -->
				txtadd(thumbname,'thumb_', get(panoramas.pano[get(scene_count)].name));
				if(plugin[get(thumbname)] !== null, 
					removeplugin(get(thumbname));
				);
				txtadd(thumbtextname,'thumbtext_', get(panoramas.pano[get(scene_count)].name));
				if(plugin[get(thumbtextname)] !== null, 
					removeplugin(get(thumbtextname));
				);
			);
		);
	</action>


and this goes with

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
<menu xoffset="0" yoffset="0"  backgroundcolor="0x666666" alpha="0.8">		
		<floor cssbuttons="false" padding="10" width="35" height="35" borderwidth="0" bordercolor="0xFFFFFF">
			<normal backgroundcolor="0xFFFFFF" alpha="0.5" />
			<over backgroundcolor="0xFFFFFF" alpha="0.9" />
			<active backgroundcolor="0xFFFFFF" alpha="0.9" />
		</floor>
		
		<thumbnail width="100" height="30" textheight="20" padding="100" borderwidth="0" bordercolor="0xFFFFFF">
			<normal alpha="0.2" />
			<over alpha="0.6" />
			<active alpha="0.8" />
		</thumbnail>
		
	</menu>	

Umalo

Professional

Posts: 1,048

Location: Osijek, Croatia, EU

  • Send private message

2

Friday, February 21st 2014, 10:42am

Do you have this online?

servaas

Intermediate

  • "servaas" started this thread

Posts: 206

Location: Belgium

  • Send private message

3

Friday, February 21st 2014, 3:57pm

Hi,

This is an example
http://www.vanbelleb3d.be/GG/VASTGOED/

I want them to be horizontal and centralized.

Cheers,
Servaas

Umalo

Professional

Posts: 1,048

Location: Osijek, Croatia, EU

  • Send private message

4

Friday, February 21st 2014, 4:50pm

Wouldn't be easier for you to use Krpano default skin with automatic code generated that supports horistonstal thumbs?
http://krpano.com/examples/116/examples/…corfu/tour.html
Or there are plugins e.g. http://krpano.com/plugins/userplugins/orangethumbs/#top