You are not logged in.

> The forum rules have been updated. Please take a moment to read them.


#1 2013-02-08 09:55:14

Christian Stüben
Member
From: Wuppertal, Germany
Registered: 2012-07-03
Posts: 269
Website

<cursors> some questions...

Hi all,
due to a post in another forum i have got this http://krpano.com/docu/xml/#cursors into my personal focus.

The docu says "The individual images will be selected by defining the crop pixel coordinates for them.", but i find no explanation how the pixel coordinates must be defined. Only the attributes for each image are explained.

Is there any further documentation that tells me how the grafic file for the cursors must be build, which grafic formats are supported, how the pixel coordinates are defined?
Are there example files?

Every hint is welcome.

greetings from germany
Chris


---
always remember, the world is a flat disk.

Offline

 

#2 2013-02-08 11:39:07

gkaefer
Member
From: Salzburg
Registered: 2009-06-09
Posts: 2678
Website

Re: <cursors> some questions...

each button of your theme gets an own plugin defination.
lets say you would do it for the sound-off button:

<plugin name="soundOFF"
        ...
        url="$(STYLEDIR)/gigapixel-menu-1a.png"
        ...
        crop="27|27|46|46"
        ...
        onovercrop="27|227|46|46"
        onover=""
        onout=""
        visible="false"
        enabled="true"
        zorder="15"
        ...
    />

so docu says:

crop="x-position|y-position|width|height"

source: http://www.krpano.com/docu/xml/#layer.crop

so as you can see in my screenshot, all elements and different states of my buttons, icons, backgrounds etc. are put into one singe png image with transparency. with the zorder statement than you can stack different images together to form new elements...
.. hey I forgot to implement the cursor icons - lol...

cool
Georg


Uploaded Images

Last edited by gkaefer (2013-02-08 11:45:59)

Offline

 

#3 2013-02-08 13:06:49

Christian Stüben
Member
From: Wuppertal, Germany
Registered: 2012-07-03
Posts: 269
Website

Re: <cursors> some questions...

Hi Georg,
thanks for the hint, so it is cleear how to define the cropping. Hmm, if i understand you correctly, i have to make four (or eight) plugin-definitions...

<plugin name="arrow_l"
        url="$(STYLEDIR)/gigapixel-menu-1a.png"
        crop="27|27|46|46"
        onovercrop="27|227|46|46"
/>


<plugin name="arrow_r"
        url="$(STYLEDIR)/gigapixel-menu-1a.png"
        crop="73|73|46|46"
        onovercrop="73|273|46|46"
/>


... and so on for all four or eight arrows. But how are the plugins connected to the arrows? Is the pluging name enough for connection or what else must be done? In the theme definition file where i have added my hotspot grafics?

$(STYLEDIR) is a metaname thet points to the current directory that holds the style informtation? In my case it should be C:\Users\cs\AppData\Local\Kolor\Panotour Pro 1.8\Kolor\Templates\themes\graphics\2Dhaifischbar where i already put some additional hotspot png files. Right?



Hey, found some info here ... http://www.autopano.net/wiki-en/action/ … U_TEMPLATE
some lines below are some examples for setting direction cursors. Maybee this helps to understand how all is glued together...



greetings from germany
Chris

Last edited by Christian Stüben (2013-02-08 13:08:19)


---
always remember, the world is a flat disk.

Offline

 

#4 2013-02-08 13:42:40

gkaefer
Member
From: Salzburg
Registered: 2009-06-09
Posts: 2678
Website

Re: <cursors> some questions...

you last link to the theme...

go to:

Two representations of the cursor depending on the mouse control mode
Move To mode
Drag panorama mode

the Move To mode is following image:
http://www.kolor.com/tutorials/Tutorial … ursors.png

the arrowcursors.png you can find in the referenced code in your link:

Code:

<!-- Change Cursors Appearance -->
<action name="setarrowcursors">
set(cursors.url, arrowcursors.png); 
set(cursors.type , 8way); 
set(cursors.move , 0|0|20|20); 
set(cursors.drag , 0|0|20|20); 
set(cursors.arrow_l , 20|0|20|20); 
set(cursors.arrow_lu, 40|0|20|20); 
set(cursors.arrow_u , 60|0|20|20); 
set(cursors.arrow_ru, 80|0|20|20); 
set(cursors.arrow_r , 100|0|20|20); 
set(cursors.arrow_rd, 120|0|20|20); 
set(cursors.arrow_d , 140|0|20|20); 
set(cursors.arrow_ld, 160|0|20|20);
</action>

so my example is from basic idea the same...
but only valid for icons fixed on panodesktop. the cursors have its own (more elegant) solution.
in above code you just have to give the action cursors new values to the subvariables. so if arrow left is triggered, than cursors.arrow_l get set to display arrowcursors.png, but not the complete png, but only from starting point (x=20;y=0) to endpoint (x+20;y+20).

Georg

Last edited by gkaefer (2013-02-08 13:43:03)

Offline

 

#5 2013-02-08 14:11:38

Christian Stüben
Member
From: Wuppertal, Germany
Registered: 2012-07-03
Posts: 269
Website

Re: <cursors> some questions...

Yep, thank you for confirming that the

Code:

<!-- Change Cursors Appearance -->
<action name="setarrowcursors">
set(cursors.url, arrowcursors.png); 
set(cursors.type , 8way); 
set(cursors.move , 0|0|20|20); 
set(cursors.drag , 0|0|20|20); 
set(cursors.arrow_l , 20|0|20|20); 
set(cursors.arrow_lu, 40|0|20|20); 
set(cursors.arrow_u , 60|0|20|20); 
set(cursors.arrow_ru, 80|0|20|20); 
set(cursors.arrow_r , 100|0|20|20); 
set(cursors.arrow_rd, 120|0|20|20); 
set(cursors.arrow_d , 140|0|20|20); 
set(cursors.arrow_ld, 160|0|20|20);
</action>

does the magic, as the link in my last posting. I think that will be enough "glue" to dare a try.
Thanks for your help.

greetings from germany
Chris

Last edited by Christian Stüben (2013-02-08 14:11:54)


---
always remember, the world is a flat disk.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson