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.

121

Thursday, May 10th 2012, 6:55am

Nav & thumb scale

Hey Andrey,

I am having a little trouble with the scale of bottom nav buttons and thumbs when I reduce the size of the PC based window. If I want to put the tour in a small window, such as a div or iframe, the thumbs and lower nav buttons don't shrink in size. The nav buttons end up overlapping each other from left to right, and the thumbs of course are just way too big then.
Is it plausible (OK) to just use the layout_iphone.xml for the PC also, or can you offer a fix for this in the standard layout.xml?

Thanks,
Tony

  • "Sudarchikov Andrey" started this thread

Posts: 1,081

Location: Russia, Kaliningrad

  • Send private message

122

Thursday, May 10th 2012, 1:14pm

Hi!
scaling is not possible, it will be incorrect calculations.
Yes you can use iphone layout for PC , just change devices attribute in include tag.

Regards
Andrey.
VRAP - desktop VR content player based on krpano.
Common tasks in one place in one click! Discussion thread
DOWNLOAD for MAC
DOWNLOAD for WIN

123

Thursday, May 10th 2012, 9:26pm

Hi!
scaling is not possible, it will be incorrect calculations.
Yes you can use iphone layout for PC , just change devices attribute in include tag.

Regards
Andrey.


So I'm confused, how is it that the iphone, ipad, and PC have thumbs and navigation buttons all scaled to different sizes? : small, medium and large? There is obviously some scaling going on with the different screen sizes. But resizing my browser window doesn't have the same effect. If they didn't scale to screen size, then the thumbs on the iPhone and iPad would be way to big if they stayed the same size as on my PC.. (and I know the iPad is using the same layout.xml file).

I also noted a difference in the 2 layout files:

layout.xml : _interface has no scale and a width of 100%
layout_phone.xml: _interface has scale="2" and width="50%"

What's the purpose of that?

As always,
Thanks!
I know you are busy.

124

Saturday, May 19th 2012, 9:03pm

Deleted

I deleted this post.

This post has been edited 1 times, last edit by "nefar1ous" (May 20th 2012, 7:39pm)


abuethe

Beginner

Posts: 21

Location: Geesthacht

Occupation: Systemadministrator

  • Send private message

125

Saturday, June 30th 2012, 12:55pm

Where is the info button ?

After building a tour via the mac droplet there is no info button and I don´t see a template to fill it with text as well ?!? Anyone a clue? The rest of the interface works as planned though - good work :)

Edit: ok, I was of course able to copy&paste from the demo - and got it working. But maybe there should be a template to fill out for the info button as well in the code?

This post has been edited 1 times, last edit by "abuethe" (Jun 30th 2012, 1:16pm)


126

Sunday, July 1st 2012, 2:26pm

Buttons with caption...

Hi Andrey,
your IF_defaultBlack Demo introduces also "Buttons with captions" as an feature.
Coud you explani closer how to use it.

Greetz
Mil

127

Thursday, July 5th 2012, 10:01am

Bigger thumbs

I was wondering if it is possible, to generate automatically bigger
(more width) thumbs for the vtour. And as part of that, is it possible to get the
scene title in or under the thumbs?

Thanks!

  • "Sudarchikov Andrey" started this thread

Posts: 1,081

Location: Russia, Kaliningrad

  • Send private message

128

Friday, July 6th 2012, 6:10pm

Hi Andrey,
your IF_defaultBlack Demo introduces also "Buttons with captions" as an feature.
Coud you explani closer how to use it.

Greetz
Mil
Hi!
Take a look at "show image" in example - that is it (button with caption)

I was wondering if it is possible, to generate automatically bigger
(more width) thumbs for the vtour. And as part of that, is it possible to get the
scene title in or under the thumbs?

Thanks!
Hi!
It's possible, but code is optiomized and, many features - bigger code :)
All this code is firstly as an good big example of how to use krpano actions, so just try to understand how it's working (core.xml and layout.xml) then you will can make what you want. ;-)
But if you want, I can do it for you. (currently I'm very busy, maybe after 2-3 weeks)

After building a tour via the mac droplet there is no info button and I don´t see a template to fill it with text as well ?!? Anyone a clue? The rest of the interface works as planned though - good work :)

Edit: ok, I was of course able to copy&paste from the demo - and got it working. But maybe there should be a template to fill out for the info button as well in the code?
Yes, you are right, the info button is not an part of template, it's just example of how to use this code.
But, you can add this button to template.

