社区应用 最新帖子 精华区 社区服务 会员列表 统计排行 道具中心
主题 : 问一下右键选单的制作问题
skyjerry149 离线
级别: ②入门
显示用户信息 
0  发表于: 2013-11-02   
来源于 KR 分类

问一下右键选单的制作问题

我按右键,右键选单有出现
再按一次右键,右键选单也会消失
但是如果对着右键选单的按钮按右键的话,右键选单并不会消失
我一定要在按钮之外的地方按右键,右键选单才会消失




想更方便點
我想对着右键选单的按钮按右键时,右键选单也会消失
請問我該怎麼做


附上我的右鍵選單
*rclick
[rclick jump=true  target=*drclick enabled=true]


[backlay]
[position layer=message1 page=back left=0 top=0 width=800 height=600 opacity=0 visible=true]
[current page=back  layer=message1]


[locate x=265 y=177]
[button graphic="rmenu\Save"  storage="save.ks" target=*save layer=message1]
[locate x=265 y=213]
[button graphic="rmenu\Load"  storage="load.ks" target=*load layer=message1]
[locate x=265 y=249]
[button graphic="rmenu\Tips"  storage="tips.ks" target=*tips layer=message1]
[locate x=265 y=285]
[button graphic="rmenu\Skip"  storage="skip.ks" target=*skip layer=message1]
[locate x=265 y=322]
[button graphic="rmenu\Hide"  storage="hide.ks" target=*hide layer=message1]
[locate x=265 y=357]
[button graphic="rmenu\Back"  storage="back.ks" target=*back layer=message1]
[trans method=crossfade time=250][wt]


[s]


*drclick
[position page=back layer=message1 left=0 top=0 height=600 width=800 opacity=0 visible=false]
[trans  method=crossfade  time=250]
[wt]
[current  page=fore  layer=message1][er]
[current  page=fore  layer=message0]


[rclick call=true target=*rclick enabled=true]
[return]

评价一下你浏览此帖子的感受

精彩

感动

搞笑

开心

愤怒

无聊

灌水
skyjerry149 离线
级别: ②入门
显示用户信息 
1  发表于: 2013-11-02   
研究了兩天,終於出來了
把ButtonLayer.tjs的onMouseUp()改寫成以下
    function onMouseUp(x,y,button,shift)
    {
        if(enabled && button == mbLeft){
        // onMouseUp イベントハンドラ
        if(Butt_mouseDown) onExecute(...);
        Butt_mouseDown = false;
        update();
        super.onMouseUp(...);
        }

        if((enabled && button == mbRight)&& sf.rclick==true){
        kag.process("rclick.ks", "*drclick");
        super.onMouseUp(...);
        }
    }
---------------------------------------------------------------------------------------------------------
到first.ks加入
[rclick call=true storage="rclick.ks"  target=*rclick  enabled=true]

---------------------------------------------------------------------------------------------------------
到rclick.ks加入
*rclick
[eval exp="sf.rclick = true"]
[rclick jump=true  target=*drclick enabled=true]
[backlay]
[position layer=message1 page=back left=0 top=0 width=800 height=600 opacity=0 visible=true]
[current layer=message1 page=back]

[locate x=265 y=177]
[button graphic="rmenu\Save"  storage="save.ks" target=*save layer=message1]
[locate x=265 y=213]
[button graphic="rmenu\Load"  storage="load.ks" target=*load layer=message1]
[locate x=265 y=249]
[button graphic="rmenu\Tips"  storage="tips.ks" target=*tips layer=message1]
[locate x=265 y=285]
[button graphic="rmenu\Skip"  storage="skip.ks" target=*skip layer=message1]
[locate x=265 y=322]
[button graphic="rmenu\Hide"  storage="hide.ks" target=*hide layer=message1]
[locate x=265 y=357]
[button graphic="rmenu\Back"  storage="back.ks" target=*back layer=message1]
[trans method=crossfade time=250]
[wt]
[s]

*drclick
[eval exp="sf.rclick = false"]
[backlay]
[position page=back layer=message1 left=0 top=0 height=600 width=800 opacity=0 visible=false]

[trans  method=crossfade  time=250][wt]
[current  page=fore  layer=message1][er]
[current  page=fore  layer=message0]

[rclick call=true target=*rclick enabled=true]

[return]
---------------------------------------------------------------------------------------------------------
這樣子對右鍵選單點右鍵,也可以使右鍵選單消去了
描述
快速回复

认证码:

验证问题:
12-5=?,答案:7 正确答案:7
按"Ctrl+Enter"直接提交