File clearcasting.lua changed (mode: 100644) (index d9666e3..3e5d744) |
... |
... |
local function subsetEventProcessor(subsetFrame) |
681 |
681 |
local category = auraTable[5] or 'none' |
local category = auraTable[5] or 'none' |
682 |
682 |
assert (category ~= nil) |
assert (category ~= nil) |
683 |
683 |
local red, green, blue = getAuraCategoryColor(category) |
local red, green, blue = getAuraCategoryColor(category) |
684 |
|
local alpha = 0.6 |
|
685 |
|
background:SetTexture(red, green, blue, alpha) |
|
|
684 |
|
background:SetTexture(red, green, blue) |
686 |
685 |
|
|
687 |
686 |
local casterDesignation = auraTable[8] |
local casterDesignation = auraTable[8] |
688 |
687 |
if 'player' == casterDesignation then |
if 'player' == casterDesignation then |
|
... |
... |
local function createSubsetButtonArtwork(subsetButton) |
753 |
752 |
|
|
754 |
753 |
local buttonWidth = subsetButton:GetWidth() |
local buttonWidth = subsetButton:GetWidth() |
755 |
754 |
local buttonHeight = subsetButton:GetHeight() |
local buttonHeight = subsetButton:GetHeight() |
|
755 |
|
local padding = 2 |
|
756 |
|
|
|
757 |
|
local marginBottom = math.max(buttonWidth, buttonHeight) - math.min(buttonWidth, buttonHeight) + padding |
756 |
758 |
|
|
757 |
|
local marginBottom = math.max(buttonWidth, buttonHeight) - math.min(buttonWidth, buttonHeight) |
|
758 |
759 |
local artwork = subsetButton:CreateTexture(subsetButton:GetName() .. 'Artwork', 'ARTWORK') |
local artwork = subsetButton:CreateTexture(subsetButton:GetName() .. 'Artwork', 'ARTWORK') |
759 |
|
artwork:SetPoint('TOPLEFT', 0, 0) |
|
760 |
|
artwork:SetPoint('TOPRIGHT', 0, 0) |
|
761 |
|
artwork:SetPoint('BOTTOMLEFT', 0, marginBottom) |
|
762 |
|
artwork:SetPoint('BOTTOMRIGHT', 0, marginBottom) |
|
|
760 |
|
artwork:SetPoint('TOPLEFT', padding, -padding) |
|
761 |
|
artwork:SetPoint('TOPRIGHT', -padding, -padding) |
|
762 |
|
artwork:SetPoint('BOTTOMLEFT', padding, marginBottom) |
|
763 |
|
artwork:SetPoint('BOTTOMRIGHT', padding, marginBottom) |
763 |
764 |
artwork:SetTexture("Interface\\Icons\\spell_nature_wispsplode") |
artwork:SetTexture("Interface\\Icons\\spell_nature_wispsplode") |
|
765 |
|
local texMargin = 1.0 / 8.0 |
|
766 |
|
--artwork:SetTexCoord(0, 0.5, 0.5, 1) -- bottom left |
|
767 |
|
--artwork:SetTexCoord(0.5, 0.0, 0.5, 1) -- bottom right |
|
768 |
|
--artwork:SetTexCoord(0.1, 0.9, 0.1, 0.9) -- bottom right |
|
769 |
|
artwork:SetTexCoord(texMargin, 1 - texMargin, texMargin, 1 - texMargin) |
764 |
770 |
|
|
765 |
771 |
return artwork |
return artwork |
766 |
772 |
end |
end |
|
... |
... |
end |
768 |
774 |
local function createSubsetButtonBackground(subsetButton) |
local function createSubsetButtonBackground(subsetButton) |
769 |
775 |
assert (subsetButton ~= nil) |
assert (subsetButton ~= nil) |
770 |
776 |
|
|
|
777 |
|
local buttonWidth = subsetButton:GetWidth() |
|
778 |
|
local buttonHeight = subsetButton:GetHeight() |
|
779 |
|
|
|
780 |
|
local marginBottom = math.max(buttonWidth, buttonHeight) - math.min(buttonWidth, buttonHeight) |
|
781 |
|
|
771 |
782 |
local background = subsetButton:CreateTexture(subsetButton:GetName() .. 'Background', 'BACKGROUND') |
local background = subsetButton:CreateTexture(subsetButton:GetName() .. 'Background', 'BACKGROUND') |
772 |
|
background:SetAllPoints() |
|
|
783 |
|
background:SetPoint('TOPLEFT', 0, 0) |
|
784 |
|
background:SetPoint('TOPRIGHT', 0, 0) |
|
785 |
|
background:SetPoint('BOTTOMLEFT', 0, marginBottom) |
|
786 |
|
background:SetPoint('BOTTOMRIGHT', 0, marginBottom) |
773 |
787 |
background:SetTexture(getAuraCategoryColor('none')) |
background:SetTexture(getAuraCategoryColor('none')) |
774 |
788 |
|
|
775 |
789 |
return background |
return background |