Thank you all
Regards
Andrey *thumbup*
VRAP - desktop VR content player based on krpano.
Common tasks in one place in one click! Discussion thread
DOWNLOAD for MAC
DOWNLOAD for WIN

129

Monday, July 9th 2012, 11:43pm

Text window from IF_defaultBlack

Hi Andrey!

I try to tweak your code to have a flexible scrolable text-plane, for each scene with other text and other width of text window.
I've canceled your close button, each scene calls the text-plane with init action ...

Source code

1
2
3
_window_hide(win2);
set(plugin[text].html,'data:text_D2');
_window_new_fix(win2,get(curr_txtwin_width),get(curr_txtwin_height),text,p2,R);

the actions and styles:

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
106
107
108
109
<action name="_window_new_fix">
	<!--
		  6 args!!!!!
		  %1 win name
		  %2 width
		  %3 height
		  %4 nname of plugin to show
		  %5 parent of the text-plane
		  %6 orientation left/right
	-->
    ifnot(plugin[%1].loaded,     
        addplugin(%1);
		
		if(%6 != null,
			txtadd(win_align,_window_no_dragable_,%6);
		  	plugin[%1].loadstyle(get(win_align));
		  ,
		  	plugin[%1].loadstyle(_window_no_dragable);
		  );
        set(plugin[%1].width,%2);
        set(plugin[%1].height,%3);
        sub(plugin[%1].canvas_width,%2,plugin[%1].padding);
        sub(plugin[%1].canvas_height,%3,plugin[%1].padding);
		
		if(%5 != null,
		  set(plugin[%1].parent,%5);
		);
        
        addplugin(%1_canvas);
        set(plugin[%1_canvas].parent,%1);
        plugin[%1_canvas].loadstyle(_window_canvas); 
        copy(plugin[%1_canvas].width,plugin[%1].canvas_width);
        copy(plugin[%1_canvas].height,plugin[%1].canvas_height);
        
        addplugin(%1_sbx);
        set(plugin[%1_sbx].parent,%1_canvas);
        plugin[%1_sbx].loadstyle(_scrollbar_hor);
        div(plugin[%1_sbx].width,plugin[%1_canvas].width,3);

        addplugin(%1_sby);
        set(plugin[%1_sby].parent,%1_canvas);
        plugin[%1_sby].loadstyle(_scrollbar_vert);
        div(plugin[%1_sby].height,plugin[%1_canvas].height,3);

        <!--addplugin(%1_close);
        set(plugin[%1_close].parent,%1);        
        plugin[%1_close].loadstyle(_window_close);
        plugin[%1_close].loadstyle(_button);
        _button_init(%1_close);-->
        
        if(%4 != null,
            set(plugin[%1].content,%4);
            set(plugin[%4].parent,%1_canvas);
            _makeScrollable(%4,get(plugin[%1].canvas_width),get(plugin[%1].canvas_height));
            
            copy(sbx_size,plugin[%1].canvas_width);
            copy(sby_size,plugin[%1].canvas_height);
            set(plugin[%4].dragX,false);
            set(plugin[%4].dragY,false);

            txtadd(plugin[%4].ondown,_window_set_active(%1););
            if(plugin[%4].width GT plugin[%4].scroll_width,
                set(plugin[%4].dragX,true);
                txtadd(plugin[%4].onDragStart,_window_sb_show(%1,sbx););
                txtadd(plugin[%4].onDragEnd,_window_sb_hide(%1,sbx););
                sub(sby_size,3);
            );
            if(plugin[%4].height GT plugin[%4].scroll_height,
                set(plugin[%4].dragY,true);
                txtadd(plugin[%4].onDragStart,_window_sb_show(%1,sby););
                txtadd(plugin[%4].onDragEnd,_window_sb_hide(%1,sby););
                sub(sbx_size,3);
            );

            _scrollbar_autoset(%4,%1_sbx,hor,get(sbx_size));
            _scrollbar_autoset(%4,%1_sby,vert,get(sby_size));
        );
    );
    set(plugin[%1].x,0); set(plugin[%1].y,0);
    tween(plugin[%1].alpha,1,0.3,easeOutQuad);
    _window_set_active(%1);
</action>

<action name="_window_hide">
    tween(plugin[%1].alpha,0,0.3,easeOutQuad,set(plugin[%1].y,-20000););
	removeplugin(%1_canvas);
	removeplugin(%1);
	set(plugin[text].html,nothing);
</action>

