File choir.lua changed (mode: 100644) (index adcdd38..fd2a30b) |
... |
... |
local function createClearcastingSubset(unitButton) |
36 |
36 |
return harmSubset, helpSubset |
return harmSubset, helpSubset |
37 |
37 |
end |
end |
38 |
38 |
|
|
|
39 |
|
local function createClearcastingSubsetRaid(unitButton) |
|
40 |
|
assert (unitButton ~= nil) |
|
41 |
|
|
|
42 |
|
if not ClearcastingFrame then |
|
43 |
|
trace('could not access Clearcasting module') |
|
44 |
|
return |
|
45 |
|
end |
|
46 |
|
|
|
47 |
|
local createSubset = ClearcastingFrame.createSubset |
|
48 |
|
assert (createSubset ~= nil) |
|
49 |
|
|
|
50 |
|
--[[ FIXME Update indicator unit designation when unit button attribute changes at runtime. |
|
51 |
|
-- This is not an expected use-case. Rather it is a matter of robustness. ]]-- |
|
52 |
|
local unitDesignation = unitButton:GetAttribute('unit') |
|
53 |
|
assert (unitDesignation ~= nil) |
|
54 |
|
|
|
55 |
|
local harmSubset = createSubset(unitButton, unitButton:GetName() .. 'HarmfulSubsetFrame', |
|
56 |
|
unitDesignation, 'HARMFUL', |
|
57 |
|
2, 1, 16, 32) |
|
58 |
|
harmSubset:SetPoint('BOTTOMLEFT', 0, 0) |
|
59 |
|
|
|
60 |
|
--[[ |
|
61 |
|
local t = {harmSubset:GetChildren()} |
|
62 |
|
local i = 0 |
|
63 |
|
while (i < #t) do |
|
64 |
|
i = i + 1 |
|
65 |
|
local b = t[i] |
|
66 |
|
local label = b.text or _G[b:GetName() .. 'Text'] |
|
67 |
|
label:Hide() |
|
68 |
|
end |
|
69 |
|
]]-- |
|
70 |
|
|
|
71 |
|
return harmSubset |
|
72 |
|
end |
|
73 |
|
|
39 |
74 |
local function createBindingKeyHandler(button) |
local function createBindingKeyHandler(button) |
40 |
75 |
assert (button ~= nil) |
assert (button ~= nil) |
41 |
76 |
|
|
|
... |
... |
local function createRaidGroupFrame(raidFrame, groupNumber, unitSetOverride) |
685 |
720 |
end |
end |
686 |
721 |
|
|
687 |
722 |
local buttonWidth = 48 |
local buttonWidth = 48 |
688 |
|
local buttonHeight = 24 + 12 + 8 |
|
|
723 |
|
local buttonHeight = 24 + 12 + 8 + 36 |
689 |
724 |
local padding = 2 |
local padding = 2 |
690 |
725 |
local labelWidth = 60 |
local labelWidth = 60 |
691 |
726 |
|
|
|
... |
... |
local function createRaidGroupFrame(raidFrame, groupNumber, unitSetOverride) |
716 |
751 |
local n = groupFrame:GetName() .. 'RaidUnitButton' .. tostring(i) |
local n = groupFrame:GetName() .. 'RaidUnitButton' .. tostring(i) |
717 |
752 |
local b = createUnitButton(groupFrame, n, unitDesignation, buttonWidth, buttonHeight) |
local b = createUnitButton(groupFrame, n, unitDesignation, buttonWidth, buttonHeight) |
718 |
753 |
b:SetPoint('BOTTOMLEFT', labelWidth + (i - 1) * (padding + b:GetWidth()), 0) |
b:SetPoint('BOTTOMLEFT', labelWidth + (i - 1) * (padding + b:GetWidth()), 0) |
|
754 |
|
createClearcastingSubsetRaid(b) |
719 |
755 |
end |
end |
720 |
756 |
|
|
721 |
757 |
groupFrame:RegisterEvent('PARTY_CONVERTED_TO_RAID') |
groupFrame:RegisterEvent('PARTY_CONVERTED_TO_RAID') |
|
... |
... |
local function createRaidFrame(rootFrame, spoilerHolder) |
737 |
773 |
local maxSubgroupQuantity = 8 |
local maxSubgroupQuantity = 8 |
738 |
774 |
|
|
739 |
775 |
local buttonWidth = 48 |
local buttonWidth = 48 |
740 |
|
local buttonHeight = 24 + 12 + 8 |
|
|
776 |
|
local buttonHeight = 24 + 12 + 8 + 36 |
741 |
777 |
local padding = 2 |
local padding = 2 |
742 |
778 |
|
|
743 |
779 |
local labelWidth = 60 |
local labelWidth = 60 |
744 |
780 |
local raidFrame = CreateFrame('FRAME', 'ChoirRaidFrame', rootFrame) |
local raidFrame = CreateFrame('FRAME', 'ChoirRaidFrame', rootFrame) |
745 |
781 |
raidFrame:SetSize(labelWidth + (padding + buttonWidth) * maxPartySize, |
raidFrame:SetSize(labelWidth + (padding + buttonWidth) * maxPartySize, |
746 |
782 |
(padding + buttonHeight) * (maxSubgroupQuantity + 1)) |
(padding + buttonHeight) * (maxSubgroupQuantity + 1)) |
747 |
|
raidFrame:SetPoint('TOPLEFT', 0, -144) |
|
|
783 |
|
raidFrame:SetPoint('TOPLEFT', 0, -64) |
748 |
784 |
|
|
749 |
785 |
--[[ TODO Add any debuff indicator ]]-- |
--[[ TODO Add any debuff indicator ]]-- |
750 |
786 |
local j = 0 |
local j = 0 |