mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 08:24:44 +00:00
skins update
This commit is contained in:
@@ -3,7 +3,7 @@ local S = E:GetModule("Skins");
|
|||||||
|
|
||||||
--Cache global variables
|
--Cache global variables
|
||||||
--Lua functions
|
--Lua functions
|
||||||
local _G = getfenv()
|
local _G = _G
|
||||||
local unpack = unpack
|
local unpack = unpack
|
||||||
local pairs = pairs
|
local pairs = pairs
|
||||||
--WoW API / Variables
|
--WoW API / Variables
|
||||||
@@ -96,7 +96,7 @@ local function LoadSkin()
|
|||||||
E:SetInside(this:GetNormalTexture())
|
E:SetInside(this:GetNormalTexture())
|
||||||
end
|
end
|
||||||
local _, _, _, quality = GetAuctionSellItemInfo()
|
local _, _, _, quality = GetAuctionSellItemInfo()
|
||||||
if quality and quality > 1 then
|
if quality then
|
||||||
AuctionsItemButton:SetBackdropBorderColor(GetItemQualityColor(quality))
|
AuctionsItemButton:SetBackdropBorderColor(GetItemQualityColor(quality))
|
||||||
AuctionsItemButtonName:SetTextColor(quality)
|
AuctionsItemButtonName:SetTextColor(quality)
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ local S = E:GetModule("Skins");
|
|||||||
|
|
||||||
--Cache global variables
|
--Cache global variables
|
||||||
--Lua functions
|
--Lua functions
|
||||||
local _G = getfenv()
|
local _G = _G
|
||||||
local split = string.split
|
local split = string.split
|
||||||
--WoW API / Variables
|
--WoW API / Variables
|
||||||
local hooksecurefunc = hooksecurefunc
|
local hooksecurefunc = hooksecurefunc
|
||||||
|
|||||||
@@ -66,6 +66,8 @@ local function LoadSkin()
|
|||||||
|
|
||||||
S:HandleCloseButton(containerFrameClose)
|
S:HandleCloseButton(containerFrameClose)
|
||||||
|
|
||||||
|
S:SecureHookScript(containerFrame, "OnShow", "ContainerFrame_Update")
|
||||||
|
|
||||||
local itemButton, itemButtonIcon
|
local itemButton, itemButtonIcon
|
||||||
for k = 1, MAX_CONTAINER_ITEMS, 1 do
|
for k = 1, MAX_CONTAINER_ITEMS, 1 do
|
||||||
itemButton = _G["ContainerFrame"..i.."Item"..k]
|
itemButton = _G["ContainerFrame"..i.."Item"..k]
|
||||||
@@ -87,7 +89,6 @@ local function LoadSkin()
|
|||||||
end
|
end
|
||||||
|
|
||||||
S:SecureHook("ContainerFrame_Update")
|
S:SecureHook("ContainerFrame_Update")
|
||||||
S:SecureHookScript(ContainerFrame1, "OnShow", "ContainerFrame_Update")
|
|
||||||
|
|
||||||
-- BankFrame
|
-- BankFrame
|
||||||
E:CreateBackdrop(BankFrame, "Transparent")
|
E:CreateBackdrop(BankFrame, "Transparent")
|
||||||
|
|||||||
@@ -1,11 +1,6 @@
|
|||||||
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
|
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
|
||||||
local S = E:GetModule("Skins");
|
local S = E:GetModule("Skins");
|
||||||
|
|
||||||
--Cache global variables
|
|
||||||
--Lua functions
|
|
||||||
|
|
||||||
--WoW API / Variables
|
|
||||||
|
|
||||||
local function LoadSkin()
|
local function LoadSkin()
|
||||||
E:StripTextures(BattlefieldFrame)
|
E:StripTextures(BattlefieldFrame)
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
|
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
|
||||||
local S = E:GetModule("Skins");
|
local S = E:GetModule("Skins");
|
||||||
|
|
||||||
|
--Cache global variables
|
||||||
|
--Lua functions
|
||||||
|
local _G = _G
|
||||||
|
--WoW API / Variables
|
||||||
|
|
||||||
local function LoadSkin()
|
local function LoadSkin()
|
||||||
-- if E.private.skins.blizzard.enable ~= true or E.private.skins.blizzard.binding ~= true then return end
|
-- if E.private.skins.blizzard.enable ~= true or E.private.skins.blizzard.binding ~= true then return end
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ local S = E:GetModule("Skins");
|
|||||||
local _G = _G
|
local _G = _G
|
||||||
local unpack = unpack
|
local unpack = unpack
|
||||||
local pairs = pairs
|
local pairs = pairs
|
||||||
local getn = table.getn
|
local find, getn = string.find, table.getn
|
||||||
--WoW API / Variables
|
--WoW API / Variables
|
||||||
local GetInventoryItemTexture = GetInventoryItemTexture
|
local GetInventoryItemTexture = GetInventoryItemTexture
|
||||||
local GetInventoryItemQuality = GetInventoryItemQuality
|
local GetInventoryItemQuality = GetInventoryItemQuality
|
||||||
@@ -259,7 +259,7 @@ local function LoadSkin()
|
|||||||
SkillFrameCollapseAllButton.Text:SetText("+")
|
SkillFrameCollapseAllButton.Text:SetText("+")
|
||||||
|
|
||||||
hooksecurefunc(SkillFrameCollapseAllButton, "SetNormalTexture", function(self, texture)
|
hooksecurefunc(SkillFrameCollapseAllButton, "SetNormalTexture", function(self, texture)
|
||||||
if texture == "Interface\\Buttons\\UI-MinusButton-Up" then
|
if find(texture, "MinusButton") then
|
||||||
self.Text:SetText("-")
|
self.Text:SetText("-")
|
||||||
else
|
else
|
||||||
self.Text:SetText("+")
|
self.Text:SetText("+")
|
||||||
@@ -288,7 +288,7 @@ local function LoadSkin()
|
|||||||
label.Text:SetText("+")
|
label.Text:SetText("+")
|
||||||
|
|
||||||
hooksecurefunc(label, "SetNormalTexture", function(self, texture)
|
hooksecurefunc(label, "SetNormalTexture", function(self, texture)
|
||||||
if texture == "Interface\\Buttons\\UI-MinusButton-Up" then
|
if find(texture, "MinusButton") then
|
||||||
self.Text:SetText("-")
|
self.Text:SetText("-")
|
||||||
else
|
else
|
||||||
self.Text:SetText("+")
|
self.Text:SetText("+")
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ local S = E:GetModule("Skins");
|
|||||||
local _G = _G
|
local _G = _G
|
||||||
local unpack = unpack
|
local unpack = unpack
|
||||||
local select = select
|
local select = select
|
||||||
local find, split = string.find, string.split
|
local find, match, split = string.find, string.match, string.split
|
||||||
--WoW API / Variables
|
--WoW API / Variables
|
||||||
local GetItemInfo = GetItemInfo
|
local GetItemInfo = GetItemInfo
|
||||||
local GetItemQualityColor = GetItemQualityColor
|
local GetItemQualityColor = GetItemQualityColor
|
||||||
@@ -49,10 +49,10 @@ local function LoadSkin()
|
|||||||
S:HandleCloseButton(CraftFrameCloseButton)
|
S:HandleCloseButton(CraftFrameCloseButton)
|
||||||
|
|
||||||
for i = 1, MAX_CRAFT_REAGENTS do
|
for i = 1, MAX_CRAFT_REAGENTS do
|
||||||
local reagent = _G["CraftReagent" .. i]
|
local reagent = _G["CraftReagent"..i]
|
||||||
local icon = _G["CraftReagent" .. i .. "IconTexture"]
|
local icon = _G["CraftReagent"..i.."IconTexture"]
|
||||||
local count = _G["CraftReagent" .. i .. "Count"]
|
local count = _G["CraftReagent"..i.."Count"]
|
||||||
local nameFrame = _G["CraftReagent" .. i .. "NameFrame"]
|
local nameFrame = _G["CraftReagent"..i.."NameFrame"]
|
||||||
|
|
||||||
icon:SetTexCoord(unpack(E.TexCoords))
|
icon:SetTexCoord(unpack(E.TexCoords))
|
||||||
icon:SetDrawLayer("OVERLAY")
|
icon:SetDrawLayer("OVERLAY")
|
||||||
@@ -72,8 +72,10 @@ local function LoadSkin()
|
|||||||
hooksecurefunc("CraftFrame_SetSelection", function(id)
|
hooksecurefunc("CraftFrame_SetSelection", function(id)
|
||||||
E:SetTemplate(CraftIcon, "Default", true)
|
E:SetTemplate(CraftIcon, "Default", true)
|
||||||
E:StyleButton(CraftIcon, nil, true)
|
E:StyleButton(CraftIcon, nil, true)
|
||||||
CraftIcon:GetNormalTexture():SetTexCoord(unpack(E.TexCoords))
|
if CraftIcon:GetNormalTexture() then
|
||||||
E:SetInside(CraftIcon:GetNormalTexture())
|
CraftIcon:GetNormalTexture():SetTexCoord(unpack(E.TexCoords))
|
||||||
|
E:SetInside(CraftIcon:GetNormalTexture())
|
||||||
|
end
|
||||||
|
|
||||||
CraftIcon:SetWidth(40)
|
CraftIcon:SetWidth(40)
|
||||||
CraftIcon:SetHeight(40)
|
CraftIcon:SetHeight(40)
|
||||||
@@ -83,10 +85,8 @@ local function LoadSkin()
|
|||||||
|
|
||||||
local skillLink = GetCraftItemLink(id)
|
local skillLink = GetCraftItemLink(id)
|
||||||
if skillLink then
|
if skillLink then
|
||||||
local skillString = select(3, find(skillLink, "|H(.+)|h"))
|
local _, _, quality = GetItemInfo(match(skillLink, "enchant:(%d+)"))
|
||||||
local skillID = select(2, split(":", skillString))
|
if quality then
|
||||||
local quality = select(3, GetItemInfo(skillID))
|
|
||||||
if quality and quality > 1 then
|
|
||||||
CraftIcon:SetBackdropBorderColor(GetItemQualityColor(quality))
|
CraftIcon:SetBackdropBorderColor(GetItemQualityColor(quality))
|
||||||
CraftName:SetTextColor(GetItemQualityColor(quality))
|
CraftName:SetTextColor(GetItemQualityColor(quality))
|
||||||
else
|
else
|
||||||
@@ -97,16 +97,14 @@ local function LoadSkin()
|
|||||||
|
|
||||||
local numReagents = GetCraftNumReagents(id)
|
local numReagents = GetCraftNumReagents(id)
|
||||||
for i = 1, numReagents, 1 do
|
for i = 1, numReagents, 1 do
|
||||||
|
local icon = _G["CraftReagent"..i.."IconTexture"]
|
||||||
|
local name = _G["CraftReagent"..i.."Name"]
|
||||||
|
|
||||||
local _, _, reagentCount, playerReagentCount = GetCraftReagentInfo(id, i)
|
local _, _, reagentCount, playerReagentCount = GetCraftReagentInfo(id, i)
|
||||||
local reagentLink = GetCraftReagentItemLink(id, i)
|
local reagentLink = GetCraftReagentItemLink(id, i)
|
||||||
local icon = _G["CraftReagent" .. i .. "IconTexture"]
|
|
||||||
local name = _G["CraftReagent" .. i .. "Name"]
|
|
||||||
|
|
||||||
if reagentLink then
|
if reagentLink then
|
||||||
local reagentString = select(3, find(reagentLink, "|H(.+)|h"))
|
local _, _, quality = GetItemInfo(match(reagentLink, "item:(%d+)"))
|
||||||
local reagentID = select(2, split(":", reagentString))
|
if quality then
|
||||||
local quality = select(3, GetItemInfo(reagentID))
|
|
||||||
if quality and quality > 1 then
|
|
||||||
icon.backdrop:SetBackdropBorderColor(GetItemQualityColor(quality))
|
icon.backdrop:SetBackdropBorderColor(GetItemQualityColor(quality))
|
||||||
if playerReagentCount < reagentCount then
|
if playerReagentCount < reagentCount then
|
||||||
name:SetTextColor(0.5, 0.5, 0.5)
|
name:SetTextColor(0.5, 0.5, 0.5)
|
||||||
@@ -121,12 +119,12 @@ local function LoadSkin()
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
for i = 1, CRAFTS_DISPLAYED do
|
for i = 1, CRAFTS_DISPLAYED do
|
||||||
local craftButton = _G["Craft" .. i]
|
local craftButton = _G["Craft"..i]
|
||||||
craftButton:SetNormalTexture("")
|
craftButton:SetNormalTexture("")
|
||||||
craftButton.SetNormalTexture = E.noop
|
craftButton.SetNormalTexture = E.noop
|
||||||
|
|
||||||
_G["Craft" .. i .. "Highlight"]:SetTexture("")
|
_G["Craft"..i.."Highlight"]:SetTexture("")
|
||||||
_G["Craft" .. i .. "Highlight"].SetTexture = E.noop
|
_G["Craft"..i.."Highlight"].SetTexture = E.noop
|
||||||
|
|
||||||
craftButton.Text = craftButton:CreateFontString(nil, "OVERLAY")
|
craftButton.Text = craftButton:CreateFontString(nil, "OVERLAY")
|
||||||
E:FontTemplate(craftButton.Text, nil, 22)
|
E:FontTemplate(craftButton.Text, nil, 22)
|
||||||
@@ -134,9 +132,9 @@ local function LoadSkin()
|
|||||||
craftButton.Text:SetText("+")
|
craftButton.Text:SetText("+")
|
||||||
|
|
||||||
hooksecurefunc(craftButton, "SetNormalTexture", function(self, texture)
|
hooksecurefunc(craftButton, "SetNormalTexture", function(self, texture)
|
||||||
if texture == "Interface\\Buttons\\UI-MinusButton-Up" then
|
if find(texture, "MinusButton") then
|
||||||
self.Text:SetText("-")
|
self.Text:SetText("-")
|
||||||
elseif texture == "Interface\\Buttons\\UI-PlusButton-Up" then
|
elseif find(texture, "PlusButton") then
|
||||||
self.Text:SetText("+")
|
self.Text:SetText("+")
|
||||||
else
|
else
|
||||||
self.Text:SetText("")
|
self.Text:SetText("")
|
||||||
@@ -157,7 +155,7 @@ local function LoadSkin()
|
|||||||
CraftCollapseAllButton.Text:SetText("+")
|
CraftCollapseAllButton.Text:SetText("+")
|
||||||
|
|
||||||
hooksecurefunc(CraftCollapseAllButton, "SetNormalTexture", function(self, texture)
|
hooksecurefunc(CraftCollapseAllButton, "SetNormalTexture", function(self, texture)
|
||||||
if texture == "Interface\\Buttons\\UI-MinusButton-Up" then
|
if find(texture, "MinusButton") then
|
||||||
self.Text:SetText("-")
|
self.Text:SetText("-")
|
||||||
else
|
else
|
||||||
self.Text:SetText("+")
|
self.Text:SetText("+")
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ local S = E:GetModule("Skins");
|
|||||||
|
|
||||||
--Cache global variables
|
--Cache global variables
|
||||||
--Lua functions
|
--Lua functions
|
||||||
local _G = getfenv()
|
local _G = _G
|
||||||
local unpack = unpack
|
local unpack = unpack
|
||||||
local getn = table.getn
|
local getn = table.getn
|
||||||
--WoW API / Variables
|
--WoW API / Variables
|
||||||
@@ -56,12 +56,7 @@ local function LoadSkin()
|
|||||||
|
|
||||||
local noscalemult = E.mult * GetCVar("uiScale")
|
local noscalemult = E.mult * GetCVar("uiScale")
|
||||||
HookScript(FrameStackTooltip, "OnShow", function()
|
HookScript(FrameStackTooltip, "OnShow", function()
|
||||||
this:SetBackdrop({
|
E:SetTemplate(this, "Transparent")
|
||||||
bgFile = E["media"].blankTex,
|
|
||||||
edgeFile = E["media"].blankTex,
|
|
||||||
tile = false, tileSize = 0, edgeSize = noscalemult,
|
|
||||||
insets = { left = -noscalemult, right = -noscalemult, top = -noscalemult, bottom = -noscalemult}
|
|
||||||
});
|
|
||||||
this:SetBackdropColor(unpack(E["media"].backdropfadecolor))
|
this:SetBackdropColor(unpack(E["media"].backdropfadecolor))
|
||||||
this:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
this:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
||||||
end)
|
end)
|
||||||
|
|||||||
@@ -123,9 +123,9 @@ function LoadSkin()
|
|||||||
S:HandleDropDownBox(WhoFrameDropDown)
|
S:HandleDropDownBox(WhoFrameDropDown)
|
||||||
|
|
||||||
for i = 1, 17 do
|
for i = 1, 17 do
|
||||||
local button = _G["WhoFrameButton" .. i]
|
local button = _G["WhoFrameButton"..i]
|
||||||
local level = _G["WhoFrameButton" .. i .. "Level"]
|
local level = _G["WhoFrameButton"..i.."Level"]
|
||||||
local name = _G["WhoFrameButton" .. i .. "Name"]
|
local name = _G["WhoFrameButton"..i.."Name"]
|
||||||
|
|
||||||
button.icon = button:CreateTexture("$parentIcon", "ARTWORK")
|
button.icon = button:CreateTexture("$parentIcon", "ARTWORK")
|
||||||
button.icon:SetPoint("LEFT", 45, 0)
|
button.icon:SetPoint("LEFT", 45, 0)
|
||||||
@@ -145,7 +145,7 @@ function LoadSkin()
|
|||||||
name:ClearAllPoints()
|
name:ClearAllPoints()
|
||||||
name:SetPoint("LEFT", 85, 0)
|
name:SetPoint("LEFT", 85, 0)
|
||||||
|
|
||||||
_G["WhoFrameButton" .. i .. "Class"]:Hide()
|
_G["WhoFrameButton"..i.."Class"]:Hide()
|
||||||
end
|
end
|
||||||
|
|
||||||
E:StripTextures(WhoListScrollFrame)
|
E:StripTextures(WhoListScrollFrame)
|
||||||
@@ -247,21 +247,21 @@ function LoadSkin()
|
|||||||
E:CreateBackdrop(button, "Default", true)
|
E:CreateBackdrop(button, "Default", true)
|
||||||
button.backdrop:SetAllPoints(button.icon)
|
button.backdrop:SetAllPoints(button.icon)
|
||||||
|
|
||||||
_G["GuildFrameButton" .. i .. "Level"]:ClearAllPoints()
|
_G["GuildFrameButton"..i.."Level"]:ClearAllPoints()
|
||||||
_G["GuildFrameButton" .. i .. "Level"]:SetPoint("TOPLEFT", 10, -3)
|
_G["GuildFrameButton"..i.."Level"]:SetPoint("TOPLEFT", 10, -3)
|
||||||
|
|
||||||
_G["GuildFrameButton" .. i .. "Name"]:SetWidth(100)
|
_G["GuildFrameButton"..i.."Name"]:SetWidth(100)
|
||||||
_G["GuildFrameButton" .. i .. "Name"]:SetHeight(14)
|
_G["GuildFrameButton"..i.."Name"]:SetHeight(14)
|
||||||
_G["GuildFrameButton" .. i .. "Name"]:ClearAllPoints()
|
_G["GuildFrameButton"..i.."Name"]:ClearAllPoints()
|
||||||
_G["GuildFrameButton" .. i .. "Name"]:SetPoint("LEFT", 85, -3)
|
_G["GuildFrameButton"..i.."Name"]:SetPoint("LEFT", 85, -3)
|
||||||
|
|
||||||
_G["GuildFrameButton" .. i .. "Class"]:Hide()
|
_G["GuildFrameButton"..i.."Class"]:Hide()
|
||||||
end
|
end
|
||||||
|
|
||||||
hooksecurefunc("GuildStatus_Update", function()
|
hooksecurefunc("GuildStatus_Update", function()
|
||||||
if FriendsFrame.playerStatusFrame then
|
if FriendsFrame.playerStatusFrame then
|
||||||
for i = 1, GUILDMEMBERS_TO_DISPLAY, 1 do
|
for i = 1, GUILDMEMBERS_TO_DISPLAY, 1 do
|
||||||
local button = _G["GuildFrameButton" .. i]
|
local button = _G["GuildFrameButton"..i]
|
||||||
local _, _, _, level, class, _, _, _, online = GetGuildRosterInfo(button.guildIndex)
|
local _, _, _, level, class, _, _, _, online = GetGuildRosterInfo(button.guildIndex)
|
||||||
if class == UNKNOWN then return end
|
if class == UNKNOWN then return end
|
||||||
|
|
||||||
@@ -273,9 +273,9 @@ function LoadSkin()
|
|||||||
if online then
|
if online then
|
||||||
classTextColor = CUSTOM_CLASS_COLORS and CUSTOM_CLASS_COLORS[class] or RAID_CLASS_COLORS[class]
|
classTextColor = CUSTOM_CLASS_COLORS and CUSTOM_CLASS_COLORS[class] or RAID_CLASS_COLORS[class]
|
||||||
levelTextColor = GetQuestDifficultyColor(level)
|
levelTextColor = GetQuestDifficultyColor(level)
|
||||||
buttonText = _G["GuildFrameButton" .. i .. "Name"]
|
buttonText = _G["GuildFrameButton"..i.."Name"]
|
||||||
buttonText:SetTextColor(classTextColor.r, classTextColor.g, classTextColor.b)
|
buttonText:SetTextColor(classTextColor.r, classTextColor.g, classTextColor.b)
|
||||||
buttonText = _G["GuildFrameButton" .. i .. "Level"]
|
buttonText = _G["GuildFrameButton"..i.."Level"]
|
||||||
buttonText:SetTextColor(levelTextColor.r, levelTextColor.g, levelTextColor.b)
|
buttonText:SetTextColor(levelTextColor.r, levelTextColor.g, levelTextColor.b)
|
||||||
end
|
end
|
||||||
button.icon:SetTexCoord(unpack(CLASS_ICON_TCOORDS[class]))
|
button.icon:SetTexCoord(unpack(CLASS_ICON_TCOORDS[class]))
|
||||||
@@ -284,7 +284,7 @@ function LoadSkin()
|
|||||||
else
|
else
|
||||||
local classFileName
|
local classFileName
|
||||||
for i = 1, GUILDMEMBERS_TO_DISPLAY, 1 do
|
for i = 1, GUILDMEMBERS_TO_DISPLAY, 1 do
|
||||||
button = _G["GuildFrameGuildStatusButton" .. i]
|
button = _G["GuildFrameGuildStatusButton"..i]
|
||||||
_, _, _, _, class, _, _, _, online = GetGuildRosterInfo(button.guildIndex)
|
_, _, _, _, class, _, _, _, online = GetGuildRosterInfo(button.guildIndex)
|
||||||
if class == UNKNOWN then return end
|
if class == UNKNOWN then return end
|
||||||
|
|
||||||
@@ -295,8 +295,8 @@ function LoadSkin()
|
|||||||
if class then
|
if class then
|
||||||
if online then
|
if online then
|
||||||
classTextColor = CUSTOM_CLASS_COLORS and CUSTOM_CLASS_COLORS[class] or RAID_CLASS_COLORS[class]
|
classTextColor = CUSTOM_CLASS_COLORS and CUSTOM_CLASS_COLORS[class] or RAID_CLASS_COLORS[class]
|
||||||
_G["GuildFrameGuildStatusButton" .. i .. "Name"]:SetTextColor(classTextColor.r, classTextColor.g, classTextColor.b)
|
_G["GuildFrameGuildStatusButton"..i.."Name"]:SetTextColor(classTextColor.r, classTextColor.g, classTextColor.b)
|
||||||
_G["GuildFrameGuildStatusButton" .. i .. "Online"]:SetTextColor(1.0, 1.0, 1.0)
|
_G["GuildFrameGuildStatusButton"..i.."Online"]:SetTextColor(1.0, 1.0, 1.0)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ local S = E:GetModule("Skins");
|
|||||||
|
|
||||||
--Cache global variables
|
--Cache global variables
|
||||||
--Lua functions
|
--Lua functions
|
||||||
local _G = getfenv()
|
local _G = _G
|
||||||
local select = select
|
local select = select
|
||||||
--WoW API / Variables
|
--WoW API / Variables
|
||||||
local hooksecurefunc = hooksecurefunc
|
local hooksecurefunc = hooksecurefunc
|
||||||
@@ -34,7 +34,7 @@ local function LoadSkin()
|
|||||||
|
|
||||||
for i = 1, NUMGOSSIPBUTTONS do
|
for i = 1, NUMGOSSIPBUTTONS do
|
||||||
local obj = select(3,_G["GossipTitleButton"..i]:GetRegions())
|
local obj = select(3,_G["GossipTitleButton"..i]:GetRegions())
|
||||||
obj:SetTextColor(1,1,1)
|
obj:SetTextColor(1, 1, 1)
|
||||||
end
|
end
|
||||||
|
|
||||||
GossipGreetingText:SetTextColor(1,1,1)
|
GossipGreetingText:SetTextColor(1,1,1)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ local S = E:GetModule("Skins");
|
|||||||
|
|
||||||
--Cache global variables
|
--Cache global variables
|
||||||
--Lua functions
|
--Lua functions
|
||||||
local _G = getfenv()
|
local _G = _G
|
||||||
local select = select
|
local select = select
|
||||||
--WoW API / Variables
|
--WoW API / Variables
|
||||||
|
|
||||||
@@ -20,6 +20,7 @@ local function LoadSkin()
|
|||||||
S:HandleButton(GuildRegistrarFramePurchaseButton)
|
S:HandleButton(GuildRegistrarFramePurchaseButton)
|
||||||
S:HandleCloseButton(GuildRegistrarFrameCloseButton)
|
S:HandleCloseButton(GuildRegistrarFrameCloseButton)
|
||||||
S:HandleEditBox(GuildRegistrarFrameEditBox)
|
S:HandleEditBox(GuildRegistrarFrameEditBox)
|
||||||
|
|
||||||
for i = 1, GuildRegistrarFrameEditBox:GetNumRegions() do
|
for i = 1, GuildRegistrarFrameEditBox:GetNumRegions() do
|
||||||
local region = select(i, GuildRegistrarFrameEditBox:GetRegions())
|
local region = select(i, GuildRegistrarFrameEditBox:GetRegions())
|
||||||
if region and region:GetObjectType() == "Texture" then
|
if region and region:GetObjectType() == "Texture" then
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ local S = E:GetModule("Skins");
|
|||||||
|
|
||||||
--Cache global variables
|
--Cache global variables
|
||||||
--Lua functions
|
--Lua functions
|
||||||
local _G = getfenv()
|
local _G = _G
|
||||||
local getn = table.getn
|
local getn = table.getn
|
||||||
--WoW API / Variables
|
--WoW API / Variables
|
||||||
|
|
||||||
@@ -36,7 +36,7 @@ local function LoadSkin()
|
|||||||
HelpFrameCloseButton:SetPoint("TOPRIGHT", -42, 0)
|
HelpFrameCloseButton:SetPoint("TOPRIGHT", -42, 0)
|
||||||
|
|
||||||
for i = 1, getn(helpFrameButtons) do
|
for i = 1, getn(helpFrameButtons) do
|
||||||
local helpButton = _G["HelpFrame" .. helpFrameButtons[i]]
|
local helpButton = _G["HelpFrame"..helpFrameButtons[i]]
|
||||||
S:HandleButton(helpButton)
|
S:HandleButton(helpButton)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ local S = E:GetModule("Skins");
|
|||||||
local _G = _G
|
local _G = _G
|
||||||
local unpack = unpack
|
local unpack = unpack
|
||||||
local pairs = pairs
|
local pairs = pairs
|
||||||
local find, split = string.find, string.split
|
local find, match, split = string.find, string.match, string.split
|
||||||
--WoW API / Variables
|
--WoW API / Variables
|
||||||
local GetInventoryItemLink = GetInventoryItemLink
|
local GetInventoryItemLink = GetInventoryItemLink
|
||||||
local GetItemInfo = GetItemInfo
|
local GetItemInfo = GetItemInfo
|
||||||
@@ -67,9 +67,7 @@ local function LoadSkin()
|
|||||||
if button.hasItem then
|
if button.hasItem then
|
||||||
local itemLink = GetInventoryItemLink(InspectFrame.unit, button:GetID())
|
local itemLink = GetInventoryItemLink(InspectFrame.unit, button:GetID())
|
||||||
if itemLink then
|
if itemLink then
|
||||||
local itemString = select(3, find(itemLink, "|H(.+)|h"))
|
local _, _, quality = GetItemInfo(match(itemLink, "item:(%d+)"))
|
||||||
local itemID = select(2, split(":", itemString))
|
|
||||||
local quality = select(3, GetItemInfo(itemID))
|
|
||||||
if not quality then
|
if not quality then
|
||||||
E:Delay(0.1, function()
|
E:Delay(0.1, function()
|
||||||
if InspectFrame.unit then
|
if InspectFrame.unit then
|
||||||
@@ -77,7 +75,7 @@ local function LoadSkin()
|
|||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
return
|
return
|
||||||
elseif quality and quality > 1 then
|
elseif quality then
|
||||||
button:SetBackdropBorderColor(GetItemQualityColor(quality))
|
button:SetBackdropBorderColor(GetItemQualityColor(quality))
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -3,9 +3,10 @@ local S = E:GetModule("Skins");
|
|||||||
|
|
||||||
--Cache global variables
|
--Cache global variables
|
||||||
--Lua functions
|
--Lua functions
|
||||||
local _G = getfenv()
|
local _G = _G
|
||||||
local unpack = unpack
|
local unpack = unpack
|
||||||
local select = select
|
local select = select
|
||||||
|
local match = string.match
|
||||||
--WoW API / Variables
|
--WoW API / Variables
|
||||||
local UnitName = UnitName
|
local UnitName = UnitName
|
||||||
local IsFishingLoot = IsFishingLoot
|
local IsFishingLoot = IsFishingLoot
|
||||||
@@ -42,16 +43,44 @@ local function LoadSkin()
|
|||||||
LootFrame.Title:SetPoint("TOPLEFT", LootFrame.backdrop, "TOPLEFT", 4, -4)
|
LootFrame.Title:SetPoint("TOPLEFT", LootFrame.backdrop, "TOPLEFT", 4, -4)
|
||||||
LootFrame.Title:SetJustifyH("LEFT")
|
LootFrame.Title:SetJustifyH("LEFT")
|
||||||
|
|
||||||
for i = 1, LOOTFRAME_NUMBUTTONS do
|
|
||||||
local button = _G["LootButton" .. i]
|
|
||||||
S:HandleItemButton(button, true)
|
|
||||||
end
|
|
||||||
|
|
||||||
S:HandleNextPrevButton(LootFrameDownButton)
|
S:HandleNextPrevButton(LootFrameDownButton)
|
||||||
S:HandleNextPrevButton(LootFrameUpButton)
|
S:HandleNextPrevButton(LootFrameUpButton)
|
||||||
S:SquareButton_SetIcon(LootFrameUpButton, "UP")
|
S:SquareButton_SetIcon(LootFrameUpButton, "UP")
|
||||||
S:SquareButton_SetIcon(LootFrameDownButton, "DOWN")
|
S:SquareButton_SetIcon(LootFrameDownButton, "DOWN")
|
||||||
|
|
||||||
|
LootFrameDownButton:ClearAllPoints()
|
||||||
|
LootFrameDownButton:SetPoint("RIGHT", LootFrameNext, "RIGHT", 32, 0)
|
||||||
|
LootFramePrev:SetPoint("BOTTOMLEFT", 57, 22)
|
||||||
|
|
||||||
|
hooksecurefunc("LootFrame_Update", function()
|
||||||
|
local numLootItems = LootFrame.numLootItems
|
||||||
|
local numLootToShow = LOOTFRAME_NUMBUTTONS
|
||||||
|
if numLootItems > LOOTFRAME_NUMBUTTONS then
|
||||||
|
numLootToShow = numLootToShow - 1
|
||||||
|
end
|
||||||
|
for i = 1, LOOTFRAME_NUMBUTTONS do
|
||||||
|
local slot = (((LootFrame.page - 1) * numLootToShow) + i)
|
||||||
|
local lootButton = _G["LootButton"..i]
|
||||||
|
local lootButtonIcon = _G["LootButton"..i.."IconTexture"]
|
||||||
|
|
||||||
|
S:HandleItemButton(lootButton, true)
|
||||||
|
|
||||||
|
if slot <= numLootItems then
|
||||||
|
local itemLink = GetLootSlotLink(slot)
|
||||||
|
if itemLink then
|
||||||
|
local _, _, quality = GetItemInfo(match(itemLink, "item:(%d+)"))
|
||||||
|
if quality then
|
||||||
|
lootButton.backdrop:SetBackdropBorderColor(GetItemQualityColor(quality))
|
||||||
|
else
|
||||||
|
lootButton.backdrop:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
||||||
|
end
|
||||||
|
else
|
||||||
|
lootButton.backdrop:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
HookScript(LootFrame, "OnShow", function()
|
HookScript(LootFrame, "OnShow", function()
|
||||||
if IsFishingLoot() then
|
if IsFishingLoot() then
|
||||||
this.Title:SetText(L["Fishy Loot"])
|
this.Title:SetText(L["Fishy Loot"])
|
||||||
@@ -70,44 +99,43 @@ local function LoadRollSkin()
|
|||||||
local function OnShow(self)
|
local function OnShow(self)
|
||||||
E:SetTemplate(self, "Transparent")
|
E:SetTemplate(self, "Transparent")
|
||||||
|
|
||||||
local cornerTexture = _G[self:GetName() .. "Corner"]
|
local cornerTexture = _G[self:GetName().."Corner"]
|
||||||
cornerTexture:SetTexture()
|
cornerTexture:SetTexture()
|
||||||
|
|
||||||
local iconFrame = _G[self:GetName() .. "IconFrame"]
|
local iconFrame = _G[self:GetName().."IconFrame"]
|
||||||
local _, _, _, quality = GetLootRollItemInfo(self.rollID)
|
local _, _, _, quality = GetLootRollItemInfo(self.rollID)
|
||||||
iconFrame:SetBackdropBorderColor(GetItemQualityColor(quality))
|
iconFrame:SetBackdropBorderColor(GetItemQualityColor(quality))
|
||||||
end
|
end
|
||||||
|
|
||||||
for i = 1, NUM_GROUP_LOOT_FRAMES do
|
for i = 1, NUM_GROUP_LOOT_FRAMES do
|
||||||
local frame = _G["GroupLootFrame" .. i]
|
local frame = _G["GroupLootFrame"..i]
|
||||||
frame:SetParent(UIParent)
|
frame:SetParent(UIParent)
|
||||||
E:StripTextures(frame)
|
E:StripTextures(frame)
|
||||||
|
|
||||||
local frameName = frame:GetName()
|
local frameName = frame:GetName()
|
||||||
local iconFrame = _G[frameName .. "IconFrame"]
|
local iconFrame = _G[frameName.."IconFrame"]
|
||||||
E:SetTemplate(iconFrame, "Default")
|
E:SetTemplate(iconFrame, "Default")
|
||||||
|
|
||||||
local icon = _G[frameName .. "IconFrameIcon"]
|
local icon = _G[frameName.."IconFrameIcon"]
|
||||||
E:SetInside(icon)
|
E:SetInside(icon)
|
||||||
icon:SetTexCoord(unpack(E.TexCoords))
|
icon:SetTexCoord(unpack(E.TexCoords))
|
||||||
|
|
||||||
local statusBar = _G[frameName .. "Timer"]
|
local statusBar = _G[frameName.."Timer"]
|
||||||
E:StripTextures(statusBar)
|
E:StripTextures(statusBar)
|
||||||
E:CreateBackdrop(statusBar, "Default")
|
E:CreateBackdrop(statusBar, "Default")
|
||||||
statusBar:SetStatusBarTexture(E["media"].normTex)
|
statusBar:SetStatusBarTexture(E["media"].normTex)
|
||||||
E:RegisterStatusBar(statusBar)
|
E:RegisterStatusBar(statusBar)
|
||||||
|
|
||||||
local decoration = _G[frameName .. "Decoration"]
|
local decoration = _G[frameName.."Decoration"]
|
||||||
decoration:SetTexture("Interface\\DialogFrame\\UI-DialogBox-Gold-Dragon")
|
decoration:SetTexture("Interface\\DialogFrame\\UI-DialogBox-Gold-Dragon")
|
||||||
-- decoration:Size(130)
|
|
||||||
decoration:SetWidth(130)
|
decoration:SetWidth(130)
|
||||||
decoration:SetHeight(130)
|
decoration:SetHeight(130)
|
||||||
decoration:SetPoint("TOPLEFT", -37, 20)
|
decoration:SetPoint("TOPLEFT", -37, 20)
|
||||||
|
|
||||||
local pass = _G[frameName .. "PassButton"]
|
local pass = _G[frameName.."PassButton"]
|
||||||
S:HandleCloseButton(pass, frame)
|
S:HandleCloseButton(pass, frame)
|
||||||
|
|
||||||
HookScript(_G["GroupLootFrame" .. i], "OnShow", OnShow)
|
HookScript(_G["GroupLootFrame"..i], "OnShow", OnShow)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ local S = E:GetModule("Skins");
|
|||||||
|
|
||||||
--Cache global variables
|
--Cache global variables
|
||||||
--Lua functions
|
--Lua functions
|
||||||
local _G = getfenv()
|
local _G = _G
|
||||||
local unpack = unpack
|
local unpack = unpack
|
||||||
local getn = table.getn
|
local getn = table.getn
|
||||||
--WoW API / Variables
|
--WoW API / Variables
|
||||||
@@ -43,7 +43,7 @@ local function LoadSkin()
|
|||||||
end
|
end
|
||||||
|
|
||||||
for i = 1, 2 do
|
for i = 1, 2 do
|
||||||
local tab = _G["MacroFrameTab" .. i]
|
local tab = _G["MacroFrameTab"..i]
|
||||||
|
|
||||||
tab:SetHeight(22)
|
tab:SetHeight(22)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -47,13 +47,12 @@ local function LoadSkin()
|
|||||||
|
|
||||||
for i = 1, INBOXITEMS_TO_DISPLAY do
|
for i = 1, INBOXITEMS_TO_DISPLAY do
|
||||||
if index <= numItems then
|
if index <= numItems then
|
||||||
local packageIcon = select(1, GetInboxHeaderInfo(index))
|
local packageIcon, _, _, _, _, _, _, _, _, _, _, _, isGM = GetInboxHeaderInfo(index)
|
||||||
local isGM = select(13, GetInboxHeaderInfo(index))
|
|
||||||
local button = _G["MailItem"..i.."Button"]
|
local button = _G["MailItem"..i.."Button"]
|
||||||
|
|
||||||
button:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
button:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
||||||
if packageIcon and not isGM then
|
if packageIcon and not isGM then
|
||||||
local quality = select(4, GetInboxItem(index))
|
local _, _, _, quality = GetInboxItem(index)
|
||||||
if quality then
|
if quality then
|
||||||
button:SetBackdropBorderColor(GetItemQualityColor(quality))
|
button:SetBackdropBorderColor(GetItemQualityColor(quality))
|
||||||
else
|
else
|
||||||
@@ -87,30 +86,27 @@ local function LoadSkin()
|
|||||||
E:SetTemplate(SendMailScrollFrame, "Default")
|
E:SetTemplate(SendMailScrollFrame, "Default")
|
||||||
|
|
||||||
hooksecurefunc("SendMailFrame_Update", function()
|
hooksecurefunc("SendMailFrame_Update", function()
|
||||||
if not SendMailPackageButton.skinned then
|
if not SendMailPackageButton.skinned then
|
||||||
E:StripTextures(SendMailPackageButton)
|
E:StripTextures(SendMailPackageButton)
|
||||||
E:SetTemplate(SendMailPackageButton, "Default", true)
|
E:SetTemplate(SendMailPackageButton, "Default", true)
|
||||||
E:StyleButton(SendMailPackageButton, nil, true)
|
E:StyleButton(SendMailPackageButton, nil, true)
|
||||||
|
|
||||||
SendMailPackageButton.skinned = true
|
SendMailPackageButton.skinned = true
|
||||||
end
|
end
|
||||||
|
|
||||||
local itemName = select(1, GetSendMailItem())
|
local itemName = GetSendMailItem()
|
||||||
|
if itemName then
|
||||||
if itemName then
|
local _, _, _, quality = GetSendMailItem()
|
||||||
local quality = select(4, GetSendMailItem())
|
if quality then
|
||||||
|
SendMailPackageButton:SetBackdropBorderColor(GetItemQualityColor(quality))
|
||||||
if quality and quality > 1 then
|
|
||||||
SendMailPackageButton:SetBackdropBorderColor(GetItemQualityColor(quality))
|
|
||||||
else
|
|
||||||
SendMailPackageButton:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
|
||||||
end
|
|
||||||
|
|
||||||
SendMailPackageButton:GetNormalTexture():SetTexCoord(unpack(E.TexCoords))
|
|
||||||
E:SetInside(SendMailPackageButton:GetNormalTexture())
|
|
||||||
else
|
else
|
||||||
SendMailPackageButton:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
SendMailPackageButton:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
||||||
end
|
end
|
||||||
|
SendMailPackageButton:GetNormalTexture():SetTexCoord(unpack(E.TexCoords))
|
||||||
|
E:SetInside(SendMailPackageButton:GetNormalTexture())
|
||||||
|
else
|
||||||
|
SendMailPackageButton:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
SendMailBodyEditBox:SetTextColor(1, 1, 1)
|
SendMailBodyEditBox:SetTextColor(1, 1, 1)
|
||||||
@@ -142,31 +138,40 @@ local function LoadSkin()
|
|||||||
OpenMailFrame.backdrop:SetPoint("TOPLEFT", 12, -12)
|
OpenMailFrame.backdrop:SetPoint("TOPLEFT", 12, -12)
|
||||||
OpenMailFrame.backdrop:SetPoint("BOTTOMRIGHT", -34, 74)
|
OpenMailFrame.backdrop:SetPoint("BOTTOMRIGHT", -34, 74)
|
||||||
|
|
||||||
|
E:StripTextures(OpenMailPackageButton)
|
||||||
|
E:StyleButton(OpenMailPackageButton)
|
||||||
|
E:SetTemplate(OpenMailPackageButton, "Default", true)
|
||||||
|
|
||||||
|
for i = 1, OpenMailPackageButton:GetNumRegions() do
|
||||||
|
local region = select(i, OpenMailPackageButton:GetRegions())
|
||||||
|
if region:GetObjectType() == "Texture" then
|
||||||
|
region:SetTexCoord(unpack(E.TexCoords))
|
||||||
|
E:SetInside(region)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- hooksecurefunc("OpenMail_Update", function()
|
hooksecurefunc("OpenMail_Update", function()
|
||||||
-- local numItems = GetInboxNumItems()
|
local index = InboxFrame.openMailID
|
||||||
-- local index = ((InboxFrame.pageNum - 1) * INBOXITEMS_TO_DISPLAY) + 1
|
if not index then return end
|
||||||
|
|
||||||
-- E:SetTemplate(OpenMailPackageButton, "Default", true)
|
local _, stationeryIcon, _, _, _, _, _, hasItem = GetInboxHeaderInfo(index)
|
||||||
-- E:StyleButton(OpenMailPackageButton, nil, true)
|
|
||||||
-- OpenMailPackageButton:GetNormalTexture():SetTexCoord(unpack(E.TexCoords))
|
|
||||||
-- E:SetInside(OpenMailPackageButton:GetNormalTexture())
|
|
||||||
|
|
||||||
-- local itemName = select(1, GetInboxItem(index))
|
if hasItem then
|
||||||
-- if itemName then
|
local itemName = GetInboxItem(index)
|
||||||
-- local quality = select(4, GetInboxItem(index))
|
if itemName then
|
||||||
|
local _, _, _, quality = GetInboxItem(index)
|
||||||
-- if quality and quality > 1 then
|
if quality then
|
||||||
-- OpenMailPackageButton:SetBackdropBorderColor(GetItemQualityColor(quality))
|
OpenMailPackageButton:SetBackdropBorderColor(GetItemQualityColor(quality))
|
||||||
-- else
|
else
|
||||||
-- OpenMailPackageButton:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
OpenMailPackageButton:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
||||||
-- end
|
end
|
||||||
|
OpenMailPackageButton:GetNormalTexture():SetTexCoord(unpack(E.TexCoords))
|
||||||
-- else
|
E:SetInside(OpenMailPackageButton:GetNormalTexture())
|
||||||
-- OpenMailPackageButton:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
else
|
||||||
-- end
|
OpenMailPackageButton:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
||||||
-- end)
|
end
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
S:HandleCloseButton(OpenMailCloseButton)
|
S:HandleCloseButton(OpenMailCloseButton)
|
||||||
|
|
||||||
|
|||||||
@@ -93,11 +93,9 @@ local function LoadSkin()
|
|||||||
local _, _, quality = GetItemInfo(match(itemLink, "item:(%d+)"))
|
local _, _, quality = GetItemInfo(match(itemLink, "item:(%d+)"))
|
||||||
if quality then
|
if quality then
|
||||||
itemName:SetTextColor(GetItemQualityColor(quality))
|
itemName:SetTextColor(GetItemQualityColor(quality))
|
||||||
if quality then
|
itemButton:SetBackdropBorderColor(GetItemQualityColor(quality))
|
||||||
itemButton:SetBackdropBorderColor(GetItemQualityColor(quality))
|
else
|
||||||
else
|
itemButton:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
||||||
itemButton:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
itemButton:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
itemButton:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
||||||
@@ -111,14 +109,12 @@ local function LoadSkin()
|
|||||||
local _, _, quality = GetItemInfo(match(itemLink, "item:(%d+)"))
|
local _, _, quality = GetItemInfo(match(itemLink, "item:(%d+)"))
|
||||||
if quality then
|
if quality then
|
||||||
MerchantBuyBackItemName:SetTextColor(GetItemQualityColor(quality))
|
MerchantBuyBackItemName:SetTextColor(GetItemQualityColor(quality))
|
||||||
if quality then
|
MerchantBuyBackItemItemButton:SetBackdropBorderColor(GetItemQualityColor(quality))
|
||||||
MerchantBuyBackItemItemButton:SetBackdropBorderColor(GetItemQualityColor(quality))
|
|
||||||
else
|
|
||||||
MerchantBuyBackItemItemButton:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
|
||||||
end
|
|
||||||
else
|
else
|
||||||
MerchantBuyBackItemItemButton:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
MerchantBuyBackItemItemButton:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
MerchantBuyBackItemItemButton:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -138,14 +134,12 @@ local function LoadSkin()
|
|||||||
local _, _, quality = GetItemInfo(match(itemLink, "item:(%d+)"))
|
local _, _, quality = GetItemInfo(match(itemLink, "item:(%d+)"))
|
||||||
if quality then
|
if quality then
|
||||||
itemName:SetTextColor(GetItemQualityColor(quality))
|
itemName:SetTextColor(GetItemQualityColor(quality))
|
||||||
if quality then
|
itemButton:SetBackdropBorderColor(GetItemQualityColor(quality))
|
||||||
itemButton:SetBackdropBorderColor(GetItemQualityColor(quality))
|
|
||||||
else
|
|
||||||
itemButton:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
|
||||||
end
|
|
||||||
else
|
else
|
||||||
itemButton:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
itemButton:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
itemButton:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -33,9 +33,9 @@ local function LoadSkin()
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
for i = 1, MIRRORTIMER_NUMTIMERS do
|
for i = 1, MIRRORTIMER_NUMTIMERS do
|
||||||
local mirrorTimer = _G["MirrorTimer" .. i]
|
local mirrorTimer = _G["MirrorTimer"..i]
|
||||||
local statusBar = _G["MirrorTimer" .. i .. "StatusBar"]
|
local statusBar = _G["MirrorTimer"..i.."StatusBar"]
|
||||||
local text = _G["MirrorTimer" .. i .. "Text"]
|
local text = _G["MirrorTimer"..i.."Text"]
|
||||||
|
|
||||||
E:StripTextures(mirrorTimer)
|
E:StripTextures(mirrorTimer)
|
||||||
mirrorTimer:SetWidth(222)
|
mirrorTimer:SetWidth(222)
|
||||||
@@ -55,7 +55,7 @@ local function LoadSkin()
|
|||||||
|
|
||||||
mirrorTimer.timeSinceUpdate = 0.3
|
mirrorTimer.timeSinceUpdate = 0.3
|
||||||
|
|
||||||
E:CreateMover(mirrorTimer, "MirrorTimer" .. i .. "Mover", L["MirrorTimer"] .. i, nil, nil, nil, "ALL,SOLO")
|
E:CreateMover(mirrorTimer, "MirrorTimer"..i.."Mover", L["MirrorTimer"]..i, nil, nil, nil, "ALL,SOLO")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ local S = E:GetModule("Skins");
|
|||||||
|
|
||||||
--Cache global variables
|
--Cache global variables
|
||||||
--Lua functions
|
--Lua functions
|
||||||
local _G = getfenv()
|
local _G = _G
|
||||||
local unpack = unpack
|
local unpack = unpack
|
||||||
local find = string.find
|
local find = string.find
|
||||||
local getn = table.getn
|
local getn = table.getn
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ local S = E:GetModule("Skins");
|
|||||||
|
|
||||||
--Cache global variables
|
--Cache global variables
|
||||||
--Lua functions
|
--Lua functions
|
||||||
local _G = getfenv()
|
local _G = _G
|
||||||
--WoW API / Variables
|
--WoW API / Variables
|
||||||
|
|
||||||
local function LoadSkin()
|
local function LoadSkin()
|
||||||
@@ -27,7 +27,7 @@ local function LoadSkin()
|
|||||||
PetitionFrameMemberTitle:SetTextColor(1, 1, 0)
|
PetitionFrameMemberTitle:SetTextColor(1, 1, 0)
|
||||||
|
|
||||||
for i = 1, 9 do
|
for i = 1, 9 do
|
||||||
_G["PetitionFrameMemberName" .. i]:SetTextColor(1, 1, 1)
|
_G["PetitionFrameMemberName"..i]:SetTextColor(1, 1, 1)
|
||||||
end
|
end
|
||||||
|
|
||||||
PetitionFrameInstructions:SetTextColor(1, 1, 1)
|
PetitionFrameInstructions:SetTextColor(1, 1, 1)
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ local _G = _G
|
|||||||
local pairs = pairs
|
local pairs = pairs
|
||||||
local select = select
|
local select = select
|
||||||
local unpack = unpack
|
local unpack = unpack
|
||||||
local find, format, split = string.find, string.format, string.split
|
local find, format, match, split = string.find, string.format, string.match, string.split
|
||||||
--WoW API / Variables
|
--WoW API / Variables
|
||||||
local GetItemInfo = GetItemInfo
|
local GetItemInfo = GetItemInfo
|
||||||
local GetItemQualityColor = GetItemQualityColor
|
local GetItemQualityColor = GetItemQualityColor
|
||||||
@@ -53,9 +53,9 @@ local function LoadSkin()
|
|||||||
end
|
end
|
||||||
|
|
||||||
for i = 1, MAX_NUM_ITEMS do
|
for i = 1, MAX_NUM_ITEMS do
|
||||||
local item = _G["QuestLogItem" .. i]
|
local item = _G["QuestLogItem"..i]
|
||||||
local icon = _G["QuestLogItem" .. i .. "IconTexture"]
|
local icon = _G["QuestLogItem"..i.."IconTexture"]
|
||||||
local count = _G["QuestLogItem" .. i .. "Count"]
|
local count = _G["QuestLogItem"..i.."Count"]
|
||||||
|
|
||||||
E:StripTextures(item)
|
E:StripTextures(item)
|
||||||
E:SetTemplate(item, "Default")
|
E:SetTemplate(item, "Default")
|
||||||
@@ -74,9 +74,9 @@ local function LoadSkin()
|
|||||||
end
|
end
|
||||||
|
|
||||||
for i = 1, 6 do
|
for i = 1, 6 do
|
||||||
local item = _G["QuestDetailItem" .. i]
|
local item = _G["QuestDetailItem"..i]
|
||||||
local icon = _G["QuestDetailItem" .. i .. "IconTexture"]
|
local icon = _G["QuestDetailItem"..i.."IconTexture"]
|
||||||
local count = _G["QuestDetailItem" .. i .. "Count"]
|
local count = _G["QuestDetailItem"..i.."Count"]
|
||||||
|
|
||||||
E:StripTextures(item)
|
E:StripTextures(item)
|
||||||
E:SetTemplate(item, "Default")
|
E:SetTemplate(item, "Default")
|
||||||
@@ -95,9 +95,9 @@ local function LoadSkin()
|
|||||||
end
|
end
|
||||||
|
|
||||||
for i = 1, 6 do
|
for i = 1, 6 do
|
||||||
local item = _G["QuestRewardItem" .. i]
|
local item = _G["QuestRewardItem"..i]
|
||||||
local icon = _G["QuestRewardItem" .. i .. "IconTexture"]
|
local icon = _G["QuestRewardItem"..i.."IconTexture"]
|
||||||
local count = _G["QuestRewardItem" .. i .. "Count"]
|
local count = _G["QuestRewardItem"..i.."Count"]
|
||||||
|
|
||||||
E:StripTextures(item)
|
E:StripTextures(item)
|
||||||
E:SetTemplate(item, "Default")
|
E:SetTemplate(item, "Default")
|
||||||
@@ -117,12 +117,10 @@ local function LoadSkin()
|
|||||||
|
|
||||||
local function QuestQualityColors(frame, text, quality, link)
|
local function QuestQualityColors(frame, text, quality, link)
|
||||||
if link and not quality then
|
if link and not quality then
|
||||||
local itemString = select(3, find(link, "|H(.+)|h"))
|
_, _, quality = GetItemInfo(match(link, "item:(%d+)"))
|
||||||
local itemID = select(2, split(":", itemString))
|
|
||||||
quality = select(3, GetItemInfo(itemID))
|
|
||||||
end
|
end
|
||||||
|
|
||||||
if quality and quality > 1 then
|
if quality then
|
||||||
if frame then
|
if frame then
|
||||||
frame:SetBackdropBorderColor(GetItemQualityColor(quality))
|
frame:SetBackdropBorderColor(GetItemQualityColor(quality))
|
||||||
frame.backdrop:SetBackdropBorderColor(GetItemQualityColor(quality))
|
frame.backdrop:SetBackdropBorderColor(GetItemQualityColor(quality))
|
||||||
@@ -150,8 +148,8 @@ local function LoadSkin()
|
|||||||
_G[this:GetName() .. "Name"]:SetTextColor(1, 1, 0)
|
_G[this:GetName() .. "Name"]:SetTextColor(1, 1, 0)
|
||||||
|
|
||||||
for i = 1, MAX_NUM_ITEMS do
|
for i = 1, MAX_NUM_ITEMS do
|
||||||
local questItem = _G["QuestRewardItem" .. i]
|
local questItem = _G["QuestRewardItem"..i]
|
||||||
local questName = _G["QuestRewardItem" .. i .. "Name"]
|
local questName = _G["QuestRewardItem"..i.."Name"]
|
||||||
local link = questItem.type and GetQuestItemLink(questItem.type, questItem:GetID())
|
local link = questItem.type and GetQuestItemLink(questItem.type, questItem:GetID())
|
||||||
|
|
||||||
if questItem ~= this then
|
if questItem ~= this then
|
||||||
@@ -350,9 +348,9 @@ local function LoadSkin()
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
for i = 1, 6 do
|
for i = 1, 6 do
|
||||||
local item = _G["QuestProgressItem" .. i]
|
local item = _G["QuestProgressItem"..i]
|
||||||
local icon = _G["QuestProgressItem" .. i .. "IconTexture"]
|
local icon = _G["QuestProgressItem"..i.."IconTexture"]
|
||||||
local count = _G["QuestProgressItem" .. i .. "Count"]
|
local count = _G["QuestProgressItem"..i.."Count"]
|
||||||
|
|
||||||
E:StripTextures(item)
|
E:StripTextures(item)
|
||||||
E:SetTemplate(item, "Default")
|
E:SetTemplate(item, "Default")
|
||||||
@@ -392,13 +390,13 @@ local function LoadSkin()
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
for i = 1, QUESTS_DISPLAYED do
|
for i = 1, QUESTS_DISPLAYED do
|
||||||
local questLogTitle = _G["QuestLogTitle" .. i]
|
local questLogTitle = _G["QuestLogTitle"..i]
|
||||||
|
|
||||||
questLogTitle:SetNormalTexture("")
|
questLogTitle:SetNormalTexture("")
|
||||||
questLogTitle.SetNormalTexture = E.noop
|
questLogTitle.SetNormalTexture = E.noop
|
||||||
|
|
||||||
_G["QuestLogTitle" .. i .. "Highlight"]:SetTexture("")
|
_G["QuestLogTitle"..i.."Highlight"]:SetTexture("")
|
||||||
_G["QuestLogTitle" .. i .. "Highlight"].SetTexture = E.noop
|
_G["QuestLogTitle"..i.."Highlight"].SetTexture = E.noop
|
||||||
|
|
||||||
questLogTitle.Text = questLogTitle:CreateFontString(nil, "OVERLAY")
|
questLogTitle.Text = questLogTitle:CreateFontString(nil, "OVERLAY")
|
||||||
E:FontTemplate(questLogTitle.Text, nil, 22)
|
E:FontTemplate(questLogTitle.Text, nil, 22)
|
||||||
@@ -406,9 +404,9 @@ local function LoadSkin()
|
|||||||
questLogTitle.Text:SetText("+")
|
questLogTitle.Text:SetText("+")
|
||||||
|
|
||||||
hooksecurefunc(questLogTitle, "SetNormalTexture", function(self, texture)
|
hooksecurefunc(questLogTitle, "SetNormalTexture", function(self, texture)
|
||||||
if texture == "Interface\\Buttons\\UI-MinusButton-Up" then
|
if find(texture, "MinusButton") then
|
||||||
self.Text:SetText("-")
|
self.Text:SetText("-")
|
||||||
elseif texture == "Interface\\Buttons\\UI-PlusButton-Up" then
|
elseif find(texture, "PlusButton") then
|
||||||
self.Text:SetText("+")
|
self.Text:SetText("+")
|
||||||
else
|
else
|
||||||
self.Text:SetText("")
|
self.Text:SetText("")
|
||||||
@@ -431,7 +429,7 @@ local function LoadSkin()
|
|||||||
QuestLogCollapseAllButton.Text:SetText("+")
|
QuestLogCollapseAllButton.Text:SetText("+")
|
||||||
|
|
||||||
hooksecurefunc(QuestLogCollapseAllButton, "SetNormalTexture", function(self, texture)
|
hooksecurefunc(QuestLogCollapseAllButton, "SetNormalTexture", function(self, texture)
|
||||||
if texture == "Interface\\Buttons\\UI-MinusButton-Up" then
|
if find(texture, "MinusButton") then
|
||||||
self.Text:SetText("-")
|
self.Text:SetText("-")
|
||||||
else
|
else
|
||||||
self.Text:SetText("+")
|
self.Text:SetText("+")
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ local function LoadSkin()
|
|||||||
QuestTimerFrame:SetAllPoints(QuestTimerFrameMover)
|
QuestTimerFrame:SetAllPoints(QuestTimerFrameMover)
|
||||||
|
|
||||||
local QuestTimerFrameHolder = CreateFrame("Frame", "QuestTimerFrameHolder", E.UIParent)
|
local QuestTimerFrameHolder = CreateFrame("Frame", "QuestTimerFrameHolder", E.UIParent)
|
||||||
-- QuestTimerFrameHolder:Size(150, 22)
|
|
||||||
QuestTimerFrameHolder:SetWidth(150)
|
QuestTimerFrameHolder:SetWidth(150)
|
||||||
QuestTimerFrameHolder:SetHeight(22)
|
QuestTimerFrameHolder:SetHeight(22)
|
||||||
QuestTimerFrameHolder:SetPoint("TOP", QuestTimerFrameMover, "TOP")
|
QuestTimerFrameHolder:SetPoint("TOP", QuestTimerFrameMover, "TOP")
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ local S = E:GetModule("Skins");
|
|||||||
|
|
||||||
--Cache global variables
|
--Cache global variables
|
||||||
--Lua functions
|
--Lua functions
|
||||||
local _G = getfenv()
|
local _G = _G
|
||||||
local unpack = unpack
|
local unpack = unpack
|
||||||
local pairs = pairs
|
local pairs = pairs
|
||||||
--WoW API / Variables
|
--WoW API / Variables
|
||||||
@@ -35,19 +35,19 @@ function LoadSkin()
|
|||||||
S:HandleButton(RaidFrameRaidInfoButton)
|
S:HandleButton(RaidFrameRaidInfoButton)
|
||||||
|
|
||||||
for i = 1, NUM_RAID_GROUPS*5 do
|
for i = 1, NUM_RAID_GROUPS*5 do
|
||||||
S:HandleButton(_G["RaidGroupButton" .. i], true)
|
S:HandleButton(_G["RaidGroupButton"..i], true)
|
||||||
end
|
end
|
||||||
|
|
||||||
for i = 1, 8 do
|
for i = 1, 8 do
|
||||||
for j = 1, 5 do
|
for j = 1, 5 do
|
||||||
E:StripTextures(_G["RaidGroup" .. i .. "Slot" .. j])
|
E:StripTextures(_G["RaidGroup"..i.."Slot"..j])
|
||||||
E:SetTemplate(_G["RaidGroup" .. i .. "Slot" .. j], "Transparent")
|
E:SetTemplate(_G["RaidGroup"..i.."Slot"..j], "Transparent")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function skinPulloutFrames()
|
local function skinPulloutFrames()
|
||||||
for i = 1, NUM_RAID_PULLOUT_FRAMES do
|
for i = 1, NUM_RAID_PULLOUT_FRAMES do
|
||||||
local rp = _G["RaidPullout" .. i]
|
local rp = _G["RaidPullout"..i]
|
||||||
if not rp.backdrop then
|
if not rp.backdrop then
|
||||||
_G["RaidPullout"..i.."MenuBackdrop"]:SetBackdrop(nil)
|
_G["RaidPullout"..i.."MenuBackdrop"]:SetBackdrop(nil)
|
||||||
E:CreateBackdrop(rp, "Transparent")
|
E:CreateBackdrop(rp, "Transparent")
|
||||||
@@ -64,28 +64,28 @@ function LoadSkin()
|
|||||||
hooksecurefunc("RaidPullout_Update", function(pullOutFrame)
|
hooksecurefunc("RaidPullout_Update", function(pullOutFrame)
|
||||||
local pfName = pullOutFrame:GetName()
|
local pfName = pullOutFrame:GetName()
|
||||||
for i = 1, pullOutFrame.numPulloutButtons do
|
for i = 1, pullOutFrame.numPulloutButtons do
|
||||||
local pfBName = pfName .. "Button" .. i
|
local pfBName = pfName.."Button"..i
|
||||||
local pfBObj = _G[pfBName]
|
local pfBObj = _G[pfBName]
|
||||||
if not pfBObj.backdrop then
|
if not pfBObj.backdrop then
|
||||||
for _, v in pairs{"HealthBar", "ManaBar", "Target", "TargetTarget"} do
|
for _, v in pairs{"HealthBar", "ManaBar", "Target", "TargetTarget"} do
|
||||||
local sBar = pfBName .. v
|
local sBar = pfBName..v
|
||||||
E:StripTextures(_G[sBar])
|
E:StripTextures(_G[sBar])
|
||||||
_G[sBar]:SetStatusBarTexture(E["media"].normTex)
|
_G[sBar]:SetStatusBarTexture(E["media"].normTex)
|
||||||
end
|
end
|
||||||
|
|
||||||
_G[pfBName .. "ManaBar"]:SetPoint("TOP", "$parentHealthBar", "BOTTOM", 0, 0)
|
_G[pfBName.."ManaBar"]:SetPoint("TOP", "$parentHealthBar", "BOTTOM", 0, 0)
|
||||||
_G[pfBName .. "Target"]:SetPoint("TOP", "$parentManaBar", "BOTTOM", 0, -1)
|
_G[pfBName.."Target"]:SetPoint("TOP", "$parentManaBar", "BOTTOM", 0, -1)
|
||||||
|
|
||||||
E:CreateBackdrop(pfBObj, "Default")
|
E:CreateBackdrop(pfBObj, "Default")
|
||||||
pfBObj.backdrop:SetPoint("TOPLEFT", E.PixelMode and 0 or -1, -(E.PixelMode and 10 or 9))
|
pfBObj.backdrop:SetPoint("TOPLEFT", E.PixelMode and 0 or -1, -(E.PixelMode and 10 or 9))
|
||||||
pfBObj.backdrop:SetPoint("BOTTOMRIGHT", E.PixelMode and 0 or 1, E.PixelMode and 1 or 0)
|
pfBObj.backdrop:SetPoint("BOTTOMRIGHT", E.PixelMode and 0 or 1, E.PixelMode and 1 or 0)
|
||||||
end
|
end
|
||||||
|
|
||||||
if not _G[pfBName .. "TargetTargetFrame"].backdrop then
|
if not _G[pfBName.."TargetTargetFrame"].backdrop then
|
||||||
E:StripTextures(_G[pfBName .. "TargetTargetFrame"])
|
E:StripTextures(_G[pfBName.."TargetTargetFrame"])
|
||||||
E:CreateBackdrop(_G[pfBName .. "TargetTargetFrame"], "Default")
|
E:CreateBackdrop(_G[pfBName.."TargetTargetFrame"], "Default")
|
||||||
_G[pfBName .. "TargetTargetFrame"].backdrop:SetPoint("TOPLEFT", E.PixelMode and 10 or 9, -(E.PixelMode and 15 or 14))
|
_G[pfBName.."TargetTargetFrame"].backdrop:SetPoint("TOPLEFT", E.PixelMode and 10 or 9, -(E.PixelMode and 15 or 14))
|
||||||
_G[pfBName .. "TargetTargetFrame"].backdrop:SetPoint("BOTTOMRIGHT", -(E.PixelMode and 10 or 9), E.PixelMode and 8 or 7)
|
_G[pfBName.."TargetTargetFrame"].backdrop:SetPoint("BOTTOMRIGHT", -(E.PixelMode and 10 or 9), E.PixelMode and 8 or 7)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ local S = E:GetModule("Skins");
|
|||||||
|
|
||||||
--Cache global variables
|
--Cache global variables
|
||||||
--Lua functions
|
--Lua functions
|
||||||
local _G = getfenv()
|
local _G = _G
|
||||||
local unpack = unpack
|
local unpack = unpack
|
||||||
local select = select
|
local select = select
|
||||||
local getn = table.getn
|
local getn = table.getn
|
||||||
@@ -42,7 +42,6 @@ local function LoadSkin()
|
|||||||
button:DisableDrawLayer("BACKGROUND")
|
button:DisableDrawLayer("BACKGROUND")
|
||||||
button:GetNormalTexture():SetTexture("")
|
button:GetNormalTexture():SetTexture("")
|
||||||
button:GetPushedTexture():SetTexture("")
|
button:GetPushedTexture():SetTexture("")
|
||||||
--E:StyleButton(button, true)
|
|
||||||
|
|
||||||
if iconTexture then
|
if iconTexture then
|
||||||
iconTexture:SetTexCoord(unpack(E.TexCoords))
|
iconTexture:SetTexCoord(unpack(E.TexCoords))
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ local S = E:GetModule("Skins");
|
|||||||
|
|
||||||
--Cache global variables
|
--Cache global variables
|
||||||
--Lua functions
|
--Lua functions
|
||||||
local _G = getfenv()
|
local _G = _G
|
||||||
--WoW API / Variables
|
--WoW API / Variables
|
||||||
local GetPetHappiness = GetPetHappiness
|
local GetPetHappiness = GetPetHappiness
|
||||||
local HasPetUI = HasPetUI
|
local HasPetUI = HasPetUI
|
||||||
@@ -28,29 +28,28 @@ function LoadSkin()
|
|||||||
_G["PetStableCurrentPetIconTexture"]:SetDrawLayer("OVERLAY")
|
_G["PetStableCurrentPetIconTexture"]:SetDrawLayer("OVERLAY")
|
||||||
|
|
||||||
for i = 1, NUM_PET_STABLE_SLOTS do
|
for i = 1, NUM_PET_STABLE_SLOTS do
|
||||||
S:HandleItemButton(_G["PetStableStabledPet" .. i], true)
|
S:HandleItemButton(_G["PetStableStabledPet"..i], true)
|
||||||
_G["PetStableStabledPet" .. i .. "IconTexture"]:SetDrawLayer("OVERLAY")
|
_G["PetStableStabledPet"..i.."IconTexture"]:SetDrawLayer("OVERLAY")
|
||||||
end
|
end
|
||||||
|
|
||||||
PetStablePetInfo:GetRegions():SetTexCoord(0.04, 0.15, 0.06, 0.30)
|
PetStablePetInfo:GetRegions():SetTexCoord(0.04, 0.15, 0.06, 0.30)
|
||||||
PetStablePetInfo:SetFrameLevel(PetModelFrame:GetFrameLevel() + 2)
|
PetStablePetInfo:SetFrameLevel(PetModelFrame:GetFrameLevel() + 2)
|
||||||
E:CreateBackdrop(PetStablePetInfo, "Default")
|
E:CreateBackdrop(PetStablePetInfo, "Default")
|
||||||
-- PetStablePetInfo:Size(24, 24)
|
|
||||||
PetStablePetInfo:SetWidth(24)
|
PetStablePetInfo:SetWidth(24)
|
||||||
PetStablePetInfo:SetHeight(24)
|
PetStablePetInfo:SetHeight(24)
|
||||||
|
|
||||||
hooksecurefunc("PetStable_Update", function()
|
hooksecurefunc("PetStable_Update", function()
|
||||||
local happiness = GetPetHappiness()
|
local happiness = GetPetHappiness()
|
||||||
local hasPetUI, isHunterPet = HasPetUI()
|
local hasPetUI, isHunterPet = HasPetUI()
|
||||||
if(UnitExists("pet") and hasPetUI and not isHunterPet) then
|
if UnitExists("pet") and hasPetUI and not isHunterPet then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local texture = PetStablePetInfo:GetRegions()
|
local texture = PetStablePetInfo:GetRegions()
|
||||||
if(happiness == 1) then
|
if happiness == 1 then
|
||||||
texture:SetTexCoord(0.41, 0.53, 0.06, 0.30)
|
texture:SetTexCoord(0.41, 0.53, 0.06, 0.30)
|
||||||
elseif(happiness == 2) then
|
elseif happiness == 2 then
|
||||||
texture:SetTexCoord(0.22, 0.345, 0.06, 0.30)
|
texture:SetTexCoord(0.22, 0.345, 0.06, 0.30)
|
||||||
elseif(happiness == 3) then
|
elseif happiness == 3 then
|
||||||
texture:SetTexCoord(0.04, 0.15, 0.06, 0.30)
|
texture:SetTexCoord(0.04, 0.15, 0.06, 0.30)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ local S = E:GetModule("Skins");
|
|||||||
|
|
||||||
--Cache global variables
|
--Cache global variables
|
||||||
--Lua functions
|
--Lua functions
|
||||||
local _G = getfenv()
|
local _G = _G
|
||||||
--WoW API / Variables
|
--WoW API / Variables
|
||||||
local hooksecurefunc = hooksecurefunc
|
local hooksecurefunc = hooksecurefunc
|
||||||
|
|
||||||
@@ -25,14 +25,14 @@ local function LoadSkin()
|
|||||||
E:StripTextures(TabardFrameCustomizationFrame)
|
E:StripTextures(TabardFrameCustomizationFrame)
|
||||||
|
|
||||||
for i = 1, 5 do
|
for i = 1, 5 do
|
||||||
local custom = "TabardFrameCustomization" .. i
|
local custom = "TabardFrameCustomization"..i
|
||||||
E:StripTextures(_G[custom])
|
E:StripTextures(_G[custom])
|
||||||
S:HandleNextPrevButton(_G[custom .. "LeftButton"])
|
S:HandleNextPrevButton(_G[custom.."LeftButton"])
|
||||||
S:HandleNextPrevButton(_G[custom .. "RightButton"])
|
S:HandleNextPrevButton(_G[custom.."RightButton"])
|
||||||
|
|
||||||
if(i > 1) then
|
if(i > 1) then
|
||||||
_G[custom]:ClearAllPoints()
|
_G[custom]:ClearAllPoints()
|
||||||
_G[custom]:SetPoint("TOP", _G["TabardFrameCustomization" .. i-1], "BOTTOM", 0, -6)
|
_G[custom]:SetPoint("TOP", _G["TabardFrameCustomization"..i-1], "BOTTOM", 0, -6)
|
||||||
else
|
else
|
||||||
local point, anchor, point2, x, y = _G[custom]:GetPoint()
|
local point, anchor, point2, x, y = _G[custom]:GetPoint()
|
||||||
_G[custom]:SetPoint(point, anchor, point2, x, y+4)
|
_G[custom]:SetPoint(point, anchor, point2, x, y+4)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ local S = E:GetModule("Skins");
|
|||||||
|
|
||||||
--Cache global variables
|
--Cache global variables
|
||||||
--Lua functions
|
--Lua functions
|
||||||
local _G = getfenv()
|
local _G = _G
|
||||||
local unpack = unpack
|
local unpack = unpack
|
||||||
--WoW API / Variables
|
--WoW API / Variables
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ local TT = E:GetModule("Tooltip");
|
|||||||
|
|
||||||
--Cache global variables
|
--Cache global variables
|
||||||
--Lua functions
|
--Lua functions
|
||||||
local _G = getfenv()
|
local _G = _G
|
||||||
local pairs = pairs
|
local pairs = pairs
|
||||||
--WoW API / Variables
|
--WoW API / Variables
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ local S = E:GetModule("Skins");
|
|||||||
--Lua functions
|
--Lua functions
|
||||||
local _G = _G
|
local _G = _G
|
||||||
local unpack = unpack
|
local unpack = unpack
|
||||||
local select = select
|
|
||||||
--WoW API / Variables
|
--WoW API / Variables
|
||||||
local GetItemQualityColor = GetItemQualityColor
|
local GetItemQualityColor = GetItemQualityColor
|
||||||
local GetTradePlayerItemInfo = GetTradePlayerItemInfo
|
local GetTradePlayerItemInfo = GetTradePlayerItemInfo
|
||||||
@@ -28,12 +27,12 @@ local function LoadSkin()
|
|||||||
S:HandleEditBox(TradePlayerInputMoneyFrameCopper)
|
S:HandleEditBox(TradePlayerInputMoneyFrameCopper)
|
||||||
|
|
||||||
for i = 1, MAX_TRADE_ITEMS do
|
for i = 1, MAX_TRADE_ITEMS do
|
||||||
local player = _G["TradePlayerItem" .. i]
|
local player = _G["TradePlayerItem"..i]
|
||||||
local recipient = _G["TradeRecipientItem" .. i]
|
local recipient = _G["TradeRecipientItem"..i]
|
||||||
local playerButton = _G["TradePlayerItem" .. i .. "ItemButton"]
|
local playerButton = _G["TradePlayerItem"..i.."ItemButton"]
|
||||||
local playerButtonIcon = _G["TradePlayerItem" .. i .. "ItemButtonIconTexture"]
|
local playerButtonIcon = _G["TradePlayerItem"..i.."ItemButtonIconTexture"]
|
||||||
local recipientButton = _G["TradeRecipientItem" .. i .. "ItemButton"]
|
local recipientButton = _G["TradeRecipientItem"..i.."ItemButton"]
|
||||||
local recipientButtonIcon = _G["TradeRecipientItem" .. i .. "ItemButtonIconTexture"]
|
local recipientButtonIcon = _G["TradeRecipientItem"..i.."ItemButtonIconTexture"]
|
||||||
local playerNameFrame = _G["TradePlayerItem"..i.."NameFrame"]
|
local playerNameFrame = _G["TradePlayerItem"..i.."NameFrame"]
|
||||||
local recipientNameFrame = _G["TradeRecipientItem"..i.."NameFrame"]
|
local recipientNameFrame = _G["TradeRecipientItem"..i.."NameFrame"]
|
||||||
|
|
||||||
@@ -91,14 +90,14 @@ local function LoadSkin()
|
|||||||
S:HandleButton(TradeFrameCancelButton)
|
S:HandleButton(TradeFrameCancelButton)
|
||||||
|
|
||||||
hooksecurefunc("TradeFrame_UpdatePlayerItem", function(id)
|
hooksecurefunc("TradeFrame_UpdatePlayerItem", function(id)
|
||||||
local tradeItemButton = _G["TradePlayerItem" .. id .. "ItemButton"]
|
local tradeItemButton = _G["TradePlayerItem"..id.."ItemButton"]
|
||||||
local tradeItemName = _G["TradePlayerItem" .. id .. "Name"]
|
local tradeItemName = _G["TradePlayerItem"..id.."Name"]
|
||||||
|
|
||||||
local name = select(1, GetTradePlayerItemInfo(id))
|
local name = GetTradePlayerItemInfo(id)
|
||||||
if name then
|
if name then
|
||||||
local quality = select(4, GetTradePlayerItemInfo(id))
|
local _, _, _, quality = GetTradePlayerItemInfo(id)
|
||||||
tradeItemName:SetTextColor(GetItemQualityColor(quality))
|
tradeItemName:SetTextColor(GetItemQualityColor(quality))
|
||||||
if quality and quality > 1 then
|
if quality then
|
||||||
tradeItemButton:SetBackdropBorderColor(GetItemQualityColor(quality))
|
tradeItemButton:SetBackdropBorderColor(GetItemQualityColor(quality))
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@@ -107,14 +106,14 @@ local function LoadSkin()
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
hooksecurefunc("TradeFrame_UpdateTargetItem", function(id)
|
hooksecurefunc("TradeFrame_UpdateTargetItem", function(id)
|
||||||
local tradeItemButton = _G["TradeRecipientItem" .. id .. "ItemButton"]
|
local tradeItemButton = _G["TradeRecipientItem"..id.."ItemButton"]
|
||||||
local tradeItemName = _G["TradeRecipientItem" .. id .. "Name"]
|
local tradeItemName = _G["TradeRecipientItem"..id.."Name"]
|
||||||
|
|
||||||
local name = select(1, GetTradeTargetItemInfo(id))
|
local name = GetTradeTargetItemInfo(id)
|
||||||
if name then
|
if name then
|
||||||
local quality = select(4, GetTradeTargetItemInfo(id))
|
local _, _, _, quality = GetTradeTargetItemInfo(id)
|
||||||
tradeItemName:SetTextColor(GetItemQualityColor(quality))
|
tradeItemName:SetTextColor(GetItemQualityColor(quality))
|
||||||
if quality and quality > 1 then
|
if quality then
|
||||||
tradeItemButton:SetBackdropBorderColor(GetItemQualityColor(quality))
|
tradeItemButton:SetBackdropBorderColor(GetItemQualityColor(quality))
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -6,9 +6,7 @@ local S = E:GetModule("Skins");
|
|||||||
local _G = _G
|
local _G = _G
|
||||||
local unpack = unpack
|
local unpack = unpack
|
||||||
local select = select
|
local select = select
|
||||||
local find = string.find
|
local find, match, split = string.find, string.match, string.split
|
||||||
local match = string.match
|
|
||||||
local split = string.split
|
|
||||||
--WoW API / Variables
|
--WoW API / Variables
|
||||||
local GetItemInfo = GetItemInfo
|
local GetItemInfo = GetItemInfo
|
||||||
local GetItemQualityColor = GetItemQualityColor
|
local GetItemQualityColor = GetItemQualityColor
|
||||||
@@ -82,9 +80,9 @@ local function LoadSkin()
|
|||||||
skillButton.Text:SetText("+")
|
skillButton.Text:SetText("+")
|
||||||
|
|
||||||
hooksecurefunc(skillButton, "SetNormalTexture", function(self, texture)
|
hooksecurefunc(skillButton, "SetNormalTexture", function(self, texture)
|
||||||
if texture == "Interface\\Buttons\\UI-MinusButton-Up" then
|
if find(texture, "MinusButton") then
|
||||||
self.Text:SetText("-")
|
self.Text:SetText("-")
|
||||||
elseif texture == "Interface\\Buttons\\UI-PlusButton-Up" then
|
elseif find(texture, "PlusButton") then
|
||||||
self.Text:SetText("+")
|
self.Text:SetText("+")
|
||||||
else
|
else
|
||||||
self.Text:SetText("")
|
self.Text:SetText("")
|
||||||
@@ -144,7 +142,7 @@ local function LoadSkin()
|
|||||||
|
|
||||||
TradeSkillSkillIcon:SetWidth(40)
|
TradeSkillSkillIcon:SetWidth(40)
|
||||||
TradeSkillSkillIcon:SetHeight(40)
|
TradeSkillSkillIcon:SetHeight(40)
|
||||||
TradeSkillSkillIcon:SetPoint("TOPLEFT", 4, -3)
|
TradeSkillSkillIcon:SetPoint("TOPLEFT", 2, -3)
|
||||||
|
|
||||||
local skillLink = GetTradeSkillItemLink(id)
|
local skillLink = GetTradeSkillItemLink(id)
|
||||||
if skillLink then
|
if skillLink then
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ local S = E:GetModule("Skins");
|
|||||||
|
|
||||||
--Cache global variables
|
--Cache global variables
|
||||||
--Lua functions
|
--Lua functions
|
||||||
local _G = getfenv()
|
local _G = _G
|
||||||
local unpack = unpack
|
local unpack = unpack
|
||||||
local find = string.find
|
local find = string.find
|
||||||
--WoW API / Variables
|
--WoW API / Variables
|
||||||
@@ -47,12 +47,12 @@ local function LoadSkin()
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
for i = 1, CLASS_TRAINER_SKILLS_DISPLAYED do
|
for i = 1, CLASS_TRAINER_SKILLS_DISPLAYED do
|
||||||
local skillButton = _G["ClassTrainerSkill" .. i]
|
local skillButton = _G["ClassTrainerSkill"..i]
|
||||||
skillButton:SetNormalTexture("")
|
skillButton:SetNormalTexture("")
|
||||||
skillButton.SetNormalTexture = E.noop
|
skillButton.SetNormalTexture = E.noop
|
||||||
|
|
||||||
_G["ClassTrainerSkill" .. i .. "Highlight"]:SetTexture("")
|
_G["ClassTrainerSkill"..i.."Highlight"]:SetTexture("")
|
||||||
_G["ClassTrainerSkill" .. i .. "Highlight"].SetTexture = E.noop
|
_G["ClassTrainerSkill"..i.."Highlight"].SetTexture = E.noop
|
||||||
|
|
||||||
skillButton.Text = skillButton:CreateFontString(nil, "OVERLAY")
|
skillButton.Text = skillButton:CreateFontString(nil, "OVERLAY")
|
||||||
E:FontTemplate(skillButton.Text, nil, 22)
|
E:FontTemplate(skillButton.Text, nil, 22)
|
||||||
@@ -60,9 +60,9 @@ local function LoadSkin()
|
|||||||
skillButton.Text:SetText("+")
|
skillButton.Text:SetText("+")
|
||||||
|
|
||||||
hooksecurefunc(skillButton, "SetNormalTexture", function(self, texture)
|
hooksecurefunc(skillButton, "SetNormalTexture", function(self, texture)
|
||||||
if texture == "Interface\\Buttons\\UI-MinusButton-Up" then
|
if find(texture, "MinusButton") then
|
||||||
self.Text:SetText("-")
|
self.Text:SetText("-")
|
||||||
elseif texture == "Interface\\Buttons\\UI-PlusButton-Up" then
|
elseif find(texture, "PlusButton") then
|
||||||
self.Text:SetText("+")
|
self.Text:SetText("+")
|
||||||
else
|
else
|
||||||
self.Text:SetText("")
|
self.Text:SetText("")
|
||||||
@@ -83,7 +83,7 @@ local function LoadSkin()
|
|||||||
ClassTrainerCollapseAllButton.Text:SetText("+")
|
ClassTrainerCollapseAllButton.Text:SetText("+")
|
||||||
|
|
||||||
hooksecurefunc(ClassTrainerCollapseAllButton, "SetNormalTexture", function(self, texture)
|
hooksecurefunc(ClassTrainerCollapseAllButton, "SetNormalTexture", function(self, texture)
|
||||||
if texture == "Interface\\Buttons\\UI-MinusButton-Up" then
|
if find(texture, "MinusButton") then
|
||||||
self.Text:SetText("-")
|
self.Text:SetText("-")
|
||||||
else
|
else
|
||||||
self.Text:SetText("+")
|
self.Text:SetText("+")
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ local S = E:GetModule("Skins");
|
|||||||
|
|
||||||
--Cache global variables
|
--Cache global variables
|
||||||
--Lua functions
|
--Lua functions
|
||||||
local _G = getfenv()
|
local _G = _G
|
||||||
--WoW API / Variables
|
--WoW API / Variables
|
||||||
local MAX_TUTORIAL_ALERTS = MAX_TUTORIAL_ALERTS
|
local MAX_TUTORIAL_ALERTS = MAX_TUTORIAL_ALERTS
|
||||||
|
|
||||||
@@ -14,7 +14,6 @@ local function LoadSkin()
|
|||||||
local button = _G["TutorialFrameAlertButton"..i]
|
local button = _G["TutorialFrameAlertButton"..i]
|
||||||
local icon = button:GetNormalTexture()
|
local icon = button:GetNormalTexture()
|
||||||
|
|
||||||
-- button:Size(35, 45)
|
|
||||||
button:SetWidth(35)
|
button:SetWidth(35)
|
||||||
button:SetHeight(45)
|
button:SetHeight(45)
|
||||||
E:SetTemplate(button, "Default", true)
|
E:SetTemplate(button, "Default", true)
|
||||||
|
|||||||
@@ -1,25 +1,25 @@
|
|||||||
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
|
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
|
||||||
local S = E:NewModule("Skins", "AceHook-3.0", "AceEvent-3.0");
|
local S = E:NewModule("Skins", "AceHook-3.0", "AceEvent-3.0");
|
||||||
|
|
||||||
local _G = getfenv();
|
local _G = _G
|
||||||
local unpack, assert, pairs, ipairs, select, type, pcall = unpack, assert, pairs, ipairs, select, type, pcall;
|
local unpack, assert, pairs, ipairs, select, type, pcall = unpack, assert, pairs, ipairs, select, type, pcall
|
||||||
local tinsert, wipe = table.insert, table.wipe;
|
local tinsert, wipe = table.insert, table.wipe
|
||||||
local lower = string.lower
|
local lower = string.lower
|
||||||
|
|
||||||
local CreateFrame = CreateFrame;
|
local CreateFrame = CreateFrame
|
||||||
local SetDesaturation = SetDesaturation;
|
local SetDesaturation = SetDesaturation
|
||||||
local hooksecurefunc = hooksecurefunc;
|
local hooksecurefunc = hooksecurefunc
|
||||||
local IsAddOnLoaded = IsAddOnLoaded;
|
local IsAddOnLoaded = IsAddOnLoaded
|
||||||
local GetCVarBool = GetCVarBool;
|
local GetCVarBool = GetCVarBool
|
||||||
|
|
||||||
E.Skins = S;
|
E.Skins = S
|
||||||
S.addonsToLoad = {};
|
S.addonsToLoad = {}
|
||||||
S.nonAddonsToLoad = {};
|
S.nonAddonsToLoad = {}
|
||||||
S.allowBypass = {};
|
S.allowBypass = {}
|
||||||
S.addonCallbacks = {};
|
S.addonCallbacks = {}
|
||||||
S.nonAddonCallbacks = {["CallPriority"] = {}};
|
S.nonAddonCallbacks = {["CallPriority"] = {}}
|
||||||
|
|
||||||
local find = string.find;
|
local find = string.find
|
||||||
|
|
||||||
S.SQUARE_BUTTON_TEXCOORDS = {
|
S.SQUARE_BUTTON_TEXCOORDS = {
|
||||||
["UP"] = { 0.45312500, 0.64062500, 0.01562500, 0.20312500};
|
["UP"] = { 0.45312500, 0.64062500, 0.01562500, 0.20312500};
|
||||||
@@ -27,47 +27,47 @@ S.SQUARE_BUTTON_TEXCOORDS = {
|
|||||||
["LEFT"] = { 0.23437500, 0.42187500, 0.01562500, 0.20312500};
|
["LEFT"] = { 0.23437500, 0.42187500, 0.01562500, 0.20312500};
|
||||||
["RIGHT"] = { 0.42187500, 0.23437500, 0.01562500, 0.20312500};
|
["RIGHT"] = { 0.42187500, 0.23437500, 0.01562500, 0.20312500};
|
||||||
["DELETE"] = { 0.01562500, 0.20312500, 0.01562500, 0.20312500}
|
["DELETE"] = { 0.01562500, 0.20312500, 0.01562500, 0.20312500}
|
||||||
};
|
}
|
||||||
|
|
||||||
function S:SquareButton_SetIcon(self, name)
|
function S:SquareButton_SetIcon(self, name)
|
||||||
local coords = S.SQUARE_BUTTON_TEXCOORDS[strupper(name)];
|
local coords = S.SQUARE_BUTTON_TEXCOORDS[strupper(name)]
|
||||||
if(coords) then
|
if coords then
|
||||||
self.icon:SetTexCoord(coords[1], coords[2], coords[3], coords[4]);
|
self.icon:SetTexCoord(coords[1], coords[2], coords[3], coords[4])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function S:SetModifiedBackdrop(self)
|
function S:SetModifiedBackdrop(self)
|
||||||
if(self.backdrop) then self = self.backdrop; end
|
if self.backdrop then self = self.backdrop end
|
||||||
self:SetBackdropBorderColor(unpack(E["media"].rgbvaluecolor));
|
self:SetBackdropBorderColor(unpack(E["media"].rgbvaluecolor))
|
||||||
end
|
end
|
||||||
|
|
||||||
function S:SetOriginalBackdrop(self)
|
function S:SetOriginalBackdrop(self)
|
||||||
if(self.backdrop) then self = self.backdrop; end
|
if self.backdrop then self = self.backdrop end
|
||||||
self:SetBackdropBorderColor(unpack(E["media"].bordercolor));
|
self:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
||||||
end
|
end
|
||||||
|
|
||||||
function S:HandleButton(f, strip)
|
function S:HandleButton(f, strip)
|
||||||
local name = f:GetName();
|
local name = f:GetName()
|
||||||
if(name) then
|
if name then
|
||||||
local left = _G[name .."Left"];
|
local left = _G[name .."Left"]
|
||||||
local middle = _G[name .."Middle"];
|
local middle = _G[name .."Middle"]
|
||||||
local right = _G[name .."Right"];
|
local right = _G[name .."Right"]
|
||||||
|
|
||||||
if(left) then E:Kill(left); end
|
if left then E:Kill(left) end
|
||||||
if(middle) then E:Kill(middle); end
|
if middle then E:Kill(middle) end
|
||||||
if(right) then E:Kill(right); end
|
if right then E:Kill(right) end
|
||||||
end
|
end
|
||||||
|
|
||||||
if(f.Left) then E:Kill(f.Left); end
|
if f.Left then E:Kill(f.Left) end
|
||||||
if(f.Middle) then E:Kill(f.Middle); end
|
if f.Middle then E:Kill(f.Middle) end
|
||||||
if(f.Right) then E:Kill(f.Right); end
|
if f.Right then E:Kill(f.Right) end
|
||||||
|
|
||||||
if(f.SetNormalTexture) then f:SetNormalTexture(""); end
|
if f.SetNormalTexture then f:SetNormalTexture("") end
|
||||||
if(f.SetHighlightTexture) then f:SetHighlightTexture(""); end
|
if f.SetHighlightTexture then f:SetHighlightTexture("") end
|
||||||
if(f.SetPushedTexture) then f:SetPushedTexture(""); end
|
if f.SetPushedTexture then f:SetPushedTexture("") end
|
||||||
if(f.SetDisabledTexture) then f:SetDisabledTexture(""); end
|
if f.SetDisabledTexture then f:SetDisabledTexture("") end
|
||||||
|
|
||||||
if(strip) then E:StripTextures(f); end
|
if strip then E:StripTextures(f) end
|
||||||
|
|
||||||
E:SetTemplate(f, "Default", true)
|
E:SetTemplate(f, "Default", true)
|
||||||
HookScript(f, "OnEnter", function() S:SetModifiedBackdrop(this) end)
|
HookScript(f, "OnEnter", function() S:SetModifiedBackdrop(this) end)
|
||||||
@@ -243,7 +243,7 @@ function S:HandleEditBox(frame)
|
|||||||
if _G[frame:GetName() .."Mid"] then E:Kill(_G[frame:GetName() .."Mid"]) end
|
if _G[frame:GetName() .."Mid"] then E:Kill(_G[frame:GetName() .."Mid"]) end
|
||||||
|
|
||||||
if string.gfind(frame:GetName(), "Silver") or string.gfind(frame:GetName(), "Copper") then
|
if string.gfind(frame:GetName(), "Silver") or string.gfind(frame:GetName(), "Copper") then
|
||||||
frame.backdrop:SetPoint("BOTTOMRIGHT", -12, -2);
|
frame.backdrop:SetPoint("BOTTOMRIGHT", -12, -2)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -301,10 +301,10 @@ function S:HandleIcon(icon, parent)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function S:HandleItemButton(b, shrinkIcon)
|
function S:HandleItemButton(b, shrinkIcon)
|
||||||
if(b.isSkinned) then return; end
|
if b.isSkinned then return end
|
||||||
|
|
||||||
local icon = b.icon or b.IconTexture or b.iconTexture;
|
local icon = b.icon or b.IconTexture or b.iconTexture
|
||||||
local texture;
|
local texture
|
||||||
if b:GetName() and _G[b:GetName() .."IconTexture"] then
|
if b:GetName() and _G[b:GetName() .."IconTexture"] then
|
||||||
icon = _G[b:GetName() .."IconTexture"]
|
icon = _G[b:GetName() .."IconTexture"]
|
||||||
elseif b:GetName() and _G[b:GetName() .."Icon"] then
|
elseif b:GetName() and _G[b:GetName() .."Icon"] then
|
||||||
@@ -448,7 +448,7 @@ function S:ADDON_LOADED()
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if not E.initialized then return; end
|
if not E.initialized then return end
|
||||||
|
|
||||||
if self.addonsToLoad[arg1] then
|
if self.addonsToLoad[arg1] then
|
||||||
self.addonsToLoad[arg1]()
|
self.addonsToLoad[arg1]()
|
||||||
@@ -508,7 +508,7 @@ function S:AddCallbackForAddon(addonName, eventName, loadFunc, forceLoad, bypass
|
|||||||
end
|
end
|
||||||
|
|
||||||
--Register loadFunc to be called when event is fired
|
--Register loadFunc to be called when event is fired
|
||||||
E.RegisterCallback(E, eventName, loadFunc);
|
E.RegisterCallback(E, eventName, loadFunc)
|
||||||
|
|
||||||
if forceLoad then
|
if forceLoad then
|
||||||
E.callbacks:Fire(eventName)
|
E.callbacks:Fire(eventName)
|
||||||
@@ -527,7 +527,7 @@ function S:AddCallback(eventName, loadFunc)
|
|||||||
return
|
return
|
||||||
elseif not loadFunc or type(loadFunc) ~= "function" then
|
elseif not loadFunc or type(loadFunc) ~= "function" then
|
||||||
E:Print("Invalid argument #2 to S:AddCallback (function expected)")
|
E:Print("Invalid argument #2 to S:AddCallback (function expected)")
|
||||||
return;
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if self.nonAddonCallbacks[eventName] or E.ModuleCallbacks[eventName] or E.InitialModuleCallbacks[eventName] then
|
if self.nonAddonCallbacks[eventName] or E.ModuleCallbacks[eventName] or E.InitialModuleCallbacks[eventName] then
|
||||||
@@ -581,10 +581,10 @@ function S:Initialize()
|
|||||||
ScriptErrorsFrame_OnError(catch, false)
|
ScriptErrorsFrame_OnError(catch, false)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
wipe(self.nonAddonsToLoad);
|
wipe(self.nonAddonsToLoad)
|
||||||
end
|
end
|
||||||
|
|
||||||
S:RegisterEvent("ADDON_LOADED");
|
S:RegisterEvent("ADDON_LOADED")
|
||||||
|
|
||||||
local function InitializeCallback()
|
local function InitializeCallback()
|
||||||
S:Initialize()
|
S:Initialize()
|
||||||
|
|||||||
Reference in New Issue
Block a user