forked from noisiver/unbot-addon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUnBotTemplate.xml
90 lines (89 loc) · 2.55 KB
/
UnBotTemplate.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\FrameXML\UI.xsd">
<Frame name="UnBotSubFrameTemplate" enableMouse="true" toplevel="false" frameStrata="LOW" virtual="true" hidden="false">
<Size x="1" y="1"/>
<Anchors>
<Anchor point="BOTTOMLEFT" relativeTo="$parent" relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="0" y="1"/>
</Offset>
</Anchor>
</Anchors>
</Frame>
<Button name="UnBotCommandButtonTemplate" virtual="true">
<Size>
<AbsDimension y="24" x="24"/>
</Size>
<Scripts>
<OnShow>
self.showMenu = false;
self.Icon = self:CreateTexture("UnBotCommandIcon"..tostring(self.groupIndex),"BACKGROUND");
self.Icon:SetAllPoints(self);
self.Icon:Show();
self:SetPushedTexture([[Interface\BUTTONS\UI-Quickslot-Depress]]);
self:SetHighlightTexture([[Interface\Buttons\UI-Common-MouseHilight]],"ADD");
local bindingKeytext = self:CreateFontString("$parentLabel", "ARTWORK", "GameFontNormalSmall");
bindingKeytext:SetFont("Fonts\\FRIZQT__.TTF",12);
bindingKeytext:SetPoint("TOP", self.Icon, "TOP", 1, -1);
</OnShow>
<OnEnter>
CommandButton_OnEnter(self,self.comIndex,1);
</OnEnter>
<OnLeave>
GameTooltip:Hide();
</OnLeave>
<OnMouseUp>
if ( arg1 == "RightButton" ) then
if (self.groupIndex > 0) then
local subFrame = _G["UnBotSubFrame"..tostring(self.groupIndex)];
if(subFrame) then
if (self.showMenu == true) then
self.showMenu = false;
subFrame:Hide();
else
self.showMenu = true;
subFrame:Show();
end
end
else
UnBotCloseAll();
end
end
</OnMouseUp>
<OnClick>
SubCommandButton_OnLeftClick(self.comIndex);
</OnClick>
</Scripts>
</Button>
<Button name="UnBotCommandSubButtonTemplate" virtual="true">
<Size>
<AbsDimension y="24" x="24"/>
</Size>
<Anchors>
<Anchor point="BOTTOMLEFT" relativeTo="$parent" relativePoint="TOPLEFT">
<Offset>
<AbsDimension y="0" x="0"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnShow>
self.Icon = getglobal("UnBotSubIcon"..tostring(self.comIndex));
</OnShow>
<OnEnter>
CommandButton_OnEnter(self,self.comIndex,2);
</OnEnter>
<OnLeave>
GameTooltip:Hide();
</OnLeave>
<OnMouseUp>
if ( arg1 == "RightButton" ) then
ResetCommandToAction(self,self.comIndex,true);
end
</OnMouseUp>
<OnClick>
SubCommandButton_OnLeftClick(self.comIndex);
</OnClick>
</Scripts>
</Button>
</Ui>