Ok。我来问了。如果木牛人回答偶会很失落滴。。Binding问题
很简单。我发的那个Venantes。突然发现没有按键绑定部分。召唤各位没良心的大大帮忙。虽然没良心,但我还要Orz。。。我多么可怜一个孩子啊啊啊啊啊。。。。为了你们的声望好茷。。回答我。。我要的。。就是按键绑定。
哪个大大教以下。
[url=http://www.wowwiki.com/HOWTO:_Use_Bindings.xml_to_create_key_bindings_for_your_AddOn]http://www.wowwiki.com/HOWTO:_Use_Bindings.xml_to_create_key_bindings_for_your_AddOn[/url]
这个网站我看了。(感谢飞浪YD地share)
没看懂- -
谢谢!
为了声望。冲啊 提供个地址
[url]http://bbs.cwowaddon.com/thread-1452-1-1.html[/url]
我Venantes的地址。。
有兴趣的大大帮忙看看。。。
还有。原来Cryolysis的绑定貌似很牛逼。。。
‘用lua写的。。想学。。。
咳。。我承认我超级小白。。但是我总得学吧。。好多e文看不懂。。我不就只有问了。。对伐?嘿嘿 As of 2.0, "dummy" bindings (bindings containing only a comment) can be used with names that match the Bindings.xml syntax for saving spell, item, macro and click bindings. Because these terms have spaces in them, you will need to use global name-string references to set the names that appear by them.
在2.0中,“虚拟”绑定(仅包含一条注释的绑定)可以在bindings.xml中用于符合语法规则的法术、物品、宏和点击动作的绑定。因为这些字段通常带有空格,你需要使用全局名称字符串来设定显示出来的名称。
[code]<Bindings>
<Binding name="SPELL Corruption">
-- Corruption
</Binding>
<Binding name="ITEM Heavy Netherweave Bandage">
-- HNB
</Binding>
<Binding name="MACRO RawrBomb!">
-- blitz
</Binding>
<Binding name="CLICK TargetFrame:RightButton">
-- menu!
</Binding>
</Bindings>[/code]
你的插件主lua
[code]_G["BINDING_NAME_SPELL Corruption"] = "Dot 'em up!"
setglobal("BINDING_NAME_CLICK TargetFrame:RightButton", "Open your target menu")[/code]
[color=#000000][size=2]
Notes [/size][/color]
[color=#000000][size=2]The Binding attribute is needed to use the keystate variable; unneeded otherwise. [/size][/color]
[color=#000000][size=2]A binding with no keystate will fire on key down. [/size][/color]
[color=#000000][size=2]WoW starts a new header when it finds a header="MYDOSTUFF" in a binding definition.[/size][/color]
[color=#000000][size=2]You can not "hook into" a previous header using this way because the variables die after the Bindings.xml file has been processed. [/size][/color]
[color=#000000][size=2]WoW tries to look for a lua variable BINDING_HEADER_MYDOSTUFF if you use header="MYDOSTUFF".[/size][/color]
[color=#000000][size=2]If it can not find that, your binding will end up with the previous header. [/size][/color]
[color=#000000][size=2]If you use name="DOSTUFF" then WoW tries to look for a lua variable[/size][/color]
[color=#000000][size=2]named BINDING_NAME_DOSTUFF. If that is not found, it uses description.[/size][/color]
[color=#000000][size=2]If description is not present, it uses the name.[/size][/color]
[color=#000000][size=2]This last case will look ugly. [/size][/color]
[size=2][color=#000000]As of 2.1, the code blocks cannot be empty or the keybindings interface will ignore the binding. A comment is enough, i.e. "-- dummy".[/color][/size]
[font=Times New Roman][size=3][color=#000000] [/color][/size][/font]
[font=宋体][font=Tahoma][size=2][color=#000000]注意[/color][/size][/font][/font]
[size=2][color=#000000] [/color][/size]
[size=2][color=#000000]1、[font=Tahoma] [/font][/color][color=#000000][font=Tahoma][font=宋体]绑定属性[/font]runOnUp="true"[font=宋体]使用了[/font]keystate[font=宋体](按键状态)变量,否则它就是不需要的[/font][/font][/color][/size]
[size=2][color=#000000]2、[font=Tahoma] [/font][/color][color=#000000][font=Tahoma][font=宋体]没有[/font]keystate[font=宋体]变量约束的按键绑定意味着在按键按下时即生效[/font][/font][/color][/size]
[size=2][color=#000000]3、[font=Tahoma] [/font][/color][color=#000000][font=Tahoma][font=宋体]如果按键绑定代码中出现了[/font]"MYDOSTUFF"[font=宋体]报头则[/font]WoW[font=宋体]会启用一个新的报头[/font][/font][/color][/size]
[size=2][color=#000000]4、[font=Tahoma] [/font][/color][color=#000000][font=Tahoma][font=宋体]你无法通过这种方法关联前一报头,因为在[/font]bindings.xml[font=宋体]开始运作后这些变量会消失[/font][/font][/color][/size]
[size=2][color=#000000]5、[font=Tahoma] [/font][/color][color=#000000][font=Tahoma][font=宋体]如果你使用了[/font]"MYDOSTUFF"[font=宋体]报头则[/font]WoW[font=宋体]会尝试寻找[/font]BINDING_HEADER_MYDOSTUFF[font=宋体]这一[/font]lua[font=宋体]变量[/font][/font][/color][/size]
[size=2][color=#000000]6、[font=Tahoma] [/font][/color][color=#000000][font=Tahoma][font=宋体]如果找不到[/font]BINDING_HEADER_MYDOSTUFF[font=宋体]变量则你的绑定会停止于上一报头[/font][/font][/color][/size]
[size=2][color=#000000]7、[font=Tahoma] [/font][/color][color=#000000][font=Tahoma][font=宋体]如果你使用[/font]name="DOSTUFF"[font=宋体]则[/font]WoW[font=宋体]会寻找[/font]BINDING_NAME_DOSTUFF[font=宋体]变量,如果该变量不存在则使用描述信息,如果描述信息不存在则使用名称[/font][/font][/color][/size]
[size=2][color=#000000]8、[font=Tahoma] [/font][/color][font=宋体][font=Tahoma][color=#000000]最后一条会让你的代码看起来很乱[/color][/font][/font][/size]
[size=2][color=#000000]9、[font=Tahoma] [/font][/color][color=#000000][font=Tahoma][font=宋体]在[/font]2.1[font=宋体]中代码隔断不能为空格,否则按键绑定界面会忽略这个绑定,一个简单的注释就可以解决这个问题,例如[/font]"-- dummy"[/font][/color][/size]
[font=新宋体][/font] 按键绑定, 太宽泛了吧, 你的具体问题是什么呢? 另外, 有问题直接问就好了, 别发那些无关的东西.
页:
[1]