File src/ChorusAuraFrameTemplate.lua changed (mode: 100644) (index f38b2c8..e33c725) |
... |
... |
local auraButtonRefresh = Chorus.auraButtonRefresh |
10 |
10 |
|
|
11 |
11 |
local SecureButton_GetUnit = Chorus.test.SecureButton_GetUnit or SecureButton_GetUnit |
local SecureButton_GetUnit = Chorus.test.SecureButton_GetUnit or SecureButton_GetUnit |
12 |
12 |
|
|
13 |
|
--[[ See `FrameXML/BuffFrame.lua:BUFF_MAX_DISPLAY`. ]]-- |
|
14 |
|
local BUFF_MAX_DISPLAY = BUFF_MAX_DISPLAY or 36 |
|
15 |
|
--[[ See `FrameXML/BuffFrame.lua:DEBUFF_MAX_DISPLAY`. ]]-- |
|
16 |
|
local DEBUFF_MAX_DISPLAY = DEBUFF_MAX_DISPLAY or 36 |
|
17 |
|
|
|
18 |
13 |
local auraWeightMap = ChorusAuraWeightMap |
local auraWeightMap = ChorusAuraWeightMap |
19 |
14 |
|
|
20 |
15 |
--[[-- |
--[[-- |
|
... |
... |
local function createEveryAuraButton(auraFrame) |
150 |
145 |
local n = self:GetName() |
local n = self:GetName() |
151 |
146 |
assert(n ~= nil) |
assert(n ~= nil) |
152 |
147 |
|
|
153 |
|
local max = math.max(BUFF_MAX_DISPLAY or 36, DEBUFF_MAX_DISPLAY or 36) or 36 |
|
|
148 |
|
local buttonSize = 30 |
|
149 |
|
local frameWidth = math.max(auraFrame:GetWidth(), buttonSize) |
|
150 |
|
local columnQuantity = math.ceil(frameWidth / buttonSize) |
154 |
151 |
local i = 0 |
local i = 0 |
155 |
|
local w = math.max(self:GetWidth(), 30) |
|
156 |
|
local bmaxh = 30 |
|
157 |
|
local x = 0 |
|
158 |
|
local y = 0 |
|
159 |
|
while (i < max) do |
|
|
152 |
|
local column = 0 |
|
153 |
|
local row = 0 |
|
154 |
|
while (i < 36) do |
160 |
155 |
i = i + 1 |
i = i + 1 |
161 |
|
|
|
162 |
|
local m = string.format('%sAuraButton%02d', n, i) |
|
163 |
|
local b = CreateFrame('FRAME', m, self, 'ChorusAuraLargeButtonTemplate') |
|
164 |
|
b:SetPoint('TOPLEFT', x, -y) |
|
165 |
|
x = x + b:GetWidth() |
|
166 |
|
bmaxh = math.max(bmaxh, b:GetHeight()) |
|
167 |
|
if x >= w then |
|
168 |
|
x = 0 |
|
169 |
|
y = y + bmaxh |
|
|
156 |
|
local m = string.format('%s%02d', n, i) |
|
157 |
|
local f = CreateFrame('FRAME', m, auraFrame, 'ChorusAuraLargeButtonTemplate') |
|
158 |
|
f:SetPoint('TOPLEFT', buttonSize * column, buttonSize * -row) |
|
159 |
|
column = column + 1 |
|
160 |
|
if column >= columnQuantity then |
|
161 |
|
column = 0 |
|
162 |
|
row = row + 1 |
170 |
163 |
end |
end |
171 |
164 |
end |
end |
172 |
165 |
end |
end |
File src/ChorusAuraTooltipFrameTemplate.xml changed (mode: 100644) (index 070258a..c64bd8c) |
3 |
3 |
<Script file="ChorusAuraTooltipFrameTemplate.lua"/> |
<Script file="ChorusAuraTooltipFrameTemplate.lua"/> |
4 |
4 |
<Frame name="ChorusAuraTooltipFrameAuraFrameTemplate" frameStrata="TOOLTIP" inherits="ChorusAuraFrameTemplate" virtual="true"> |
<Frame name="ChorusAuraTooltipFrameAuraFrameTemplate" frameStrata="TOOLTIP" inherits="ChorusAuraFrameTemplate" virtual="true"> |
5 |
5 |
<Size> |
<Size> |
6 |
|
<AbsDimension x="180" y="180"/> |
|
|
6 |
|
<AbsDimension x="360" y="90"/> |
7 |
7 |
</Size> |
</Size> |
8 |
8 |
<!-- Allocate `ChorusAuraButtonTemplate` instances dynamically at runtime, |
<!-- Allocate `ChorusAuraButtonTemplate` instances dynamically at runtime, |
9 |
9 |
instead of declaring them in this descriptor with `Frames` tag. |
instead of declaring them in this descriptor with `Frames` tag. |
10 |
10 |
See ChorusAuraFrameTemplate.lua. --> |
See ChorusAuraFrameTemplate.lua. --> |
11 |
11 |
</Frame> |
</Frame> |
12 |
|
<Frame name="ChorusAuraTooltipFrameTemplate" inherits="SecureFrameTemplate" frameStrata="TOOLTIP" hidden="true" virtual="true" protected="true" movable="true" enableMouse="true"> |
|
|
12 |
|
<Frame name="ChorusAuraTooltipFrameTemplate" inherits="SecureFrameTemplate" frameStrata="TOOLTIP" hidden="true" virtual="true" protected="true" movable="true" enableMouse="true" toplevel="true"> |
13 |
13 |
<Size> |
<Size> |
14 |
|
<AbsDimension x="192" y="384"/> |
|
|
14 |
|
<AbsDimension x="370" y="210"/> |
15 |
15 |
</Size> |
</Size> |
16 |
|
<Backdrop bgFile="Interface\Tooltips\UI-Tooltip-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true"> |
|
17 |
|
<EdgeSize> |
|
18 |
|
<AbsValue val="16"/> |
|
19 |
|
</EdgeSize> |
|
20 |
|
<TileSize> |
|
21 |
|
<AbsValue val="16"/> |
|
22 |
|
</TileSize> |
|
23 |
|
<BackgroundInsets> |
|
24 |
|
<AbsInset left="5" right="5" top="5" bottom="5"/> |
|
25 |
|
</BackgroundInsets> |
|
26 |
|
</Backdrop> |
|
|
16 |
|
<Layers> |
|
17 |
|
<Layer level="BACKGROUND"> |
|
18 |
|
<Texture name="$parentTitleBG" file="Interface\PaperDollInfoFrame\UI-GearManager-Title-Background"> |
|
19 |
|
<Anchors> |
|
20 |
|
<Anchor point="TOPLEFT"> |
|
21 |
|
<Offset x="9" y="-6"/> |
|
22 |
|
</Anchor> |
|
23 |
|
<Anchor point="BOTTOMRIGHT" relativePoint="TOPRIGHT"> |
|
24 |
|
<Offset x="-28" y="-24"/> |
|
25 |
|
</Anchor> |
|
26 |
|
</Anchors> |
|
27 |
|
</Texture> |
|
28 |
|
<Texture name="$parentDialogBG" file="Interface\Tooltips\UI-Tooltip-Background"> |
|
29 |
|
<Anchors> |
|
30 |
|
<Anchor point="TOPLEFT"> |
|
31 |
|
<Offset x="8" y="-24"/> |
|
32 |
|
</Anchor> |
|
33 |
|
<Anchor point="BOTTOMRIGHT"> |
|
34 |
|
<Offset x="-6" y="8"/> |
|
35 |
|
</Anchor> |
|
36 |
|
</Anchors> |
|
37 |
|
<Color r="0" g="0" b="0" a=".75"/> |
|
38 |
|
</Texture> |
|
39 |
|
</Layer> |
|
40 |
|
<Layer level="BORDER"> |
|
41 |
|
<Texture name="$parentTopLeft" file="Interface\PaperDollInfoFrame\UI-GearManager-Border"> |
|
42 |
|
<Size x="64" y="64"/> |
|
43 |
|
<Anchors> |
|
44 |
|
<Anchor point="TOPLEFT"/> |
|
45 |
|
</Anchors> |
|
46 |
|
<TexCoords left="0.501953125" right="0.625" top="0" bottom="1"/> |
|
47 |
|
</Texture> |
|
48 |
|
<Texture name="$parentTopRight" file="Interface\PaperDollInfoFrame\UI-GearManager-Border"> |
|
49 |
|
<Size x="64" y="64"/> |
|
50 |
|
<Anchors> |
|
51 |
|
<Anchor point="TOPRIGHT"/> |
|
52 |
|
</Anchors> |
|
53 |
|
<TexCoords left="0.625" right="0.75" top="0" bottom="1"/> |
|
54 |
|
</Texture> |
|
55 |
|
<Texture name="$parentTop" file="Interface\PaperDollInfoFrame\UI-GearManager-Border"> |
|
56 |
|
<Size x="0" y="64"/> |
|
57 |
|
<Anchors> |
|
58 |
|
<Anchor point="TOPLEFT" relativeTo="$parentTopLeft" relativePoint="TOPRIGHT"/> |
|
59 |
|
<Anchor point="TOPRIGHT" relativeTo="$parentTopRight" relativePoint="TOPLEFT"/> |
|
60 |
|
</Anchors> |
|
61 |
|
<TexCoords left="0.25" right="0.369140625" top="0" bottom="1"/> |
|
62 |
|
</Texture> |
|
63 |
|
<Texture name="$parentBottomLeft" file="Interface\PaperDollInfoFrame\UI-GearManager-Border"> |
|
64 |
|
<Size x="64" y="64"/> |
|
65 |
|
<Anchors> |
|
66 |
|
<Anchor point="BOTTOMLEFT"/> |
|
67 |
|
</Anchors> |
|
68 |
|
<TexCoords left="0.751953125" right="0.875" top="0" bottom="1"/> |
|
69 |
|
</Texture> |
|
70 |
|
<Texture name="$parentBottomRight" file="Interface\PaperDollInfoFrame\UI-GearManager-Border"> |
|
71 |
|
<Size x="64" y="64"/> |
|
72 |
|
<Anchors> |
|
73 |
|
<Anchor point="BOTTOMRIGHT"/> |
|
74 |
|
</Anchors> |
|
75 |
|
<TexCoords left="0.875" right="1" top="0" bottom="1"/> |
|
76 |
|
</Texture> |
|
77 |
|
<Texture name="$parentBottom" file="Interface\PaperDollInfoFrame\UI-GearManager-Border"> |
|
78 |
|
<Size x="0" y="64"/> |
|
79 |
|
<Anchors> |
|
80 |
|
<Anchor point="BOTTOMLEFT" relativeTo="$parentBottomLeft" relativePoint="BOTTOMRIGHT"/> |
|
81 |
|
<Anchor point="BOTTOMRIGHT" relativeTo="$parentBottomRight" relativePoint="BOTTOMLEFT"/> |
|
82 |
|
</Anchors> |
|
83 |
|
<TexCoords left="0.376953125" right="0.498046875" top="0" bottom="1"/> |
|
84 |
|
</Texture> |
|
85 |
|
<Texture name="$parentLeft" file="Interface\PaperDollInfoFrame\UI-GearManager-Border"> |
|
86 |
|
<Size x="64" y="0"/> |
|
87 |
|
<Anchors> |
|
88 |
|
<Anchor point="TOPLEFT" relativeTo="$parentTopLeft" relativePoint="BOTTOMLEFT"/> |
|
89 |
|
<Anchor point="BOTTOMLEFT" relativeTo="$parentBottomLeft" relativePoint="TOPLEFT"/> |
|
90 |
|
</Anchors> |
|
91 |
|
<TexCoords left="0.001953125" right="0.125" top="0" bottom="1"/> |
|
92 |
|
</Texture> |
|
93 |
|
<Texture name="$parentRight" file="Interface\PaperDollInfoFrame\UI-GearManager-Border"> |
|
94 |
|
<Size x="64" y="0"/> |
|
95 |
|
<Anchors> |
|
96 |
|
<Anchor point="TOPRIGHT" relativeTo="$parentTopRight" relativePoint="BOTTOMRIGHT"/> |
|
97 |
|
<Anchor point="BOTTOMRIGHT" relativeTo="$parentBottomRight" relativePoint="TOPRIGHT"/> |
|
98 |
|
</Anchors> |
|
99 |
|
<TexCoords left="0.1171875" right="0.2421875" top="0" bottom="1"/> |
|
100 |
|
</Texture> |
|
101 |
|
</Layer> |
|
102 |
|
</Layers> |
27 |
103 |
<Frames> |
<Frames> |
28 |
104 |
<Button name="$parentSecureHandlerClickFrame" inherits="SecureHandlerClickTemplate"/> |
<Button name="$parentSecureHandlerClickFrame" inherits="SecureHandlerClickTemplate"/> |
29 |
105 |
<Frame name="$parentSecureHandlerShowHideFrame" inherits="SecureHandlerShowHideTemplate"/> |
<Frame name="$parentSecureHandlerShowHideFrame" inherits="SecureHandlerShowHideTemplate"/> |
30 |
106 |
<Frame name="$parentUnitNameFrame" inherits="ChorusUnitNameFrameTemplate"> |
<Frame name="$parentUnitNameFrame" inherits="ChorusUnitNameFrameTemplate"> |
31 |
107 |
<Anchors> |
<Anchors> |
32 |
|
<Anchor point="TOPRIGHT"> |
|
33 |
|
<Offset x="0" y="-3"/> |
|
34 |
|
</Anchor> |
|
35 |
108 |
<Anchor point="TOPLEFT"> |
<Anchor point="TOPLEFT"> |
36 |
|
<Offset x="12" y="-3"/> |
|
37 |
|
</Anchor> |
|
38 |
|
<Anchor point="BOTTOMLEFT" relativeTo="$parent" relativePoint="TOPLEFT"> |
|
39 |
|
<Offset x="0" y="-24"/> |
|
40 |
|
</Anchor> |
|
41 |
|
<Anchor point="BOTTOMRIGHT" relativeTo="$parent" relativePoint="TOPRIGHT"> |
|
42 |
|
<Offset x="0" y="-24"/> |
|
|
109 |
|
<Offset x="12" y="-6"/> |
43 |
110 |
</Anchor> |
</Anchor> |
44 |
111 |
</Anchors> |
</Anchors> |
45 |
112 |
</Frame> |
</Frame> |
46 |
113 |
<Button name="$parentCloseButton" inherits="UIPanelCloseButton,SecureActionButtonTemplate"> |
<Button name="$parentCloseButton" inherits="UIPanelCloseButton,SecureActionButtonTemplate"> |
47 |
114 |
<Size> |
<Size> |
48 |
|
<AbsDimension x="24" y="24"/> |
|
|
115 |
|
<AbsDimension x="32" y="32"/> |
49 |
116 |
</Size> |
</Size> |
50 |
117 |
<Anchors> |
<Anchors> |
51 |
118 |
<Anchor point="TOPRIGHT"> |
<Anchor point="TOPRIGHT"> |
52 |
|
<Offset x="-6" y="-6"/> |
|
|
119 |
|
<Offset x="2" y="1"/> |
53 |
120 |
</Anchor> |
</Anchor> |
54 |
121 |
</Anchors> |
</Anchors> |
55 |
122 |
</Button> |
</Button> |