GameMenuFrame中的问题
小弟在搞Supermacro的回归。。但无奈它的菜单按钮和ACP重合。。琢磨N久不得解。。哪位大大指点怎样修改那个按钮的位置 以下是ACP.xml的部分代码:[language=xml] <Button name="GameMenuButtonAddOns" inherits="GameMenuButtonTemplate" text="AddOns" parent="GameMenuFrame">
<Anchors>
<Anchor point="TOP" relativeTo="GameMenuButtonMacros" relativePoint="BOTTOM">
<Offset>
<AbsDimension x="0" y="-1"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
GameMenuButtonLogout:SetPoint("TOP",this:GetName(),"BOTTOM",0,-1);
GameMenuFrame:SetHeight(GameMenuFrame:GetHeight()+25);
</OnLoad>
<OnClick>
PlaySound("igMainMenuOption");
HideUIPanel(GameMenuFrame);
ShowUIPanel(ACP_AddonList);
</OnClick>
</Scripts>
</Button>
[/language]
注意其中的 Anchor 的 relativeTo 属性,它决定了按钮的基准位置(不知道这么叫准确不准确)。这个例子中,按钮位于"宏命令设置"按钮的下面。具体偏差由 Offset 所规定。 谢谢楼上大大。。但我笨啊。。还有问题。。就是那一列按钮的名称都是什么啊?
P.s.下。。大大你们又是怎么知道那些模块名称的呢? <!--
<Button name="GameMenuButtonSuperMacro" inherits="GameMenuButtonTemplate" text="SUPERMACRO_BUTTON" parent="GameMenuFrame">
<Size>
<AbsDimension x="25" y="190"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="GameMenuButtonOptions" relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="0" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>
PlaySound("igMainMenuOption");
HideUIPanel(GameMenuFrame);
ShowUIPanel(SuperMacroFrame);
</OnClick>
</Scripts>
</Button>
-->
如上,在supermacro.xml中发现如上语句。。前后的<!-- -->是怎么回事?注释掉了么? 默认的按钮为:
视频设置 GameMenuButtonOptions
声音设置 GameMenuButtonSoundOptions
界面设置 GameMenuButtonUIOptions
按键设置 GameMenuButtonKeybindings
宏命令 GameMenuButtonMacros
登出 GameMenuButtonLogout
退出 GameMenuButtonQuit
继续游戏 GameMenuButtonContinue
其实这些东西都可以在UI源代码中看到的,[url=http://wdn.wowinterface.com/]http://wdn.wowinterface.com/[/url] 可以下载各个版本的源代码。 4楼的问题呢。。大大 帮忙给个答案 <Button name="GameMenuButtonSuperMacro" inherits="GameMenuButtonTemplate" text="SUPERMACRO_TITLE" parent="GameMenuFrame">
<Size>
<AbsDimension x="190" y="25"/>
</Size>
<Anchors>
<Anchor point="TOP" relativeTo="GameMenuButtonOptions" relativePoint="RIGHT">
<Offset>
<AbsDimension x="20" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>
PlaySound("igMainMenuOption");
HideUIPanel(GameMenuFrame);
ShowUIPanel(SuperMacroFrame);
</OnClick>
</Scripts>
</Button>
我弄出来的一段代码。。可是还是不行。设置的按钮位置依旧和ACP重合。。。 ……说实话,我弄出来的也不行 嘎。。。我现在发现问题了。。ACP的位置我能移动掉。但同样的方法。。SM就不行!郁闷掉了 我搞出来SM的按钮是竖着的…… [quote]原帖由 [i]火之神殇[/i] 于 2007-8-16 09:19 发表 [url=http://bbs.cwowaddon.com/redirect.php?goto=findpost&pid=13963&ptid=1401][img]http://bbs.cwowaddon.com/images/common/back.gif[/img][/url]
如上,在supermacro.xml中发现如上语句。。前后的是怎么回事?注释掉了么? [/quote]
是被注释掉了 SM应该还有一个按钮
就是那个竖着的 竖着的那个应该是放在右边的,不过不知道怎么做。简单试了一下没搞定。 supermacro的GameMenuButton位置由SM_Option.lua 中一段函数确定,该函数引用自MoveAnyThing
在其尾部加上
if ( GameMenuButtonAddOns ) then
GameMenuFrame:SetHeight(GameMenuFrame:GetHeight() - 25);
GameMenu_AddButton(GameMenuButtonAddOns);
end
应该就好了,服务器维护中,没测试过
很久以前就用supermacro
这次做UI找了半天supermacro又看了半天,感觉花这么多内存来扩展macro不划算,256字符以上的话自己编个function写在lua里加载,在macro里直接/script运行就好了,节约资源
页:
[1]