showtooltip('hotspot');
hideTooltip();
if(scene[get(xml.scene)].planar,
set(layer[compassbackground].active, false);
hidecompass();
,
set(layer[compassbackground].active, true);
mod(compasshlookat, view.hlookat, 360);
mul(compassheading, -1, get(scene[get(xml.scene)].heading));
if (compassheading == null, set(compassheading, 0));
sub(layer[compasspointer].rotate, compasshlookat, compassheading);
showcompass();
);
set(layer[compassbackground].visible, false);
if(tour_displaycontrols,
if(layer[compassbackground].active AND layer[compassbackground].started,set(layer[compassbackground].visible, true););
,hidecompass(););
ifnot (smallgallerybarbuilt,
set(smallgallerybarbuilt, true);
);
smallgallerybarthumbbar_set_visible(false);
if(smallgallerybarBuildable,
if(tour_displaycontrols,smallgallerybarthumbbar_set_visible(true);,hidesmallgallerybar(););
);
txtadd(pname, 'smallgallerybarPicture', %1);
addplugin(get(pname));
set(layer[%pname].zorder, 3);
set(layer[%pname].url, %2);
set(layer[%pname].align, left);
set(layer[%pname].width, 90);
set(layer[%pname].height, 60);
set(layer[%pname].onclick, smallgallerybar_showimage(get(name)));
set(layer[%pname].visible, false);
set(layer[%pname].keep, true);
set(layer[%pname].x, 16);
mul(tmp, 66, %1);
add(tmp, tmp, 3);
add(layer[%pname].y, 0, tmp );
sub(layer[%pname].y, layer[%pname].y, 3);
copy(layer[%pname].thumbx, layer[%pname].x);
copy(layer[%pname].thumby, layer[%pname].y);
smallgallerybar_hide_allimages();
set(layer[%1].zorder, 4);
push(layer[%1].width);
push(layer[%1].height);
layer[%1].resetsize();
copy(layer[%1].originalwidth , layer[%1].width);
copy(layer[%1].originalheight, layer[%1].height);
pop(layer[%1].height);
pop(layer[%1].width);
set(imgwidth , get(layer[%1].originalwidth));
set(imgheight, get(layer[%1].originalheight));
set(maxwidth, get(stagewidth));
sub(maxwidth, get(stagewidth), 236);
set(maxheight, get(stageheight));
sub(maxheight, get(stageheight), 12);
if(imgwidth GT maxwidth,
mul(imgheight, imgheight, maxwidth);
div(imgheight, imgheight, imgwidth);
copy(imgwidth, maxwidth);
);
if(imgheight GT maxheight,
mul(imgwidth, imgwidth, maxheight);
div(imgwidth, imgwidth, imgheight);
copy(imgheight, maxheight);
);
tween(layer[%1].width , get(imgwidth));
tween(layer[%1].height, get(imgheight));
layer[%1].changeorigin(center,center);
tween(layer[%1].x, 0);
tween(layer[%1].y, 0);
set(layer[%1].onclick, smallgallerybar_hideimage(%1) );
layer[%1].changeorigin(left,left);
set(layer[%1].zorder, 3);
tween(layer[%1].width , 90);
tween(layer[%1].height, 60);
tween(layer[%1].x, get(layer[%1].thumbx));
tween(layer[%1].y, get(layer[%1].thumby));
set(layer[%1].onclick, smallgallerybar_showimage(%1) );
smallgallerybar_hideimage(smallgallerybarPicture0);
set(layer[smallgallerybarPicture0].visible,%1);
set(layer[smallgallerybarbackground].visible, %1);