krpano之鼠标样式修改

krpano之鼠标样式修改

引入cursors.js。

cursors.js代码:

<krpano >

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

<!--鼠标样式样式属性开始 -->
  <!--(1)-->
 <action name="qtvrcursor">
        set(control.mousetype, moveto);
        set(cursors.url,  skin/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>
<!--(2)-->
    <action name="dragcursor">
        set(control.mousetype, drag2D);
        set(cursors.url,  skin/drag-cursors.png);
        set(cursors.type, drag);
        set(cursors.move,  2|0|30|32);
        set(cursors.drag, 37|0|30|32);
    </action>
<!--(3)-->
    <action name="arrowcursor">
        set(control.mousetype, moveto);
        set(cursors.url,  skin/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>
<!--鼠标样式样式属性 END-->

</krpano>
View Code

并在对应位置放置鼠标样式的图片

例如:

 

posted @ 2017-08-17 19:27  莫小龙  阅读(622)  评论(0编辑  收藏  举报