File src/ChorusProgressFrameTemplate.lua changed (mode: 100644) (index 98e309b..920cebf) |
... |
... |
local function getRatio(a, b) |
100 |
100 |
return ratio |
return ratio |
101 |
101 |
end |
end |
102 |
102 |
|
|
|
103 |
|
local function applySize(self) |
|
104 |
|
assert(self ~= nil) |
|
105 |
|
|
|
106 |
|
local label = self.label |
|
107 |
|
assert(label ~= nil) |
|
108 |
|
|
|
109 |
|
if self:GetHeight() >= 12 then |
|
110 |
|
label:Show() |
|
111 |
|
else |
|
112 |
|
label:Hide() |
|
113 |
|
end |
|
114 |
|
end |
|
115 |
|
|
103 |
116 |
local function applyRatio(self, a, b) |
local function applyRatio(self, a, b) |
104 |
117 |
self.ratio = getRatio(a, b) |
self.ratio = getRatio(a, b) |
105 |
118 |
end |
end |
|
... |
... |
local function healthFrameEventProcessor(self) |
277 |
290 |
return |
return |
278 |
291 |
end |
end |
279 |
292 |
|
|
|
293 |
|
applySize(self) |
280 |
294 |
applyRatioHealth(self, unitDesignation) |
applyRatioHealth(self, unitDesignation) |
281 |
295 |
applyOverlayHealth(self, unitDesignation) |
applyOverlayHealth(self, unitDesignation) |
282 |
296 |
|
|
|
... |
... |
local function powerFrameEventProcessor(self) |
331 |
345 |
|
|
332 |
346 |
local unitDesignation = self.unit |
local unitDesignation = self.unit |
333 |
347 |
if not unitDesignation and p then |
if not unitDesignation and p then |
334 |
|
unitDesignation = unitDesignation or p.unit |
|
|
348 |
|
unitDesignation = unitDesignation or p.unit or p:GetAttribute('unit') |
335 |
349 |
end |
end |
336 |
350 |
|
|
337 |
351 |
assert(unitDesignation ~= nil) |
assert(unitDesignation ~= nil) |
|
... |
... |
local function powerFrameEventProcessor(self) |
373 |
387 |
|
|
374 |
388 |
if UnitPowerMax(unitDesignation, powerTypeEnum) > 0 then |
if UnitPowerMax(unitDesignation, powerTypeEnum) > 0 then |
375 |
389 |
self:Show() |
self:Show() |
|
390 |
|
applySize(self) |
376 |
391 |
applyRatioPower(self, unitDesignation, powerTypeEnum) |
applyRatioPower(self, unitDesignation, powerTypeEnum) |
377 |
392 |
applyOverlayPower(self, unitDesignation, powerTypeEnum) |
applyOverlayPower(self, unitDesignation, powerTypeEnum) |
378 |
393 |
applyPowerFrameColor(self, powerTypeEnum) |
applyPowerFrameColor(self, powerTypeEnum) |
File src/ChorusRaidUnitButtonTemplate.xml changed (mode: 100644) (index 6f7a673..0688b53) |
37 |
37 |
</Anchor> |
</Anchor> |
38 |
38 |
</Anchors> |
</Anchors> |
39 |
39 |
</Frame> |
</Frame> |
|
40 |
|
<Frame name="$parentPowerFrame" inherits="ChorusPowerFrameTemplate"> |
|
41 |
|
<Size> |
|
42 |
|
<AbsDimension x="144" y="6"/> |
|
43 |
|
</Size> |
|
44 |
|
<Anchors> |
|
45 |
|
<Anchor point="TOPLEFT" relativeTo="$parentHealthFrame" relativePoint="BOTTOMLEFT"> |
|
46 |
|
<Offset> |
|
47 |
|
<AbsDimension x="0" y="0"/> |
|
48 |
|
</Offset> |
|
49 |
|
</Anchor> |
|
50 |
|
</Anchors> |
|
51 |
|
</Frame> |
40 |
52 |
<Frame name="$parentBuffFrame" inherits="ChorusAuraFrameTemplate"> |
<Frame name="$parentBuffFrame" inherits="ChorusAuraFrameTemplate"> |
41 |
53 |
<Size> |
<Size> |
42 |
54 |
<AbsDimension x="144" y="24"/> |
<AbsDimension x="144" y="24"/> |
43 |
55 |
</Size> |
</Size> |
44 |
56 |
<Anchors> |
<Anchors> |
45 |
|
<Anchor point="TOPLEFT"> |
|
|
57 |
|
<Anchor point="TOPLEFT" relativeTo="$parentPowerFrame" relativePoint="BOTTOMLEFT"> |
46 |
58 |
<Offset> |
<Offset> |
47 |
|
<AbsDimension x="0" y="-36"/> |
|
|
59 |
|
<AbsDimension x="0" y="0"/> |
48 |
60 |
</Offset> |
</Offset> |
49 |
61 |
</Anchor> |
</Anchor> |
50 |
62 |
</Anchors> |
</Anchors> |