<style name="_window_no_dragable_R" url="%HTMLPATH%/skin/default_black/alpha0.png" keep="true" alpha="0"
    edge="right" align="right" x="0" y="1" oy="0" 
    scalechildren="false"
    padding="20"
    onloaded=""
    onclose=""
    zorder="1100"
    ondown="_window_set_active(get(name));"
/>

<style name="_window_no_dragable_L" url="%HTMLPATH%/skin/default_black/win_bg.png" keep="true" alpha="0"
    edge="left" align="left" x="0" y="1" oy="0" 
    scalechildren="false"
    padding="20"
    onloaded=""
    onclose=""
    zorder="1100"
    ondown="_window_set_active(get(name));"
/>

it works pretty well, the problem is to calculate the proprer scroll value ...
once calculated for the height of the first text it doesn't change after loading other texts ..
i could'nt get it ...

could you give me a hint?

greetz
Mil

  • "Sudarchikov Andrey" started this thread

Posts: 1,081

Location: Russia, Kaliningrad

  • Send private message

130

Tuesday, July 10th 2012, 4:52am

Hi!
It's known issue of textfiled plugin.
Try this way
remove textfiled plugin before add.
And on more thing - you can get correct height of textfield after some delay only.
That why i always add separate textfileds on tour start for each text.
And textfiled put in to krpano tag (not in scene) with keep true, just change visibility.

Hope it help
Regards
Andrey *thumbup*
VRAP - desktop VR content player based on krpano.
Common tasks in one place in one click! Discussion thread
DOWNLOAD for MAC
DOWNLOAD for WIN

131

Tuesday, July 10th 2012, 10:05am

Hi Andrey,
...
remove textfiled plugin before add....

dynamicaly add and remove of text plugin and all components of text window (canvas, scrolling) is the solution *thumbsup*

You made my day!!

greetz
Mil

132

Thursday, July 12th 2012, 7:11pm

Hello: first , bravo for the very useful work.
My question is: it is possible to add a text when the mouse go hover a thumb? Thank you

  • "Sudarchikov Andrey" started this thread

Posts: 1,081

Location: Russia, Kaliningrad

  • Send private message

133

Friday, July 13th 2012, 5:06am

Hi!
you can add onhover event to thumbs
automaticaly generated thumbs (each thumb) is a plugin with name
%1_thumbs_%2 where %1 - thumbs plugin name, %2 - number (from 0 to count-1 of thumbs)
so, code

Source code

1
2
3
4
5
for(set(i,0), i LT plugin[%1].thumb.count, inc(i), 
 txtadd(_name,%1_thumb_,get(i));
 set(plugin[get(_name)].onhover,your_onhover_action(get(_index)););
);
 


note! - use this after _thumbs_build();
each plugin has _index attribute and your show_description might looks like this

Source code

1
2
3
<action name="show_description">
   showtext(get(scene[%1].description));
</action>


You can use this trick for set any propperties or changes for thumb plugins.
You even can mark visited use %1_thumbs_%2 name of plugin

OR

in core.xml - _thumbs_build action
and add additional code line

Source code

1
2
3
4
5
6
7
8
9
10
11
ifnot(plugin[%1].thumb.count GT 0, 
  for(set(i,0), i LT scene.count, inc(i),       txtadd(plugin[%1].thumb_name,tn_,get(i));
    copy(plugin[%1].thumb[get(i)].name,plugin[%1].thumb_name);
    copy(plugin[%1].thumb[get(i)].url,scene[get(i)].thumburl);
    copy(plugin[%1].thumb[get(i)]._scene,scene[get(i)].name);
    set(plugin[%1].thumb[get(i)].onclick,ifnot(plugin[get(parent)].moved,_gotoscene(get(_scene));););
	
    set(plugin[%1].thumb[get(i)].onhover,your_onhover_action() ); ------ add this line -----	
  );

);


Regards
Andrey
VRAP - desktop VR content player based on krpano.
Common tasks in one place in one click! Discussion thread
DOWNLOAD for MAC
DOWNLOAD for WIN

134

Wednesday, August 29th 2012, 1:36pm

IF_defaultBlack and krpano 1.0.8.15

Hallo Andrey,

did you test the IF_defaultBlack with krpano 1.0.8.15??

Would be nice to have the Droplet and Skin updated to the new krpano version??

Greetz

Mil

  • "Sudarchikov Andrey" started this thread

Posts: 1,081

Location: Russia, Kaliningrad

  • Send private message

