[SOLVED] Cursor customization   [SOLVED] - View the solution

Share your tips and tricks here or get help with any Panotour 2.0 problem!
No bug reports (of any kind) in this forum!
no avatar
lapinede
New member
 
Topic author
Posts: 1
Likes: 0 post
Liked in: 0 post
Joined: Thu Oct 31, 2013 12:32 pm
Info

[SOLVED] Cursor customization

by lapinede » Thu Oct 31, 2013 12:49 pm

Hi all,

How can I change the cursor pointer? Like a hand instead of the pointer?
Thanks.

Benjamin.

User avatar
benji33
Kolor Team
 
Posts: 4480
Likes: 22 posts
Liked in: 84 posts
Joined: Tue Apr 09, 2013 10:59 am
Location: France
Info

Re: Cursor customization

by benji33 » Mon Nov 04, 2013 4:07 pm

Panotour doesn't offer this option yet. it's into the feature requests.

You can use the cursors tag of krpano into the xml main file to do it manually.
See here : http://krpano.com/docu/xml/#cursors

User avatar
ajlai fernandez
New member
 
Posts: 8
Likes: 0 post
Liked in: 0 post
Joined: Fri Oct 25, 2013 12:38 pm
Location: Spain
Info

Re: Cursor customization

by ajlai fernandez » Fri Feb 28, 2014 11:23 am

Hi,
please i will like to change the cursor, but I can not.
You can tell me how it's done?

User avatar
benji33
Kolor Team
 
Posts: 4480
Likes: 22 posts
Liked in: 84 posts
Joined: Tue Apr 09, 2013 10:59 am
Location: France
Info

Re: Cursor customization

by benji33 » Wed Mar 12, 2014 11:29 am

Use <cursors> tag into XML file.

See : http://krpano.com/docu/xml/#cursors

Sample : http://krpano.com/examples/116/examples/xml-usage/cursors/cursors.html
XML code of sample : http://krpano.com/examples/116/examples/xml-usage/cursors/cursors.xml

A task is opened to add default cursors. An other (later) to customize cusrsors.

no avatar
Spelican
Member
 
Posts: 16
Likes: 0 post
Liked in: 0 post
Joined: Sun Aug 28, 2011 6:21 pm
Info

Re: Cursor customization

by Spelican » Fri Mar 21, 2014 10:22 pm

If you don't want to edit your xml, check a PTP plugin here: http://dev.alexpopov.me/panotour_plugin ... index.html

User avatar
Destiny
Moderator
 
Posts: 6420
Likes: 0 post
Liked in: 72 posts
Joined: Mon Apr 26, 2010 11:55 pm
Location: Australia
Info

Re: Cursor customization

by Destiny » Sat Mar 22, 2014 4:09 am

How to create a custom cursor..

In your main xml copy and past this xml code which will call-in the custom cursor xml... Here you have 3 options, the qtvr, arrow-cursors and the dragcursor.. Or just copy and use only the related cursor you want...

<!-- Destiny Custom Cursor XML Code -->
<include url="%FIRSTXML%/cursors/qtvr-cursors.xml"/>
<!-- Destiny END qtvr Cursor XML -->

<!-- Destiny Custom Cursor XML --
<include url="%FIRSTXML%/cursors/arrow-cursors.xml"/>
<!-- Destiny END arrow-cursors Cursor XML -->

<!-- Destiny Custom Cursor XML --
<include url="%FIRSTXML%/cursors/dragcursor.xml"/>
<!-- Destiny END dragcursors Cursor XML -->

To activate a cursor, you just need to activate it by adding a > to the end where marked red or remove to deactivate. You can only have one activated.. You will see it shade out if its not activated...

I have split the xml code up below so you will need to create a folder called ”cursors” in your main directory. Then copy all of the cursor graphics over into that from the krpano files. You do not need the main cursors.xml…

You can now copy and past these xml codes below into the cursors folder.. Name them accordingly..

You can also create your very own cursor but some coding is required..

http://www.destinyvirtualtours.com/PTPV ... ursor.html

Destiny..


Name this one qtvr-cursors.xml
<krpano version="1.16">

<!-- text styles for startup text and onhover text -->
<textstyle name="infostyle"
origin="center" edge="center" yoffset="-100" textalign="center" background="false" border="false"
fontsize="40" textcolor="0xFFFFFF" bold="false" effect="glow(0xFFFFFF,0.7,4,2);glow(0x000000,1,4,2);dropshadow(3,45,0x000000,2,0.6);"
showtime="4.0" fadeintime="1.0" fadetime="1.0"
/>

<events onxmlcomplete="action(qtvrcursor);" />

<action name="qtvrcursor">
set(control.mousetype, moveto);
set(cursors.url, %CURRENTXML%/cursors/qtvr-cursors.png);
set(cursors.type, 8way);
set(cursors.move, 0|0|16|16);
set(cursors.drag, 16|0|16|16);
set(cursors.arrow_u, 32|0|16|16);
set(cursors.arrow_d, 48|0|16|16);
set(cursors.arrow_l, 64|0|16|16);
set(cursors.arrow_r, 80|0|16|16);
set(cursors.arrow_lu, 96|0|16|16);
set(cursors.arrow_ru, 112|0|16|16);
set(cursors.arrow_rd, 128|0|16|16);
set(cursors.arrow_ld, 144|0|16|16);
</action>

<plugin name="b3" style="buttonstyle"
html="[p]QTVR[/p]"
align="bottom" x="0" y="25"
onclick="action(qtvrcursor);"
/>
</krpano>



Name this one arrow-cursors.xml
<krpano version="1.16">

<!-- text styles for startup text and onhover text -->
<textstyle name="infostyle"
origin="center" edge="center" yoffset="-100" textalign="center" background="false" border="false"
fontsize="40" textcolor="0xFFFFFF" bold="false" effect="glow(0xFFFFFF,0.7,4,2);glow(0x000000,1,4,2);dropshadow(3,45,0x000000,2,0.6);"
showtime="4.0" fadeintime="1.0" fadetime="1.0"
/>

<events onxmlcomplete="action(arrowcursor);" />

<action name="arrowcursor">
set(control.mousetype, moveto);
set(cursors.url, %CURRENTXML%/cursors/arrow-cursors.png);
set(cursors.type, 4way);
set(cursors.move, 112|0|28|28);
set(cursors.drag, 112|0|28|28);
set(cursors.arrow_r, 0|0|28|28);
set(cursors.arrow_d, 28|0|28|28);
set(cursors.arrow_l, 56|0|28|28);
set(cursors.arrow_u, 84|0|28|28);
</action>

<plugin name="b2" style="buttonstyle"
html="[p]arrow[/p]"
align="bottom" x="-120" y="25"
onclick="action(arrowcursor);"
/>
</krpano>



Name this one dragcursor.xml
<krpano version="1.16">

<!-- text styles for startup text and onhover text -->
<textstyle name="infostyle"
origin="center" edge="center" yoffset="-100" textalign="center" background="false" border="false"
fontsize="40" textcolor="0xFFFFFF" bold="false" effect="glow(0xFFFFFF,0.7,4,2);glow(0x000000,1,4,2);dropshadow(3,45,0x000000,2,0.6);"
showtime="4.0" fadeintime="1.0" fadetime="1.0"
/>

<events onxmlcomplete="action(dragcursor);" />

<action name="dragcursor">
set(control.mousetype, drag2D);
set(cursors.url, %CURRENTXML%/cursors/drag-cursors.png);
set(cursors.type, drag);
set(cursors.move, 2|0|30|32);
set(cursors.drag, 37|0|30|32);
</action>

<plugin name="b4" style="buttonstyle"
html="[p]drag cursor[/p]"
align="bottom" x="120" y="25"
onclick="action(dragcursor);"
/>
</krpano>

User avatar
Destiny
Moderator
 
Posts: 6420
Likes: 0 post
Liked in: 72 posts
Joined: Mon Apr 26, 2010 11:55 pm
Location: Australia
Info

Re: [SOLVED] Cursor customization  [SOLVED]

by Destiny » Sun Jan 04, 2015 11:47 am

Hi..

For some reason my old solution does not work anymore.... and besides, there is superfluous code in my last, I must have rushed it. So this new Solution will facilitate your need to add a custom cursor. You can have many more but you will need to understand the code in relation to the graphic.

Simply replace the default code in red located in your #_core.xml file, for any one of the other code groups. You will also need a folder in your #data folder named 'cursors' where you will need to add the attached cursor graphics..

This url is to the Move Cursor example...

http://www.destinyvirtualtours.com/PTPV ... ursor.html

To be honest, I do not like using custom cursors since using Safari, it tends to cause issues with moving from the pano to the Safari menu..

Destiny..


<!-- Change Cursors Appearance - This is the default -->

<action name="setarrowcursors">
if (device.flash,
ifnot(device.mac,
set(cursors.url , %FIRSTXML%/graphics/cursors_move.png);
set(cursors.type , 8way);
set(cursors.move , 0|0|16|16);
set(cursors.drag , 16|0|16|16);
set(cursors.arrow_u , 32|0|16|16);
set(cursors.arrow_d , 48|0|16|16);
set(cursors.arrow_l , 64|0|16|16);
set(cursors.arrow_r , 80|0|16|16);
set(cursors.arrow_lu, 96|0|16|16);
set(cursors.arrow_ru, 112|0|16|16);
set(cursors.arrow_rd, 128|0|16|16);
set(cursors.arrow_ld, 144|0|16|16);
);
,
js(kpanotour.Cursors.setMoveCursor());
);
</action>



