File conf/make/src.mk changed (mode: 100644) (index 09dff50..58afdbd) |
8 |
8 |
|
|
9 |
9 |
LUAFILES = \ |
LUAFILES = \ |
10 |
10 |
${srcdir}src/Chorus.lua \ |
${srcdir}src/Chorus.lua \ |
11 |
|
${srcdir}src/ChorusTest.lua \ |
|
12 |
|
${srcdir}src/local.lua \ |
|
13 |
11 |
${srcdir}src/ChorusAuraButtonTemplate.lua \ |
${srcdir}src/ChorusAuraButtonTemplate.lua \ |
14 |
12 |
${srcdir}src/ChorusAuraFrameTemplate.lua \ |
${srcdir}src/ChorusAuraFrameTemplate.lua \ |
15 |
13 |
${srcdir}src/ChorusAuraTooltipFrameTemplate.lua \ |
${srcdir}src/ChorusAuraTooltipFrameTemplate.lua \ |
|
14 |
|
${srcdir}src/ChorusAuraTooltipToggleButtonTemplate.lua \ |
16 |
15 |
${srcdir}src/ChorusCastFrameTemplate.lua \ |
${srcdir}src/ChorusCastFrameTemplate.lua \ |
|
16 |
|
${srcdir}src/ChorusConfFrame.lua \ |
|
17 |
|
${srcdir}src/ChorusFrame.lua \ |
|
18 |
|
${srcdir}src/ChorusGroupFrame.lua \ |
|
19 |
|
${srcdir}src/ChorusPartyFrame.lua \ |
17 |
20 |
${srcdir}src/ChorusProgressFrameTemplate.lua \ |
${srcdir}src/ChorusProgressFrameTemplate.lua \ |
18 |
21 |
${srcdir}src/ChorusRaidTargetIconFrameTemplate.lua \ |
${srcdir}src/ChorusRaidTargetIconFrameTemplate.lua \ |
19 |
22 |
${srcdir}src/ChorusRangeFrameTemplate.lua \ |
${srcdir}src/ChorusRangeFrameTemplate.lua \ |
|
23 |
|
${srcdir}src/ChorusSoloFrame.lua \ |
|
24 |
|
${srcdir}src/ChorusTest.lua \ |
20 |
25 |
${srcdir}src/ChorusThreatFrameTemplate.lua \ |
${srcdir}src/ChorusThreatFrameTemplate.lua \ |
21 |
26 |
${srcdir}src/ChorusUnitAffectingCombatFrameTemplate.lua \ |
${srcdir}src/ChorusUnitAffectingCombatFrameTemplate.lua \ |
22 |
27 |
${srcdir}src/ChorusUnitBackdropTemplate.lua \ |
${srcdir}src/ChorusUnitBackdropTemplate.lua \ |
|
... |
... |
${srcdir}src/ChorusUnitFrameTemplate.lua \ |
26 |
31 |
${srcdir}src/ChorusUnitGroupRoleFrameTemplate.lua \ |
${srcdir}src/ChorusUnitGroupRoleFrameTemplate.lua \ |
27 |
32 |
${srcdir}src/ChorusUnitLevelFrameTemplate.lua \ |
${srcdir}src/ChorusUnitLevelFrameTemplate.lua \ |
28 |
33 |
${srcdir}src/ChorusUnitNameFrameTemplate.lua \ |
${srcdir}src/ChorusUnitNameFrameTemplate.lua \ |
29 |
|
${srcdir}src/ChorusPartyFrame.lua \ |
|
30 |
|
${srcdir}src/ChorusGroupFrame.lua \ |
|
31 |
|
${srcdir}src/ChorusConfFrame.lua \ |
|
32 |
|
${srcdir}src/ChorusSoloFrame.lua \ |
|
33 |
|
${srcdir}src/ChorusFrame.lua |
|
|
34 |
|
${srcdir}src/local.lua |
34 |
35 |
|
|
35 |
36 |
XMLFILES = \ |
XMLFILES = \ |
36 |
37 |
${srcdir}src/Chorus.xml \ |
${srcdir}src/Chorus.xml \ |
37 |
|
${srcdir}src/ChorusFont.xml \ |
|
38 |
38 |
${srcdir}src/ChorusAuraButtonTemplate.xml \ |
${srcdir}src/ChorusAuraButtonTemplate.xml \ |
39 |
39 |
${srcdir}src/ChorusAuraFrameTemplate.xml \ |
${srcdir}src/ChorusAuraFrameTemplate.xml \ |
40 |
40 |
${srcdir}src/ChorusAuraTooltipFrameTemplate.xml \ |
${srcdir}src/ChorusAuraTooltipFrameTemplate.xml \ |
|
41 |
|
${srcdir}src/ChorusAuraTooltipSingletonFrame.xml \ |
|
42 |
|
${srcdir}src/ChorusAuraTooltipToggleButtonTemplate.xml \ |
41 |
43 |
${srcdir}src/ChorusCastFrameTemplate.xml \ |
${srcdir}src/ChorusCastFrameTemplate.xml \ |
|
44 |
|
${srcdir}src/ChorusConfFrame.xml \ |
|
45 |
|
${srcdir}src/ChorusFocusFrame.xml \ |
|
46 |
|
${srcdir}src/ChorusFont.xml \ |
|
47 |
|
${srcdir}src/ChorusFrame.xml \ |
|
48 |
|
${srcdir}src/ChorusGroupFrame.xml \ |
42 |
49 |
${srcdir}src/ChorusHealthFrameTemplate.xml \ |
${srcdir}src/ChorusHealthFrameTemplate.xml \ |
43 |
50 |
${srcdir}src/ChorusHugeUnitFrameTemplate.xml \ |
${srcdir}src/ChorusHugeUnitFrameTemplate.xml \ |
|
51 |
|
${srcdir}src/ChorusLargeRaidFrame.xml \ |
44 |
52 |
${srcdir}src/ChorusLargeUnitFrameTemplate.xml \ |
${srcdir}src/ChorusLargeUnitFrameTemplate.xml \ |
|
53 |
|
${srcdir}src/ChorusPartyFrame.xml \ |
|
54 |
|
${srcdir}src/ChorusPlayerFrame.xml \ |
45 |
55 |
${srcdir}src/ChorusPowerFrameTemplate.xml \ |
${srcdir}src/ChorusPowerFrameTemplate.xml \ |
46 |
56 |
${srcdir}src/ChorusProgressFrameTemplate.xml \ |
${srcdir}src/ChorusProgressFrameTemplate.xml \ |
|
57 |
|
${srcdir}src/ChorusRaidFrameTemplate.xml \ |
47 |
58 |
${srcdir}src/ChorusRaidTargetIconFrameTemplate.xml \ |
${srcdir}src/ChorusRaidTargetIconFrameTemplate.xml \ |
48 |
59 |
${srcdir}src/ChorusRangeFrameTemplate.xml \ |
${srcdir}src/ChorusRangeFrameTemplate.xml \ |
|
60 |
|
${srcdir}src/ChorusSmallRaidFrame.xml \ |
49 |
61 |
${srcdir}src/ChorusSmallUnitFrameTemplate.xml \ |
${srcdir}src/ChorusSmallUnitFrameTemplate.xml \ |
|
62 |
|
${srcdir}src/ChorusSoloFrame.xml \ |
|
63 |
|
${srcdir}src/ChorusTargetFrame.xml \ |
50 |
64 |
${srcdir}src/ChorusThreatFrameTemplate.xml \ |
${srcdir}src/ChorusThreatFrameTemplate.xml \ |
|
65 |
|
${srcdir}src/ChorusTinyRaidFrame.xml \ |
51 |
66 |
${srcdir}src/ChorusTinyUnitFrameTemplate.xml \ |
${srcdir}src/ChorusTinyUnitFrameTemplate.xml \ |
52 |
67 |
${srcdir}src/ChorusUnitAffectingCombatFrameTemplate.xml \ |
${srcdir}src/ChorusUnitAffectingCombatFrameTemplate.xml \ |
53 |
68 |
${srcdir}src/ChorusUnitBackdropTemplate.xml \ |
${srcdir}src/ChorusUnitBackdropTemplate.xml \ |
|
... |
... |
${srcdir}src/ChorusUnitButtonTemplate.xml \ |
56 |
71 |
${srcdir}src/ChorusUnitFrameTemplate.xml \ |
${srcdir}src/ChorusUnitFrameTemplate.xml \ |
57 |
72 |
${srcdir}src/ChorusUnitGroupRoleFrameTemplate.xml \ |
${srcdir}src/ChorusUnitGroupRoleFrameTemplate.xml \ |
58 |
73 |
${srcdir}src/ChorusUnitLevelFrameTemplate.xml \ |
${srcdir}src/ChorusUnitLevelFrameTemplate.xml \ |
59 |
|
${srcdir}src/ChorusUnitNameFrameTemplate.xml \ |
|
60 |
|
${srcdir}src/ChorusRaidFrameTemplate.xml \ |
|
61 |
|
${srcdir}src/ChorusFocusFrame.xml \ |
|
62 |
|
${srcdir}src/ChorusPlayerFrame.xml \ |
|
63 |
|
${srcdir}src/ChorusTargetFrame.xml \ |
|
64 |
|
${srcdir}src/ChorusPartyFrame.xml \ |
|
65 |
|
${srcdir}src/ChorusTinyRaidFrame.xml \ |
|
66 |
|
${srcdir}src/ChorusSmallRaidFrame.xml \ |
|
67 |
|
${srcdir}src/ChorusLargeRaidFrame.xml \ |
|
68 |
|
${srcdir}src/ChorusGroupFrame.xml \ |
|
69 |
|
${srcdir}src/ChorusConfFrame.xml \ |
|
70 |
|
${srcdir}src/ChorusSoloFrame.xml \ |
|
71 |
|
${srcdir}src/ChorusFrame.xml |
|
|
74 |
|
${srcdir}src/ChorusUnitNameFrameTemplate.xml |
File src/Chorus.xml changed (mode: 100644) (index 50abb84..99e2a8a) |
8 |
8 |
<Include file="ChorusAuraButtonTemplate.xml"/> |
<Include file="ChorusAuraButtonTemplate.xml"/> |
9 |
9 |
<Include file="ChorusAuraFrameTemplate.xml"/> |
<Include file="ChorusAuraFrameTemplate.xml"/> |
10 |
10 |
<Include file="ChorusAuraTooltipFrameTemplate.xml"/> |
<Include file="ChorusAuraTooltipFrameTemplate.xml"/> |
|
11 |
|
<Include file="ChorusAuraTooltipToggleButtonTemplate.xml"/> |
11 |
12 |
<Include file="ChorusProgressFrameTemplate.xml"/> |
<Include file="ChorusProgressFrameTemplate.xml"/> |
12 |
13 |
<Include file="ChorusHealthFrameTemplate.xml"/> |
<Include file="ChorusHealthFrameTemplate.xml"/> |
13 |
14 |
<Include file="ChorusPowerFrameTemplate.xml"/> |
<Include file="ChorusPowerFrameTemplate.xml"/> |
|
27 |
28 |
<Include file="ChorusLargeUnitFrameTemplate.xml"/> |
<Include file="ChorusLargeUnitFrameTemplate.xml"/> |
28 |
29 |
<Include file="ChorusSmallUnitFrameTemplate.xml"/> |
<Include file="ChorusSmallUnitFrameTemplate.xml"/> |
29 |
30 |
<Include file="ChorusTinyUnitFrameTemplate.xml"/> |
<Include file="ChorusTinyUnitFrameTemplate.xml"/> |
|
31 |
|
<!-- Frames (concrete classes, interface implementations, object instances). --> |
|
32 |
|
<Include file="ChorusAuraTooltipSingletonFrame.xml"/> |
30 |
33 |
<!-- `ChorusRaidFrameTemplate.xml` MUST be loaded AFTER all unit templates. --> |
<!-- `ChorusRaidFrameTemplate.xml` MUST be loaded AFTER all unit templates. --> |
31 |
34 |
<Include file="ChorusRaidFrameTemplate.xml"/> |
<Include file="ChorusRaidFrameTemplate.xml"/> |
32 |
|
<!-- Frames (concrete classes, interface implementations, object instances). --> |
|
33 |
35 |
<Include file="ChorusPartyFrame.xml"/> |
<Include file="ChorusPartyFrame.xml"/> |
34 |
36 |
<Include file="ChorusTinyRaidFrame.xml"/> |
<Include file="ChorusTinyRaidFrame.xml"/> |
35 |
37 |
<Include file="ChorusSmallRaidFrame.xml"/> |
<Include file="ChorusSmallRaidFrame.xml"/> |
File src/ChorusAuraFrameTemplate.lua changed (mode: 100644) (index 3af7b6d..f38b2c8) |
... |
... |
local function auraFrameEventProcessor(self, eventCategory, ...) |
97 |
97 |
end |
end |
98 |
98 |
end |
end |
99 |
99 |
|
|
100 |
|
assert(eventCategory ~= nil) |
|
101 |
|
|
|
102 |
100 |
local filter = SecureButton_GetAttribute(self, 'filter') |
local filter = SecureButton_GetAttribute(self, 'filter') |
103 |
101 |
assert(filter ~= nil) |
assert(filter ~= nil) |
104 |
102 |
assert('string' == type(filter)) |
assert('string' == type(filter)) |
|
... |
... |
function Chorus.auraFrameMain(self) |
229 |
227 |
end |
end |
230 |
228 |
end |
end |
231 |
229 |
|
|
|
230 |
|
--[[ OnAttributeChanged trigger only works out of combat and is only |
|
231 |
|
relied on during initialization. ]]-- |
|
232 |
|
|
|
233 |
|
self:SetScript('OnAttributeChanged', auraFrameEventProcessor) |
|
234 |
|
|
|
235 |
|
--[[ OnEvent trigger fires for UNIT_AURA mostly. ]]-- |
|
236 |
|
|
232 |
237 |
self:SetScript('OnEvent', auraFrameEventProcessor) |
self:SetScript('OnEvent', auraFrameEventProcessor) |
233 |
|
--self:SetScript('OnShow', auraFrameEventProcessor) |
|
|
238 |
|
|
|
239 |
|
--[[ OnShow trigger is critical for aura tooltip to work. ]]-- |
|
240 |
|
|
|
241 |
|
self:SetScript('OnShow', auraFrameEventProcessor) |
234 |
242 |
|
|
235 |
243 |
if auraWeightMap then |
if auraWeightMap then |
236 |
244 |
validateAuraWeightMap(auraWeightMap) |
validateAuraWeightMap(auraWeightMap) |
File src/ChorusAuraTooltipFrameTemplate.lua changed (mode: 100644) (index af1c2ec..de3ed46) |
... |
... |
local Chorus = Chorus |
6 |
6 |
|
|
7 |
7 |
local strtrim = strtrim |
local strtrim = strtrim |
8 |
8 |
|
|
9 |
|
local function getButtonAssociatedTooltipFrame(self) |
|
10 |
|
assert(self ~= nil) |
|
11 |
|
|
|
12 |
|
local p = self:GetParent() |
|
13 |
|
|
|
14 |
|
assert(p ~= nil, 'invalid state: aura tooltip toggle button ' .. |
|
15 |
|
'must have siblings and therefore must have a parent') |
|
16 |
|
|
|
17 |
|
local tooltipFrame = _G[p:GetName() .. 'AuraTooltipFrame'] |
|
18 |
|
|
|
19 |
|
return tooltipFrame |
|
20 |
|
end |
|
21 |
|
|
|
22 |
|
--[[-- |
|
23 |
|
Initialize the button to toggle `ChorusAuraTooltipFrame` in restricted |
|
24 |
|
environment. |
|
25 |
|
|
|
26 |
|
When this button is clicked, it must show a frame, that contains an exhaustive |
|
27 |
|
list of auras that effect the corresponding unit. |
|
28 |
|
|
|
29 |
|
@function auraTooltipToggleButtonMain |
|
30 |
|
@tparam frame self this aura tooltip toggle button |
|
31 |
|
]] |
|
32 |
|
local function auraTooltipToggleButtonMain(self) |
|
33 |
|
assert(self ~= nil) |
|
34 |
|
|
|
35 |
|
--[[ @warning For some bizzare reason, only programmatically created |
|
36 |
|
secure handlers, or secure handlers that descend from secure frames, |
|
37 |
|
define the required method of `SetFrameRef`. ]]-- |
|
38 |
|
|
|
39 |
|
local nama = (self:GetName() or '') .. 'SecureClickHandlerFrame' |
|
40 |
|
|
|
41 |
|
local secureClickHandler = _G[nama] or CreateFrame('BUTTON', nama, self, |
|
42 |
|
'SecureHandlerClickTemplate') |
|
43 |
|
|
|
44 |
|
assert(secureClickHandler ~= nil) |
|
45 |
|
|
|
46 |
|
local tooltipFrame = getButtonAssociatedTooltipFrame(self) |
|
47 |
|
assert(tooltipFrame ~= nil, 'invalid state: sibling aura tooltip frame must exist'); |
|
48 |
|
|
|
49 |
|
secureClickHandler:SetFrameRef('ChorusAuraTooltipFrame', tooltipFrame); |
|
50 |
|
|
|
51 |
|
secureClickHandler:WrapScript(self, 'OnClick', [=[ |
|
52 |
|
local tooltipFrame = self:GetFrameRef('ChorusAuraTooltipFrame') |
|
53 |
|
if not tooltipFrame then |
|
54 |
|
tooltipFrame = owner:GetFrameRef('ChorusAuraTooltipFrame') |
|
55 |
|
end |
|
56 |
|
if tooltipFrame then |
|
57 |
|
tooltipFrame:Show() |
|
58 |
|
else |
|
59 |
|
error('ChorusAuraTooltipFrameTemplate.lua: invalid state ' .. |
|
60 |
|
'could not access aura tooltip frame') |
|
61 |
|
return |
|
62 |
|
end |
|
63 |
|
]=]); |
|
64 |
|
|
|
65 |
|
--[[ Aura tooltip toggle button is a protected frame. It's visibility |
|
66 |
|
must be toggled with a unit watch. Most likely. ]]-- |
|
67 |
|
|
|
68 |
|
RegisterUnitWatch(self) |
|
69 |
|
end |
|
70 |
|
|
|
71 |
9 |
--[[-- |
--[[-- |
72 |
10 |
`ChorusAuraTooltipFrameTemplate` is *not* the familiar tooltip frame. Instead, |
`ChorusAuraTooltipFrameTemplate` is *not* the familiar tooltip frame. Instead, |
73 |
11 |
it is intended to conditionally show all auras on a given unit. |
it is intended to conditionally show all auras on a given unit. |
|
... |
... |
local function auraTooltipFrameMain(self) |
121 |
59 |
]=]) |
]=]) |
122 |
60 |
end |
end |
123 |
61 |
|
|
124 |
|
Chorus.auraTooltipToggleButtonMain = function(...) |
|
125 |
|
return auraTooltipToggleButtonMain(...) |
|
126 |
|
end |
|
127 |
|
|
|
128 |
62 |
Chorus.auraTooltipFrameMain = function(...) |
Chorus.auraTooltipFrameMain = function(...) |
129 |
63 |
return auraTooltipFrameMain(...) |
return auraTooltipFrameMain(...) |
130 |
64 |
end |
end |
File src/ChorusAuraTooltipToggleButtonTemplate.lua added (mode: 100644) (index 0000000..bb6a4d1) |
|
1 |
|
local Chorus = Chorus |
|
2 |
|
|
|
3 |
|
local SecureButton_GetUnit = Chorus.test.SecureButton_GetUnit or SecureButton_GetUnit |
|
4 |
|
|
|
5 |
|
local function init(toggleButton) |
|
6 |
|
assert(toggleButton ~= nil) |
|
7 |
|
|
|
8 |
|
--[[ Inherit the unit from parent frames. ]]-- |
|
9 |
|
local u = SecureButton_GetUnit(toggleButton) |
|
10 |
|
assert(u ~= nil, 'invalid state: unit required') |
|
11 |
|
toggleButton:SetAttribute('attribute-value', u) |
|
12 |
|
|
|
13 |
|
local secureClickHandler = ChorusAuraTooltipSingletonFrameSecureClickHandlerFrame |
|
14 |
|
assert(secureClickHandler ~= nil, 'invalid state: secure click handler must exist') |
|
15 |
|
|
|
16 |
|
local tooltipFrame = ChorusAuraTooltipSingletonFrame |
|
17 |
|
assert(tooltipFrame ~= nil, 'invalid state: aura tooltip singleton frame must exist'); |
|
18 |
|
toggleButton:SetAttribute('attribute-frame', tooltipFrame) |
|
19 |
|
|
|
20 |
|
secureClickHandler:SetFrameRef('ChorusAuraTooltipSingletonFrame', tooltipFrame); |
|
21 |
|
|
|
22 |
|
secureClickHandler:WrapScript(toggleButton, 'OnClick', [=[ |
|
23 |
|
local secureClickHandler = owner |
|
24 |
|
local toggleButton = self |
|
25 |
|
|
|
26 |
|
local tooltipFrame = toggleButton:GetFrameRef('ChorusAuraTooltipSingletonFrame') |
|
27 |
|
if not tooltipFrame then |
|
28 |
|
tooltipFrame = owner:GetFrameRef('ChorusAuraTooltipSingletonFrame') |
|
29 |
|
end |
|
30 |
|
|
|
31 |
|
if not tooltipFrame then |
|
32 |
|
error('ChorusAuraTooltipSingletonFrameTemplate.lua: invalid state: ' .. |
|
33 |
|
'could not access aura tooltip frame') |
|
34 |
|
return |
|
35 |
|
end |
|
36 |
|
|
|
37 |
|
local u = toggleButton:GetAttribute('attribute-value') |
|
38 |
|
|
|
39 |
|
if tooltipFrame and u then |
|
40 |
|
tooltipFrame:SetAttribute('unit', u) |
|
41 |
|
--[[ Force trigger 'OnShow' callback on the tooltipFrame. ]]-- |
|
42 |
|
if tooltipFrame:IsShown() then |
|
43 |
|
tooltipFrame:Hide() |
|
44 |
|
end |
|
45 |
|
tooltipFrame:Show() |
|
46 |
|
end |
|
47 |
|
]=]) |
|
48 |
|
|
|
49 |
|
--[[ Aura tooltip toggle button is a protected frame. It's visibility |
|
50 |
|
must be toggled with a unit watch. Most likely. ]]-- |
|
51 |
|
|
|
52 |
|
RegisterUnitWatch(toggleButton) |
|
53 |
|
end |
|
54 |
|
|
|
55 |
|
--[[-- |
|
56 |
|
Initialize the button to toggle `ChorusAuraTooltipSingletonFrame` in restricted |
|
57 |
|
environment. |
|
58 |
|
|
|
59 |
|
When this button is clicked, it must show a frame, that contains an exhaustive |
|
60 |
|
list of auras that effect the corresponding unit. |
|
61 |
|
|
|
62 |
|
There is only one `ChorusAuraTooltipSingletonFrame` and several toggle buttons |
|
63 |
|
for each unit. When the button is clicked, it modifies the state of the aura |
|
64 |
|
tooltip, to correspond to the unit the toggle button is associated with. |
|
65 |
|
|
|
66 |
|
@function auraTooltipSingletonToggleButtonMain |
|
67 |
|
@tparam frame toggleButton this aura tooltip toggle button |
|
68 |
|
]] |
|
69 |
|
function Chorus.auraTooltipSingletonToggleButtonMain(toggleButton) |
|
70 |
|
--[[ Delay initialization until the game is loaded entirely. ]]-- |
|
71 |
|
|
|
72 |
|
toggleButton:RegisterEvent('PLAYER_LOGIN') |
|
73 |
|
toggleButton:SetScript('OnEvent', init) |
|
74 |
|
toggleButton:SetScript('OnAttributeChanged', function(self, attributeName) |
|
75 |
|
if 'unit' == tostring(attributeName) then |
|
76 |
|
--[[ Inherit the unit from parent frames. ]]-- |
|
77 |
|
local u = SecureButton_GetUnit(self) |
|
78 |
|
assert(u ~= nil, 'invalid state: unit required') |
|
79 |
|
self:SetAttribute('attribute-value', u) |
|
80 |
|
end |
|
81 |
|
end) |
|
82 |
|
end |
File src/ChorusAuraTooltipToggleButtonTemplate.xml added (mode: 100644) (index 0000000..226f287) |
|
1 |
|
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
|
<Ui xmlns="http://www.blizzard.com/wow/ui/"> |
|
3 |
|
<!-- Requires `ChorusAuraTooltipFrameTemplate.xml` |
|
4 |
|
and `ChorusAuraTooltipSingletonFrame.xml`. --> |
|
5 |
|
<Script file="ChorusAuraTooltipToggleButtonTemplate.lua"/> |
|
6 |
|
<Button name="ChorusAuraTooltipSingletonFrameToggleButtonTemplate" virtual="true" enableMouse="true" inherits="SecureActionButtonTemplate"> |
|
7 |
|
<Size> |
|
8 |
|
<AbsDimension x="16" y="16"/> |
|
9 |
|
</Size> |
|
10 |
|
<Attributes> |
|
11 |
|
<Attribute name="type" type="string" value="attribute"/> |
|
12 |
|
<!-- The property `attribute-frame` must be applied at runtime. |
|
13 |
|
The attribute type `frame` is defined in the engine, and it is required here, |
|
14 |
|
but it is not accessibe via FrameXML. --> |
|
15 |
|
<!--<Attribute name="attribute-frame" type="frame" value="ChorusAuraTooltipSingletonFrame"/>--> |
|
16 |
|
<Attribute name="attribute-name" type="string" value="unit"/> |
|
17 |
|
<!-- The `unit` property is inherited from parent and applied to `attribute-value` property dynamically. --> |
|
18 |
|
<!--<Attribute name="attribute-value" type="string" value="target"/>--> |
|
19 |
|
<Attribute name="useparent-unit" type="boolean" value="true"/> |
|
20 |
|
</Attributes> |
|
21 |
|
<Scripts> |
|
22 |
|
<OnLoad>Chorus.auraTooltipSingletonToggleButtonMain(self);</OnLoad> |
|
23 |
|
</Scripts> |
|
24 |
|
<!--<NormalTexture file="Interface\MoneyFrame\Arrow-Right-Up"/>--> |
|
25 |
|
<!--<PushedTexture file="Interface\MoneyFrame\Arrow-Right-Down"/>--> |
|
26 |
|
<!--<DisabledTexture file="Interface\MoneyFrame\Arrow-Right-Disabled"/>--> |
|
27 |
|
<NormalTexture file="Interface\Buttons\UI-Panel-QuestHideButton"> |
|
28 |
|
<TexCoords left="0" right="0.5" top="0.5" bottom="1"/> |
|
29 |
|
</NormalTexture> |
|
30 |
|
<PushedTexture file="Interface\Buttons\UI-Panel-QuestHideButton"> |
|
31 |
|
<TexCoords left="0.5" right="1" top="0.5" bottom="1"/> |
|
32 |
|
</PushedTexture> |
|
33 |
|
<HighlightTexture file="Interface\Buttons\UI-Panel-MinimizeButton-Highlight" alphaMode="ADD" /> |
|
34 |
|
<DisabledTexture file="Interface\Buttons\UI-Panel-QuestHideButton-disabled" /> |
|
35 |
|
</Button> |
|
36 |
|
</Ui> |
File src/ChorusPartyFrame.lua changed (mode: 100644) (index aac8eb0..f196a39) |
... |
... |
local function partyMemberFrameInit(partyMemberFrame) |
66 |
66 |
local unitFrame = _G[n .. 'UnitFrame'] |
local unitFrame = _G[n .. 'UnitFrame'] |
67 |
67 |
local petFrame = _G[n .. 'PetFrame'] |
local petFrame = _G[n .. 'PetFrame'] |
68 |
68 |
local targetFrame = _G[n .. 'TargetFrame'] |
local targetFrame = _G[n .. 'TargetFrame'] |
|
69 |
|
local tooltipToggleButton = _G[n .. 'UnitFrameAuraTooltipToggleButton'] |
69 |
70 |
assert(unitFrame ~= nil) |
assert(unitFrame ~= nil) |
70 |
71 |
assert(petFrame ~= nil) |
assert(petFrame ~= nil) |
71 |
72 |
assert(targetFrame ~= nil) |
assert(targetFrame ~= nil) |
|
73 |
|
assert(tooltipToggleButton ~= nil, "invalid state: cannot find tooltip button for " .. n) |
72 |
74 |
|
|
73 |
75 |
unitFrame:SetAttribute('unit', u) |
unitFrame:SetAttribute('unit', u) |
74 |
76 |
petFrame:SetAttribute('unit', upet) |
petFrame:SetAttribute('unit', upet) |
75 |
77 |
targetFrame:SetAttribute('unit', utarget) |
targetFrame:SetAttribute('unit', utarget) |
|
78 |
|
tooltipToggleButton:SetAttribute('attribute-value', u) |
76 |
79 |
end |
end |
77 |
80 |
|
|
78 |
81 |
function Chorus.partyMemberFrameMain(partyMemberFrame) |
function Chorus.partyMemberFrameMain(partyMemberFrame) |