135

Friday, August 31st 2012, 6:09am

Hi!
Yes you are right, I'm working on it.
You will see updated version soon.

Regards
Andrey
VRAP - desktop VR content player based on krpano.
Common tasks in one place in one click! Discussion thread
DOWNLOAD for MAC
DOWNLOAD for WIN

Arsdezi

Intermediate

Posts: 174

Location: Ukraine

  • Send private message

136

Thursday, January 3rd 2013, 8:02am

Hi, Andrey!

Maybe just my problem, but with version krpano 1.0.8.15 pano in HTML5-version does not work!
Is this error or i need try find error in my code(I do a tour of the batch file without changes)?
Thank you ;)
Panoreal — to make and see this wonderful world! *whistling*

  • "Sudarchikov Andrey" started this thread

Posts: 1,081

Location: Russia, Kaliningrad

  • Send private message

137

Wednesday, May 22nd 2013, 12:13pm

Hi!
It must works, I tested it many time on iPad.
Perhaps it is some bug in code

Regards
Andrey
VRAP - desktop VR content player based on krpano.
Common tasks in one place in one click! Discussion thread
DOWNLOAD for MAC
DOWNLOAD for WIN

Arsdezi

Intermediate

Posts: 174

Location: Ukraine

  • Send private message

138

Friday, July 19th 2013, 2:09am

Hi Andew! How are you?
How can I download the latest vesrion fo this droplet with all Bugfix? Or I need to purchased again?

Thank you!
*thumbup*
Panoreal — to make and see this wonderful world! *whistling*

  • "Sudarchikov Andrey" started this thread

Posts: 1,081

Location: Russia, Kaliningrad

  • Send private message

139

Monday, July 22nd 2013, 9:13am

Hi!
I will update this skin in August first week.

Regards
Andrey
VRAP - desktop VR content player based on krpano.
Common tasks in one place in one click! Discussion thread
DOWNLOAD for MAC
DOWNLOAD for WIN

andrew22222

Intermediate

Posts: 341

Location: Australia

  • Send private message

140

Friday, August 22nd 2014, 3:24am

Replace the Mouse Drag button with Sound on/off

I was wondering if you could help me please.

I'm redoing a tour with iPad interface and don't really need the mouse drag option but I do need a sound on / off button. I use this code normally for sound toggle which works well

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
  <!-- load the soundinterface plugin -->
    <plugin name="soundinterface"
        	url="%SWFPATH%/plugins/soundinterface.swf"
        	alturl="%SWFPATH%/plugins/soundinterface.js"
        	rootpath=""
        	preload="true"
   		 volume="0.3"
        	keep="true"
        	/>

    <!-- start playing the sound -->
    <events name="currentpano"
        	onnewpano="playsound(bgsnd, 'sounds/engine.mp3|sounds/engine.ogg', 0);"
        	onremovepano="stopsound(bgsnd);"
        	/>


    <!-- button to pause the sound: -->

    <plugin name="snd" url="skin/default/soundonoff.png" zorder="10" 
align="bottomleft" x="50" y="20" alpha="0.85" scale="1.0" 
onover="tween(alpha,1);" onout="tween(alpha,0.70);"
        	crop="0|0|50|50"
        	onloaded="if(ismobile,set(scale,1));"
        	onclick="pausesoundtoggle(bgsnd); switch(crop, 0|0|50|50, 0|50|50|50);"
        	/>


I can change the skin.png no problem to show a speaker on / off icon no problem but not too sure how to go about adjusting the existing code to match my code.

Source code

1
2
3
4
5
6
7
8
9
<plugin style="_button_left" name="_mouse" x="192"

	crop_normal="266|0|38|30" crop_down="266|30|38|30" 
crop_active="266|60|38|30" crop_inactive="266|90|38|30" 
crop_hover="266|120|38|30"
	switcher="true" switched="false"
	onswitchon="set(control.mousetype,moveto)"
	onswitchoff="set(control.mousetype,drag2d)" 
/> 



After several attempts using' pausesoundtoggle' I got it so that the sound starts automatically, I've set the switched="true" making the button blue highlight plus the 'Sound Off' image on it.



Somehow I need to get the sound to pause when I click it and show the sound on icon. Then when it's clicked again go back to the blue state and play the sound.

I know I can just use my original code and simply change the cropped png to match your style of button but I wanted to keep everything on the same skin.png if possible and use existing code.

Thanks for your time,

Andrew