<!-- Change Cursors Appearance - QTVR Cursor - copy below and replace default -->

<events onxmlcomplete="action(qtvrcursor);" />

<action name="qtvrcursor">
set(control.mousetype, moveto);
set(cursors.url, %CURRENTXML%/cursors/qtvr-cursors.png);
set(cursors.type, 8way);
set(cursors.move, 0|0|16|16);
set(cursors.drag, 16|0|16|16);
set(cursors.arrow_u, 32|0|16|16);
set(cursors.arrow_d, 48|0|16|16);
set(cursors.arrow_l, 64|0|16|16);
set(cursors.arrow_r, 80|0|16|16);
set(cursors.arrow_lu, 96|0|16|16);
set(cursors.arrow_ru, 112|0|16|16);
set(cursors.arrow_rd, 128|0|16|16);
set(cursors.arrow_ld, 144|0|16|16);
</action>


<!-- Change Cursors Appearance - Big Arrow Cursor - copy below and replace default -->

<events onxmlcomplete="action(arrowcursor);" />

<action name="arrowcursor">
set(control.mousetype, moveto);
set(cursors.url, %CURRENTXML%/cursors/arrow-cursors.png);
set(cursors.type, 4way);
set(cursors.move, 112|0|28|28);
set(cursors.drag, 112|0|28|28);
set(cursors.arrow_r, 0|0|28|28);
set(cursors.arrow_d, 28|0|28|28);
set(cursors.arrow_l, 56|0|28|28);
set(cursors.arrow_u, 84|0|28|28);
</action>


<!-- Change Cursors Appearance - Drag Cursor - copy below and replace default -->

<events onxmlcomplete="action(dragcursor);" />

<action name="dragcursor">
set(control.mousetype, drag2D);
set(cursors.url, %CURRENTXML%/cursors/drag-cursors.png);
set(cursors.type, drag);
set(cursors.move, 2|0|30|32);
set(cursors.drag, 37|0|30|32);
</action>


<!-- Change Cursors Appearance - Move Cursor - copy below and replace default -->

<events onxmlcomplete="action(movecursor);" />

<action name="movecursor">
set(control.mousetype, moveto);
set(cursors.url, %CURRENTXML%/cursors/move-cursors.png);
set(cursors.type, drag);
set(cursors.move, 0|0|32|32);
set(cursors.drag, 32|0|32|32);
</action>
Attachments
cursors.zip
(12.57 KiB) Downloaded 11 times
qtvr-cursors.png
qtvr-cursors.png (718 Bytes) Viewed 402 times
move-cursors.png
move-cursors.png (3.84 KiB) Viewed 402 times
drag-cursors.png
drag-cursors.png (1.26 KiB) Viewed 402 times
arrow-cursors.png
arrow-cursors.png (4.58 KiB) Viewed 402 times

User avatar
doox
Member
 
Posts: 42
Likes: 1 post
Liked in: 0 post
Joined: Tue Dec 23, 2014 6:01 pm
Info

Re: [SOLVED] Cursor customization

by doox » Sun Jan 04, 2015 2:56 pm

all good
Last edited by doox on Mon Jan 05, 2015 9:43 pm, edited 1 time in total.

no avatar
mediavets
Member
 
Posts: 16133
Likes: 1 post
Liked in: 113 posts
Joined: Wed Nov 14, 2007 2:12 pm
Location: Isleham, Cambridgeshire, UK.
Info

Re: [SOLVED] Cursor customization

by mediavets » Sun Jan 04, 2015 8:46 pm

doox wrote:Cmon guys...Pls post a YOUTUBE Tutorial about each fing problem...not all of us are programers...for me all here is just another language that i don't understeand!!!!! PLssss....make some tutorials for Christ sake!!!


As I have stated elsewhere...

As you will be aware Panotour/Panotour Pro are GUI front-end command code generators for the krpano Flash and HTML5 Panorama Viewers.

They provide relatively simple access to a key subset of the capabilities of the krpano Viewers rather than forcing users to hand code.

IF you have the skills and wish to invest the time and effort you can modify and extend the command code generated by PT/PTP to utilise features and capabilities not currently supported via the GUI. This is often not at all easy and Kolor may or may not be willing to assist you in doing this but (IMO) has no obligation to do so. The whole point of their developing PT/PTP was to enable non-coders to be able to create virtual tours easily, but not to support every last bell and whistle offered by the krpano viewers..

If you would rather hand code your tours the krpano viewers and tools documentation can be found on the krpano web site:
http://www.krpano.com

Kolor software and documentation is available to trial prior to purchase so that potential purchasers can satisfy themselves that it will meet their requirements before purchasing a license.


Return to Using Panotour / Panotour Pro

Who is online

Users browsing this forum: No registered users and 1 guest