update tables

This commit is contained in:
Crum
2018-12-06 19:55:03 -06:00
parent cb90d0f1e5
commit 4d0cc6c85c
68 changed files with 705 additions and 597 deletions
+2 -2
View File
@@ -821,7 +821,7 @@ function B:OnEvent()
end
function B:UpdateGoldText()
self.BagFrame.goldText:SetText(E:FormatMoney(GetMoney(), E.db["bags"].moneyFormat))
self.BagFrame.goldText:SetText(E:FormatMoney(GetMoney(), E.db.bags.moneyFormat))
end
function B:FormatMoney(amount)
@@ -1530,7 +1530,7 @@ function B:CreateSellFrame()
B.SellFrame.statusbar = CreateFrame("StatusBar", "ElvUIVendorGraysFrameStatusbar", B.SellFrame)
E:Size(B.SellFrame.statusbar, 180, 16)
E:Point(B.SellFrame.statusbar, "BOTTOM", B.SellFrame, "BOTTOM", 0, 4)
B.SellFrame.statusbar:SetStatusBarTexture(E["media"].normTex)
B.SellFrame.statusbar:SetStatusBarTexture(E.media.normTex)
B.SellFrame.statusbar:SetStatusBarColor(1, 0, 0)
E:CreateBackdrop(B.SellFrame.statusbar, "Transparent")
+6 -6
View File
@@ -606,17 +606,17 @@ function B.SortBags(...)
for bagType, sortedBags in pairs(bagCache) do
if bagType ~= "Normal" then
B.Stack(sortedBags, sortedBags, B.IsPartial)
B.Stack(bagCache["Normal"], sortedBags)
B.Fill(bagCache["Normal"], sortedBags, B.db.sortInverted)
B.Stack(bagCache.Normal, sortedBags)
B.Fill(bagCache.Normal, sortedBags, B.db.sortInverted)
B.Sort(sortedBags, nil, B.db.sortInverted)
twipe(sortedBags)
end
end
if bagCache["Normal"] then
B.Stack(bagCache["Normal"], bagCache["Normal"], B.IsPartial)
B.Sort(bagCache["Normal"], nil, B.db.sortInverted)
twipe(bagCache["Normal"])
if bagCache.Normal then
B.Stack(bagCache.Normal, bagCache.Normal, B.IsPartial)
B.Sort(bagCache.Normal, nil, B.db.sortInverted)
twipe(bagCache.Normal)
end
twipe(bagCache)
twipe(bagGroups)
+10 -10
View File
@@ -204,9 +204,9 @@ function CH:StyleChat(frame)
end)
tab.text = _G[name.."TabText"]
tab.text:SetTextColor(unpack(E["media"].rgbvaluecolor))
tab.text:SetTextColor(unpack(E.media.rgbvaluecolor))
hooksecurefunc(tab.text, "SetTextColor", function(self, r, g, b)
local rR, gG, bB = unpack(E["media"].rgbvaluecolor)
local rR, gG, bB = unpack(E.media.rgbvaluecolor)
if r ~= rR or g ~= gG or b ~= bB then
self:SetTextColor(rR, gG, bB)
end
@@ -370,8 +370,8 @@ local function FindRightChatID()
end
function CH:UpdateChatTabs()
local fadeUndockedTabs = E.db["chat"].fadeUndockedTabs
local fadeTabsNoBackdrop = E.db["chat"].fadeTabsNoBackdrop
local fadeUndockedTabs = E.db.chat.fadeUndockedTabs
local fadeTabsNoBackdrop = E.db.chat.fadeTabsNoBackdrop
for i = 1, CreatedFrames do
local chat = _G[format("ChatFrame%d", i)]
@@ -420,8 +420,8 @@ function CH:PositionChat(override)
if not self.db.lockPositions or E.private.chat.enable ~= true then return end
local chat, tab, id, isDocked
local fadeUndockedTabs = E.db["chat"].fadeUndockedTabs
local fadeTabsNoBackdrop = E.db["chat"].fadeTabsNoBackdrop
local fadeUndockedTabs = E.db.chat.fadeUndockedTabs
local fadeTabsNoBackdrop = E.db.chat.fadeTabsNoBackdrop
for i = 1, CreatedFrames do
local BASE_OFFSET = 57 + E.Spacing*3
@@ -514,7 +514,7 @@ local function UpdateChatTabColor(_, r, g, b)
_G["ChatFrame"..i.."TabText"]:SetTextColor(r, g, b)
end
end
E["valueColorUpdateFuncs"][UpdateChatTabColor] = true
E.valueColorUpdateFuncs[UpdateChatTabColor] = true
function CH:ScrollToBottom(frame)
frame:ScrollToBottom()
@@ -1158,7 +1158,7 @@ local protectLinks = {}
function CH:CheckKeyword(message)
for itemLink in gmatch(message, "|%x+|Hitem:.-|h.-|h|r") do
protectLinks[itemLink] = gsub(itemLink, "%s","|s")
for keyword, _ in pairs(CH.Keywords) do
for keyword in pairs(CH.Keywords) do
if itemLink == keyword then
if self.db.keywordSound ~= "None" and not self.SoundPlayed then
PlaySoundFile(LSM:Fetch("sound", self.db.keywordSound), "Master")
@@ -1358,10 +1358,10 @@ function CH:DisplayChatHistory()
CH.SoundPlayed = nil
end
tremove(ChatTypeGroup["GUILD"], 3)
tremove(ChatTypeGroup.GUILD, 3)
function CH:DelayGuildMOTD()
local delay, delayFrame, chat = 0, CreateFrame("Frame")
tinsert(ChatTypeGroup["GUILD"], 3, "GUILD_MOTD")
tinsert(ChatTypeGroup.GUILD, 3, "GUILD_MOTD")
delayFrame:SetScript("OnUpdate", function()
delay = delay + arg1
if delay < 7 then return end
+1 -1
View File
@@ -65,6 +65,6 @@ local function ValueColorUpdate(hex)
OnEvent(lastPanel)
end
end
E["valueColorUpdateFuncs"][ValueColorUpdate] = true
E.valueColorUpdateFuncs[ValueColorUpdate] = true
DT:RegisterDatatext("Armor", {"UNIT_RESISTANCES"}, OnEvent, nil, nil, OnEnter, nil, ARMOR)
+1 -1
View File
@@ -61,6 +61,6 @@ local function ValueColorUpdate(hex)
OnEvent(lastPanel)
end
end
E["valueColorUpdateFuncs"][ValueColorUpdate] = true
E.valueColorUpdateFuncs[ValueColorUpdate] = true
DT:RegisterDatatext("Attack Power", {"UNIT_ATTACK_POWER", "UNIT_RANGED_ATTACK_POWER"}, OnEvent, nil, nil, OnEnter, nil, ATTACK_POWER_TOOLTIP)
+1 -1
View File
@@ -122,6 +122,6 @@ local function ValueColorUpdate(hex)
OnEvent(lastPanel)
end
end
E["valueColorUpdateFuncs"][ValueColorUpdate] = true
E.valueColorUpdateFuncs[ValueColorUpdate] = true
DT:RegisterDatatext("Avoidance", {"COMBAT_RATING_UPDATE", "PLAYER_TARGET_CHANGED"}, OnEvent, nil, nil, OnEnter, nil, L["Avoidance Breakdown"])
+27 -27
View File
@@ -110,7 +110,7 @@ end
local function ValueColorUpdate(newHex)
hex = newHex
end
E["valueColorUpdateFuncs"][ValueColorUpdate] = true
E.valueColorUpdateFuncs[ValueColorUpdate] = true
function DT:GetDataPanelPoint(panel, i, numPoints)
if(numPoints == 1) then
@@ -119,9 +119,9 @@ function DT:GetDataPanelPoint(panel, i, numPoints)
if(i == 1) then
return "CENTER", panel, "CENTER"
elseif(i == 2) then
return "RIGHT", panel.dataPanels["middle"], "LEFT", -4, 0
return "RIGHT", panel.dataPanels.middle, "LEFT", -4, 0
elseif(i == 3) then
return "LEFT", panel.dataPanels["middle"], "RIGHT", 4, 0
return "LEFT", panel.dataPanels.middle, "RIGHT", 4, 0
end
end
end
@@ -180,12 +180,12 @@ end
function DT:AssignPanelToDataText(panel, data)
panel.name = ""
if data["name"] then
panel.name = data["name"]
if data.name then
panel.name = data.name
end
if data["events"] then
for _, event in pairs(data["events"]) do
if data.events then
for _, event in pairs(data.events) do
-- random error 132
if event == "PLAYER_ENTERING_WORLD" then
event = "PLAYER_LOGIN"
@@ -194,35 +194,35 @@ function DT:AssignPanelToDataText(panel, data)
end
end
if data["eventFunc"] then
if data.eventFunc then
panel:SetScript("OnEvent", function()
data["eventFunc"](this, event)
data.eventFunc(this, event)
end)
data["eventFunc"](panel, "ELVUI_FORCE_RUN")
data.eventFunc(panel, "ELVUI_FORCE_RUN")
end
if data["onUpdate"] then
if data.onUpdate then
panel:SetScript("OnUpdate", function()
data["onUpdate"](this, arg1)
data.onUpdate(this, arg1)
end)
data["onUpdate"](panel, 20000)
data.onUpdate(panel, 20000)
end
if data["onClick"] then
if data.onClick then
panel:SetScript("OnClick", function()
data["onClick"](this)
data.onClick(this)
end)
end
if data["onEnter"] then
if data.onEnter then
panel:SetScript("OnEnter", function()
data["onEnter"](this)
data.onEnter(this)
end)
end
if data["onLeave"] then
if data.onLeave then
panel:SetScript("OnLeave", function()
data["onLeave"](this)
data.onLeave(this)
end)
else
panel:SetScript("OnLeave", DT.Data_OnLeave)
@@ -285,33 +285,33 @@ function DT:RegisterDatatext(name, events, eventFunc, updateFunc, clickFunc, onE
error("Cannot register datatext no name was provided.")
end
DT.RegisteredDataTexts[name]["name"] = name
DT.RegisteredDataTexts[name].name = name
if type(events) ~= "table" and events ~= nil then
error("Events must be registered as a table.")
else
DT.RegisteredDataTexts[name]["events"] = events
DT.RegisteredDataTexts[name]["eventFunc"] = eventFunc
DT.RegisteredDataTexts[name].events = events
DT.RegisteredDataTexts[name].eventFunc = eventFunc
end
if updateFunc and type(updateFunc) == "function" then
DT.RegisteredDataTexts[name]["onUpdate"] = updateFunc
DT.RegisteredDataTexts[name].onUpdate = updateFunc
end
if clickFunc and type(clickFunc) == "function" then
DT.RegisteredDataTexts[name]["onClick"] = clickFunc
DT.RegisteredDataTexts[name].onClick = clickFunc
end
if onEnterFunc and type(onEnterFunc) == "function" then
DT.RegisteredDataTexts[name]["onEnter"] = onEnterFunc
DT.RegisteredDataTexts[name].onEnter = onEnterFunc
end
if onLeaveFunc and type(onLeaveFunc) == "function" then
DT.RegisteredDataTexts[name]["onLeave"] = onLeaveFunc
DT.RegisteredDataTexts[name].onLeave = onLeaveFunc
end
if localizedName and type(localizedName) == "string" then
DT.RegisteredDataTexts[name]["localizedName"] = localizedName
DT.RegisteredDataTexts[name].localizedName = localizedName
end
end
+1 -1
View File
@@ -73,6 +73,6 @@ local function ValueColorUpdate(hex)
OnEvent(lastPanel, "ELVUI_COLOR_UPDATE")
end
end
E["valueColorUpdateFuncs"][ValueColorUpdate] = true
E.valueColorUpdateFuncs[ValueColorUpdate] = true
DT:RegisterDatatext("Durability", {"PLAYER_ENTERING_WORLD", "UPDATE_INVENTORY_ALERTS", "MERCHANT_SHOW"}, OnEvent, nil, OnClick, OnEnter, nil, DURABILITY)
+1 -1
View File
@@ -172,6 +172,6 @@ local function ValueColorUpdate(hex)
OnEvent(lastPanel, "ELVUI_COLOR_UPDATE")
end
end
E["valueColorUpdateFuncs"][ValueColorUpdate] = true
E.valueColorUpdateFuncs[ValueColorUpdate] = true
DT:RegisterDatatext("Friends", {"PLAYER_LOGIN", "FRIENDLIST_UPDATE", "CHAT_MSG_SYSTEM"}, OnEvent, nil, OnClick, OnEnter, nil, FRIENDS)
+12 -12
View File
@@ -16,11 +16,11 @@ local resetInfoFormatter = join("", "|cffaaaaaa", L["Reset Data: Hold Shift + Ri
local function OnEvent(self)
local NewMoney = GetMoney()
ElvDB = ElvDB or {}
ElvDB["gold"] = ElvDB["gold"] or {}
ElvDB["gold"][E.myrealm] = ElvDB["gold"][E.myrealm] or {}
ElvDB["gold"][E.myrealm][E.myname] = ElvDB["gold"][E.myrealm][E.myname] or NewMoney
ElvDB.gold = ElvDB.gold or {}
ElvDB.gold[E.myrealm] = ElvDB.gold[E.myrealm] or {}
ElvDB.gold[E.myrealm][E.myname] = ElvDB.gold[E.myrealm][E.myname] or NewMoney
local OldMoney = ElvDB["gold"][E.myrealm][E.myname] or NewMoney
local OldMoney = ElvDB.gold[E.myrealm][E.myname] or NewMoney
local Change = NewMoney - OldMoney
if OldMoney > NewMoney then
@@ -31,7 +31,7 @@ local function OnEvent(self)
self.text:SetText(E:FormatMoney(NewMoney, E.db.datatexts.goldFormat or "BLIZZARD"))
ElvDB["gold"][E.myrealm][E.myname] = NewMoney
ElvDB.gold[E.myrealm][E.myname] = NewMoney
end
local function OnClick(self)
@@ -52,19 +52,19 @@ local function OnEnter(self)
DT.tooltip:AddDoubleLine(L["Earned:"], E:FormatMoney(Profit, style), 1, 1, 1, 1, 1, 1)
DT.tooltip:AddDoubleLine(L["Spent:"], E:FormatMoney(Spent, style), 1, 1, 1, 1, 1, 1)
if Profit < Spent then
DT.tooltip:AddDoubleLine(L["Deficit:"], E:FormatMoney(Profit-Spent, style), 1, 0, 0, 1, 1, 1)
DT.tooltip:AddDoubleLine(L["Deficit:"], E:FormatMoney(Profit - Spent, style), 1, 0, 0, 1, 1, 1)
elseif (Profit - Spent) > 0 then
DT.tooltip:AddDoubleLine(L["Profit:"], E:FormatMoney(Profit-Spent, style), 0, 1, 0, 1, 1, 1)
DT.tooltip:AddDoubleLine(L["Profit:"], E:FormatMoney(Profit - Spent, style), 0, 1, 0, 1, 1, 1)
end
DT.tooltip:AddLine(" ")
local totalGold = 0;
DT.tooltip:AddLine(L["Character: "])
for k, _ in pairs(ElvDB["gold"][E.myrealm]) do
if ElvDB["gold"][E.myrealm][k] then
DT.tooltip:AddDoubleLine(k, E:FormatMoney(ElvDB["gold"][E.myrealm][k], style), 1, 1, 1, 1, 1, 1)
totalGold = totalGold + ElvDB["gold"][E.myrealm][k]
for k in pairs(ElvDB.gold[E.myrealm]) do
if ElvDB.gold[E.myrealm][k] then
DT.tooltip:AddDoubleLine(k, E:FormatMoney(ElvDB.gold[E.myrealm][k], style), 1, 1, 1, 1, 1, 1)
totalGold = totalGold + ElvDB.gold[E.myrealm][k]
end
end
@@ -78,4 +78,4 @@ local function OnEnter(self)
DT.tooltip:Show()
end
DT:RegisterDatatext("Gold", {"PLAYER_ENTERING_WORLD", "PLAYER_MONEY", "SEND_MAIL_MONEY_CHANGED", "SEND_MAIL_COD_CHANGED", "PLAYER_TRADE_MONEY", "TRADE_MONEY_CHANGED"}, OnEvent, nil, OnClick, OnEnter, nil, L["Gold"])
DT:RegisterDatatext("Gold", {"PLAYER_ENTERING_WORLD", "PLAYER_MONEY", "SEND_MAIL_MONEY_CHANGED", "SEND_MAIL_COD_CHANGED", "PLAYER_TRADE_MONEY", "TRADE_MONEY_CHANGED"}, OnEvent, nil, OnClick, OnEnter, nil, L.gold)
+1 -1
View File
@@ -229,6 +229,6 @@ local function ValueColorUpdate(hex)
OnEvent(lastPanel, "ELVUI_COLOR_UPDATE")
end
end
E["valueColorUpdateFuncs"][ValueColorUpdate] = true
E.valueColorUpdateFuncs[ValueColorUpdate] = true
DT:RegisterDatatext("Guild", {"PLAYER_ENTERING_WORLD", "GUILD_ROSTER_UPDATE", "PLAYER_GUILD_UPDATE", "GUILD_MOTD"}, OnEvent, nil, OnClick, OnEnter, nil, GUILD)
+1 -1
View File
@@ -89,6 +89,6 @@ local function ValueColorUpdate(hex)
OnUpdate(lastPanel, 20000)
end
end
E["valueColorUpdateFuncs"][ValueColorUpdate] = true
E.valueColorUpdateFuncs[ValueColorUpdate] = true
DT:RegisterDatatext("Time", nil, nil, OnUpdate, OnClick, OnEnter, OnLeave)
+2 -2
View File
@@ -112,8 +112,8 @@ function M:SkinBubble(frame)
if E.private.general.chatBubbles == "backdrop" then
if E.PixelMode then
frame:SetBackdrop({
bgFile = E["media"].blankTex,
edgeFile = E["media"].blankTex,
bgFile = E.media.blankTex,
edgeFile = E.media.blankTex,
tile = false, tileSize = 0, edgeSize = mult,
insets = {left = 0, right = 0, top = 0, bottom = 0}
})
+2 -2
View File
@@ -107,7 +107,7 @@ local function createSlot(id)
iconFrame:SetPoint("RIGHT", frame)
E:SetTemplate(iconFrame, "Default")
frame.iconFrame = iconFrame
E["frames"][iconFrame] = nil
E.frames[iconFrame] = nil
local icon = iconFrame:CreateTexture(nil, "ARTWORK")
icon:SetTexCoord(unpack(E.TexCoords))
@@ -290,7 +290,7 @@ function M:LoadLoot()
StaticPopup_Hide("CONFIRM_LOOT_DISTRIBUTION")
CloseLoot()
end)
E["frames"][lootFrame] = nil
E.frames[lootFrame] = nil
self:RegisterEvent("LOOT_OPENED")
self:RegisterEvent("LOOT_SLOT_CLEARED")
+1 -1
View File
@@ -189,7 +189,7 @@ function M:CreateRollFrame()
E:SetInside(status)
status:SetScript("OnUpdate", function() StatusUpdate(status) end)
status:SetFrameLevel(status:GetFrameLevel() - 1)
status:SetStatusBarTexture(E["media"].normTex)
status:SetStatusBarTexture(E.media.normTex)
E:RegisterStatusBar(status)
status:SetStatusBarColor(.8, .8, .8, .9)
status.parent = frame
+9 -9
View File
@@ -200,7 +200,7 @@ function mod:StyleFrame(parent, noBackdrop, point)
if not noBackdrop then
point.backdrop = parent:CreateTexture(nil, "BACKGROUND")
point.backdrop:SetAllPoints(point)
point.backdrop:SetTexture(unpack(E["media"].backdropfadecolor))
point.backdrop:SetTexture(unpack(E.media.backdropfadecolor))
end
if E.PixelMode then
@@ -208,25 +208,25 @@ function mod:StyleFrame(parent, noBackdrop, point)
point.bordertop:SetPoint("TOPLEFT", point, "TOPLEFT", -noscalemult, noscalemult)
point.bordertop:SetPoint("TOPRIGHT", point, "TOPRIGHT", noscalemult, noscalemult)
point.bordertop:SetHeight(noscalemult)
point.bordertop:SetTexture(unpack(E["media"].bordercolor))
point.bordertop:SetTexture(unpack(E.media.bordercolor))
point.borderbottom = parent:CreateTexture()
point.borderbottom:SetPoint("BOTTOMLEFT", point, "BOTTOMLEFT", -noscalemult, -noscalemult)
point.borderbottom:SetPoint("BOTTOMRIGHT", point, "BOTTOMRIGHT", noscalemult, -noscalemult)
point.borderbottom:SetHeight(noscalemult)
point.borderbottom:SetTexture(unpack(E["media"].bordercolor))
point.borderbottom:SetTexture(unpack(E.media.bordercolor))
point.borderleft = parent:CreateTexture()
point.borderleft:SetPoint("TOPLEFT", point, "TOPLEFT", -noscalemult, noscalemult)
point.borderleft:SetPoint("BOTTOMLEFT", point, "BOTTOMLEFT", noscalemult, -noscalemult)
point.borderleft:SetWidth(noscalemult)
point.borderleft:SetTexture(unpack(E["media"].bordercolor))
point.borderleft:SetTexture(unpack(E.media.bordercolor))
point.borderright = parent:CreateTexture()
point.borderright:SetPoint("TOPRIGHT", point, "TOPRIGHT", noscalemult, noscalemult)
point.borderright:SetPoint("BOTTOMRIGHT", point, "BOTTOMRIGHT", -noscalemult, -noscalemult)
point.borderright:SetWidth(noscalemult)
point.borderright:SetTexture(unpack(E["media"].bordercolor))
point.borderright:SetTexture(unpack(E.media.bordercolor))
else
point.bordertop = parent:CreateTexture(nil, "OVERLAY")
point.bordertop:SetPoint("TOPLEFT", point, "TOPLEFT", -noscalemult, noscalemult*2)
@@ -521,7 +521,7 @@ function mod:AnimatedHide()
num = num + 1
end
if num < 1 then
end
end
@@ -649,7 +649,7 @@ function mod:OnUpdate()
end
for frame in pairs(mod.VisiblePlates) do
if mod.hasTarget then
if mod.hasTarget then
frame.alpha = frame:GetParent():GetAlpha()
else
frame.alpha = 1
@@ -801,8 +801,8 @@ function mod:ClassCache_ClassUpdated(_, name, class)
end
function mod:Initialize()
self.db = E.db["nameplates"]
if E.private["nameplates"].enable ~= true then return end
self.db = E.db.nameplates
if E.private.nameplates.enable ~= true then return end
self.hasTarget = false
@@ -92,7 +92,7 @@ local function LoadSkin()
E:StyleButton(AuctionsItemButton, false, true)
HookScript(AuctionsItemButton, "OnEvent", function()
this:SetBackdropBorderColor(unpack(E["media"].bordercolor))
this:SetBackdropBorderColor(unpack(E.media.bordercolor))
if event == "NEW_AUCTION_UPDATE" and this:GetNormalTexture() then
this:GetNormalTexture():SetTexCoord(unpack(E.TexCoords))
E:SetInside(this:GetNormalTexture())
@@ -104,11 +104,11 @@ local function LoadSkin()
if quality then
this:SetBackdropBorderColor(GetItemQualityColor(quality))
else
this:SetBackdropBorderColor(unpack(E["media"].bordercolor))
this:SetBackdropBorderColor(unpack(E.media.bordercolor))
end
end
else
this:SetBackdropBorderColor(unpack(E["media"].bordercolor))
this:SetBackdropBorderColor(unpack(E.media.bordercolor))
end
end)
@@ -221,7 +221,7 @@ local function LoadSkin()
icon:SetBackdropBorderColor(r, g, b)
end)
hooksecurefunc(name, "Hide", function()
icon:SetBackdropBorderColor(unpack(E["media"].bordercolor))
icon:SetBackdropBorderColor(unpack(E.media.bordercolor))
end)
end
@@ -254,7 +254,7 @@ local function LoadSkin()
icon:SetBackdropBorderColor(r, g, b)
end)
hooksecurefunc(name, "Hide", function(_, r, g, b)
icon:SetBackdropBorderColor(unpack(E["media"].bordercolor))
icon:SetBackdropBorderColor(unpack(E.media.bordercolor))
end)
end
@@ -287,7 +287,7 @@ local function LoadSkin()
icon:SetBackdropBorderColor(r, g, b)
end)
hooksecurefunc(name, "Hide", function(_, r, g, b)
icon:SetBackdropBorderColor(unpack(E["media"].bordercolor))
icon:SetBackdropBorderColor(unpack(E.media.bordercolor))
end)
end
+2 -2
View File
@@ -100,7 +100,7 @@ local function LoadSkin()
local rarity = GetInventoryItemQuality("player", this:GetID())
this:SetBackdropBorderColor(GetItemQualityColor(rarity))
else
this:SetBackdropBorderColor(unpack(E["media"].bordercolor))
this:SetBackdropBorderColor(unpack(E.media.bordercolor))
end
end)
@@ -133,7 +133,7 @@ local function LoadSkin()
PetMagicResFrame5:GetRegions():SetTexCoord(0.21875, 0.78125, 0.4765625, 0.546875)
E:StripTextures(PetPaperDollFrameExpBar)
PetPaperDollFrameExpBar:SetStatusBarTexture(E["media"].normTex)
PetPaperDollFrameExpBar:SetStatusBarTexture(E.media.normTex)
E:RegisterStatusBar(PetPaperDollFrameExpBar)
E:CreateBackdrop(PetPaperDollFrameExpBar, "Default")
+4 -4
View File
@@ -47,7 +47,7 @@ local function LoadSkin()
E:Size(CraftRankFrame, 420, 18)
CraftRankFrame:ClearAllPoints()
CraftRankFrame:SetPoint("TOP", -10, -38)
CraftRankFrame:SetStatusBarTexture(E["media"].normTex)
CraftRankFrame:SetStatusBarTexture(E.media.normTex)
E:RegisterStatusBar(CraftRankFrame)
CraftRankFrameSkillName:Hide()
@@ -204,7 +204,7 @@ local function LoadSkin()
CraftIcon:SetBackdropBorderColor(GetItemQualityColor(quality))
CraftName:SetTextColor(GetItemQualityColor(quality))
else
CraftIcon:SetBackdropBorderColor(unpack(E["media"].bordercolor))
CraftIcon:SetBackdropBorderColor(unpack(E.media.bordercolor))
CraftName:SetTextColor(1, 1, 1)
end
end
@@ -228,8 +228,8 @@ local function LoadSkin()
name:SetTextColor(GetItemQualityColor(quality))
end
else
reagent:SetBackdropBorderColor(unpack(E["media"].bordercolor))
icon.backdrop:SetBackdropBorderColor(unpack(E["media"].bordercolor))
reagent:SetBackdropBorderColor(unpack(E.media.bordercolor))
icon.backdrop:SetBackdropBorderColor(unpack(E.media.bordercolor))
end
end
end
+2 -2
View File
@@ -65,8 +65,8 @@ local function LoadSkin()
HookScript(FrameStackTooltip, "OnShow", function()
E:SetTemplate(this, "Transparent")
this:SetBackdropColor(unpack(E["media"].backdropfadecolor))
this:SetBackdropBorderColor(unpack(E["media"].bordercolor))
this:SetBackdropColor(unpack(E.media.backdropfadecolor))
this:SetBackdropBorderColor(unpack(E.media.bordercolor))
end)
HookScript(EventTraceTooltip, "OnShow", function()
@@ -9,6 +9,7 @@ local SetDressUpBackground = SetDressUpBackground
local function LoadSkin()
if E.private.skins.blizzard.enable ~= true or E.private.skins.blizzard.dressingroom ~= true then return end
local DressUpFrame = _G["DressUpFrame"]
E:StripTextures(DressUpFrame)
E:CreateBackdrop(DressUpFrame, "Transparent")
E:Point(DressUpFrame.backdrop, "TOPLEFT", 10, -12)
+1
View File
@@ -27,6 +27,7 @@ local function LoadSkin()
"VerbalHarassmentButton",
}
local HelpFrame = _G["HelpFrame"]
E:StripTextures(HelpFrame)
E:CreateBackdrop(HelpFrame, "Transparent")
E:Point(HelpFrame.backdrop, "TOPLEFT", 6, -2)
+1
View File
@@ -16,6 +16,7 @@ local hooksecurefunc = hooksecurefunc
local function LoadSkin()
if not E.private.skins.blizzard.enable or not E.private.skins.blizzard.inspect then return end
local InspectFrame = _G["InspectFrame"]
E:StripTextures(InspectFrame, true)
E:CreateBackdrop(InspectFrame, "Transparent")
E:Point(InspectFrame.backdrop, "TOPLEFT", 10, -12)
+3 -3
View File
@@ -70,10 +70,10 @@ local function LoadSkin()
if quality then
lootButton.backdrop:SetBackdropBorderColor(GetItemQualityColor(quality))
else
lootButton.backdrop:SetBackdropBorderColor(unpack(E["media"].bordercolor))
lootButton.backdrop:SetBackdropBorderColor(unpack(E.media.bordercolor))
end
else
lootButton.backdrop:SetBackdropBorderColor(unpack(E["media"].bordercolor))
lootButton.backdrop:SetBackdropBorderColor(unpack(E.media.bordercolor))
end
end
end
@@ -121,7 +121,7 @@ local function LoadRollSkin()
local statusBar = _G[frameName.."Timer"]
E:StripTextures(statusBar)
E:CreateBackdrop(statusBar, "Default")
statusBar:SetStatusBarTexture(E["media"].normTex)
statusBar:SetStatusBarTexture(E.media.normTex)
E:RegisterStatusBar(statusBar)
local decoration = _G[frameName.."Decoration"]
+1
View File
@@ -11,6 +11,7 @@ local getn = table.getn
local function LoadSkin()
if E.private.skins.blizzard.enable ~= true or E.private.skins.blizzard.macro ~= true then return end
local MacroFrame = _G["MacroFrame"]
E:StripTextures(MacroFrame)
E:CreateBackdrop(MacroFrame, "Transparent")
E:Point(MacroFrame.backdrop, "TOPLEFT", 10, -11)
+6 -6
View File
@@ -73,13 +73,13 @@ local function LoadSkin()
if quality then
button:SetBackdropBorderColor(GetItemQualityColor(quality))
else
button:SetBackdropBorderColor(unpack(E["media"].bordercolor))
button:SetBackdropBorderColor(unpack(E.media.bordercolor))
end
end
elseif isGM then
button:SetBackdropBorderColor(0, 0.56, 0.94)
else
button:SetBackdropBorderColor(unpack(E["media"].bordercolor))
button:SetBackdropBorderColor(unpack(E.media.bordercolor))
end
end
@@ -123,12 +123,12 @@ local function LoadSkin()
if quality then
button:SetBackdropBorderColor(GetItemQualityColor(quality))
else
button:SetBackdropBorderColor(unpack(E["media"].bordercolor))
button:SetBackdropBorderColor(unpack(E.media.bordercolor))
end
texture:SetTexCoord(unpack(E.TexCoords))
E:SetInside(texture)
else
button:SetBackdropBorderColor(unpack(E["media"].bordercolor))
button:SetBackdropBorderColor(unpack(E.media.bordercolor))
end
end)
@@ -189,12 +189,12 @@ local function LoadSkin()
if quality then
button:SetBackdropBorderColor(GetItemQualityColor(quality))
else
button:SetBackdropBorderColor(unpack(E["media"].bordercolor))
button:SetBackdropBorderColor(unpack(E.media.bordercolor))
end
texture:SetTexCoord(unpack(E.TexCoords))
E:SetInside(texture)
else
button:SetBackdropBorderColor(unpack(E["media"].bordercolor))
button:SetBackdropBorderColor(unpack(E.media.bordercolor))
end
end
end)
+6 -6
View File
@@ -30,7 +30,7 @@ local function LoadSkin()
else
if MerchantNextPageButton:IsShown() and MerchantNextPageButton:IsEnabled() == 1 then
MerchantNextPageButton_OnClick()
end
end
end
end)
@@ -112,15 +112,15 @@ local function LoadSkin()
itemName:SetTextColor(GetItemQualityColor(quality))
itemButton:SetBackdropBorderColor(GetItemQualityColor(quality))
else
itemButton:SetBackdropBorderColor(unpack(E["media"].bordercolor))
itemButton:SetBackdropBorderColor(unpack(E.media.bordercolor))
end
else
itemButton:SetBackdropBorderColor(unpack(E["media"].bordercolor))
itemButton:SetBackdropBorderColor(unpack(E.media.bordercolor))
end
end
HookScript(MerchantBuyBackItemItemButton, "OnEvent", function()
this:SetBackdropBorderColor(unpack(E["media"].bordercolor))
this:SetBackdropBorderColor(unpack(E.media.bordercolor))
end)
local buybackName = GetBuybackItemInfo(GetNumBuybackItems())
@@ -130,7 +130,7 @@ local function LoadSkin()
MerchantBuyBackItemName:SetTextColor(GetItemQualityColor(quality))
MerchantBuyBackItemItemButton:SetBackdropBorderColor(GetItemQualityColor(quality))
else
MerchantBuyBackItemItemButton:SetBackdropBorderColor(unpack(E["media"].bordercolor))
MerchantBuyBackItemItemButton:SetBackdropBorderColor(unpack(E.media.bordercolor))
end
end
end
@@ -150,7 +150,7 @@ local function LoadSkin()
itemName:SetTextColor(GetItemQualityColor(quality))
itemButton:SetBackdropBorderColor(GetItemQualityColor(quality))
else
itemButton:SetBackdropBorderColor(unpack(E["media"].bordercolor))
itemButton:SetBackdropBorderColor(unpack(E.media.bordercolor))
end
end
end
@@ -40,7 +40,7 @@ local function LoadSkin()
E:StripTextures(mirrorTimer)
E:Size(mirrorTimer, 222, 18)
mirrorTimer.label = text
statusBar:SetStatusBarTexture(E["media"].normTex)
statusBar:SetStatusBarTexture(E.media.normTex)
E:RegisterStatusBar(statusBar)
E:CreateBackdrop(statusBar)
E:Size(statusBar, 222, 18)
@@ -9,6 +9,7 @@ local _G = _G
local function LoadSkin()
if E.private.skins.blizzard.enable ~= true or E.private.skins.blizzard.petition ~= true then return end
local PetitionFrame = _G["PetitionFrame"]
E:StripTextures(PetitionFrame, true)
E:CreateBackdrop(PetitionFrame, "Transparent")
E:Point(PetitionFrame.backdrop, "TOPLEFT", 12, -17)
+3 -3
View File
@@ -126,8 +126,8 @@ local function LoadSkin()
text:SetTextColor(GetItemQualityColor(quality))
else
if frame then
frame:SetBackdropBorderColor(unpack(E["media"].bordercolor))
frame.backdrop:SetBackdropBorderColor(unpack(E["media"].bordercolor))
frame:SetBackdropBorderColor(unpack(E.media.bordercolor))
frame.backdrop:SetBackdropBorderColor(unpack(E.media.bordercolor))
end
text:SetTextColor(1, 1, 1)
end
@@ -140,7 +140,7 @@ local function LoadSkin()
E:Size(QuestRewardItemHighlight, 142, 40)
hooksecurefunc("QuestRewardItem_OnClick", function()
QuestRewardItemHighlight:ClearAllPoints();
QuestRewardItemHighlight:ClearAllPoints()
E:SetOutside(QuestRewardItemHighlight, this:GetName().."IconTexture")
_G[this:GetName().."Name"]:SetTextColor(1, 1, 0)
+1 -1
View File
@@ -69,7 +69,7 @@ local function LoadSkin()
for _, v in pairs{"HealthBar", "ManaBar", "Target", "TargetTarget"} do
local sBar = pfBName..v
E:StripTextures(_G[sBar])
_G[sBar]:SetStatusBarTexture(E["media"].normTex)
_G[sBar]:SetStatusBarTexture(E.media.normTex)
end
E:Point(_G[pfBName.."ManaBar"], "TOP", "$parentHealthBar", "BOTTOM", 0, 0)
+4 -1
View File
@@ -6,10 +6,13 @@ local S = E:GetModule("Skins");
local _G = _G
local unpack = unpack
--WoW API / Variables
local CreateFrame = CreateFrame
local hooksecurefunc = hooksecurefunc
local function LoadSkin()
if E.private.skins.blizzard.enable ~= true or E.private.skins.blizzard.spellbook ~= true then return end
local SpellBookFrame = _G["SpellBookFrame"]
E:StripTextures(SpellBookFrame, true)
E:CreateBackdrop(SpellBookFrame, "Transparent")
E:Point(SpellBookFrame.backdrop, "TOPLEFT", 10, -12)
@@ -28,7 +31,7 @@ local function LoadSkin()
if currentPage > 1 then
PrevPageButton_OnClick()
end
else
else
if currentPage < maxPages then
NextPageButton_OnClick()
end
+1
View File
@@ -13,6 +13,7 @@ local UnitExists = UnitExists
local function LoadSkin()
if E.private.skins.blizzard.enable ~= true or E.private.skins.blizzard.stable ~= true then return end
local PetStableFrame = _G["PetStableFrame"]
E:StripTextures(PetStableFrame)
E:Kill(PetStableFramePortrait)
E:CreateBackdrop(PetStableFrame, "Transparent")
+1
View File
@@ -10,6 +10,7 @@ local hooksecurefunc = hooksecurefunc
local function LoadSkin()
if E.private.skins.blizzard.enable ~= true or E.private.skins.blizzard.tabard ~= true then return end
local TabardFrame = _G["TabardFrame"]
E:StripTextures(TabardFrame)
E:Kill(TabardFramePortrait)
E:CreateBackdrop(TabardFrame, "Transparent")
+1
View File
@@ -12,6 +12,7 @@ local function LoadSkin()
UIPanelWindows["TalentFrame"] = {area = "left", pushable = 0, whileDead = 1}
local PlayerTalentFrame = _G["PlayerTalentFrame"]
E:StripTextures(TalentFrame)
E:CreateBackdrop(TalentFrame, "Transparent")
E:Point(TalentFrame.backdrop, "TOPLEFT", 13, -12)
+4
View File
@@ -1,6 +1,10 @@
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local S = E:GetModule("Skins");
--Cache global variables
--Lua functions
local _G = _G
local function LoadSkin()
if E.private.skins.blizzard.enable ~= true or E.private.skins.blizzard.taxi ~= true then return end
+2 -2
View File
@@ -14,7 +14,7 @@ local function LoadSkin()
S:HandleCloseButton(ItemRefCloseButton)
local GameTooltip = _G["GameTooltip"]
local GameTooltipStatusBar = _G["GameTooltipStatusBar"]
local GameTooltipStatusBar = _G["GameTooltipStatusBar"]
local tooltips = {
GameTooltip,
ItemRefTooltip,
@@ -37,7 +37,7 @@ local function LoadSkin()
TT:SecureHookScript(tt, "OnShow", "CheckBackdropColor")
end
GameTooltipStatusBar:SetStatusBarTexture(E["media"].normTex)
GameTooltipStatusBar:SetStatusBarTexture(E.media.normTex)
E:RegisterStatusBar(GameTooltipStatusBar)
E:CreateBackdrop(GameTooltipStatusBar, "Transparent")
GameTooltipStatusBar:ClearAllPoints()
+5 -3
View File
@@ -6,14 +6,16 @@ local S = E:GetModule("Skins");
local _G = _G
local unpack = unpack
--WoW API / Variables
local CreateFrame = CreateFrame
local hooksecurefunc = hooksecurefunc
local GetItemQualityColor = GetItemQualityColor
local GetTradePlayerItemInfo = GetTradePlayerItemInfo
local GetTradeTargetItemInfo = GetTradeTargetItemInfo
local hooksecurefunc = hooksecurefunc
local function LoadSkin()
if E.private.skins.blizzard.enable ~= true or E.private.skins.blizzard.trade ~= true then return end
local TradeFrame = _G["TradeFrame"]
E:StripTextures(TradeFrame, true)
E:Width(TradeFrame, 400)
E:CreateBackdrop(TradeFrame, "Transparent")
@@ -101,7 +103,7 @@ local function LoadSkin()
tradeItemButton:SetBackdropBorderColor(GetItemQualityColor(quality))
end
else
tradeItemButton:SetBackdropBorderColor(unpack(E["media"].bordercolor))
tradeItemButton:SetBackdropBorderColor(unpack(E.media.bordercolor))
end
end)
@@ -117,7 +119,7 @@ local function LoadSkin()
tradeItemButton:SetBackdropBorderColor(GetItemQualityColor(quality))
end
else
tradeItemButton:SetBackdropBorderColor(unpack(E["media"].bordercolor))
tradeItemButton:SetBackdropBorderColor(unpack(E.media.bordercolor))
end
end)
end
+5 -4
View File
@@ -22,6 +22,7 @@ local function LoadSkin()
UIPanelWindows["TradeSkillFrame"] = {area = "doublewide", pushable = 0, whileDead = 1}
local TradeSkillFrame = _G["TradeSkillFrame"]
E:StripTextures(TradeSkillFrame, true)
E:CreateBackdrop(TradeSkillFrame, "Transparent")
TradeSkillFrame.backdrop:SetPoint("TOPLEFT", 10, -12)
@@ -47,7 +48,7 @@ local function LoadSkin()
E:Size(TradeSkillRankFrame, 420, 18)
TradeSkillRankFrame:ClearAllPoints()
TradeSkillRankFrame:SetPoint("TOP", -10, -38)
TradeSkillRankFrame:SetStatusBarTexture(E["media"].normTex)
TradeSkillRankFrame:SetStatusBarTexture(E.media.normTex)
E:RegisterStatusBar(TradeSkillRankFrame)
TradeSkillRankFrameSkillName:Hide()
@@ -224,7 +225,7 @@ local function LoadSkin()
TradeSkillSkillIcon:SetBackdropBorderColor(GetItemQualityColor(quality))
TradeSkillSkillName:SetTextColor(GetItemQualityColor(quality))
else
TradeSkillSkillIcon:SetBackdropBorderColor(unpack(E["media"].bordercolor))
TradeSkillSkillIcon:SetBackdropBorderColor(unpack(E.media.bordercolor))
TradeSkillSkillName:SetTextColor(1, 1, 1)
end
end
@@ -248,8 +249,8 @@ local function LoadSkin()
name:SetTextColor(GetItemQualityColor(quality))
end
else
reagent:SetBackdropBorderColor(unpack(E["media"].bordercolor))
icon.backdrop:SetBackdropBorderColor(unpack(E["media"].bordercolor))
reagent:SetBackdropBorderColor(unpack(E.media.bordercolor))
icon.backdrop:SetBackdropBorderColor(unpack(E.media.bordercolor))
end
end
end
@@ -1,9 +1,14 @@
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local S = E:GetModule("Skins");
--Cache global variables
--Lua functions
local _G = _G
local function LoadSkin()
if E.private.skins.blizzard.enable ~= true or E.private.skins.blizzard.worldmap ~= true then return end
local WorldMapFrame = _G["WorldMapFrame"]
E:StripTextures(WorldMapFrame)
E:CreateBackdrop(WorldMapPositioningGuide, "Transparent")
+13 -13
View File
@@ -38,12 +38,12 @@ end
function S:SetModifiedBackdrop()
if this.backdrop then this = this.backdrop end
this:SetBackdropBorderColor(unpack(E["media"].rgbvaluecolor))
this:SetBackdropBorderColor(unpack(E.media.rgbvaluecolor))
end
function S:SetOriginalBackdrop()
if this.backdrop then this = this.backdrop end
this:SetBackdropBorderColor(unpack(E["media"].bordercolor))
this:SetBackdropBorderColor(unpack(E.media.bordercolor))
end
function S:HandleButton(f, strip)
@@ -389,7 +389,7 @@ function S:HandleSliderFrame(frame)
frame:SetBackdrop(nil)
end
end)
frame:SetThumbTexture(E["media"].blankTex)
frame:SetThumbTexture(E.media.blankTex)
frame:GetThumbTexture():SetVertexColor(0.3, 0.3, 0.3)
E:Size(frame:GetThumbTexture(), SIZE-2)
if orientation == "VERTICAL" then
@@ -460,9 +460,9 @@ function S:ADDON_LOADED()
self.addonsToLoad[arg1] = nil
elseif self.addonCallbacks[arg1] then
--Fire events to the skins that rely on this addon
for index, event in ipairs(self.addonCallbacks[arg1]["CallPriority"]) do
for index, event in ipairs(self.addonCallbacks[arg1].CallPriority) do
self.addonCallbacks[arg1][event] = nil
self.addonCallbacks[arg1]["CallPriority"][index] = nil
self.addonCallbacks[arg1].CallPriority[index] = nil
E.callbacks:Fire(event)
end
end
@@ -475,9 +475,9 @@ function S:ADDON_LOADED()
self.addonsToLoad[arg1]()
self.addonsToLoad[arg1] = nil
elseif self.addonCallbacks[arg1] then
for index, event in ipairs(self.addonCallbacks[arg1]["CallPriority"]) do
for index, event in ipairs(self.addonCallbacks[arg1].CallPriority) do
self.addonCallbacks[arg1][event] = nil
self.addonCallbacks[arg1]["CallPriority"][index] = nil
self.addonCallbacks[arg1].CallPriority[index] = nil
E.callbacks:Fire(event)
end
end
@@ -536,7 +536,7 @@ function S:AddCallbackForAddon(addonName, eventName, loadFunc, forceLoad, bypass
else
--Insert eventName in this addons' registry
self.addonCallbacks[addonName][eventName] = true
tinsert(self.addonCallbacks[addonName]["CallPriority"], eventName)
tinsert(self.addonCallbacks[addonName].CallPriority, eventName)
end
end
@@ -559,7 +559,7 @@ function S:AddCallback(eventName, loadFunc)
--Add event name to registry
self.nonAddonCallbacks[eventName] = true
tinsert(self.nonAddonCallbacks["CallPriority"], eventName)
tinsert(self.nonAddonCallbacks.CallPriority, eventName)
--Register loadFunc to be called when event is fired
E.RegisterCallback(E, eventName, loadFunc)
@@ -571,17 +571,17 @@ function S:Initialize()
--Fire events for Blizzard addons that are already loaded
for addon in pairs(self.addonCallbacks) do
if IsAddOnLoaded(addon) then
for index, event in ipairs(self.addonCallbacks[addon]["CallPriority"]) do
for index, event in ipairs(self.addonCallbacks[addon].CallPriority) do
self.addonCallbacks[addon][event] = nil
self.addonCallbacks[addon]["CallPriority"][index] = nil
self.addonCallbacks[addon].CallPriority[index] = nil
E.callbacks:Fire(event)
end
end
end
--Fire event for all skins that doesn't rely on a Blizzard addon
for index, event in ipairs(self.nonAddonCallbacks["CallPriority"]) do
for index, event in ipairs(self.nonAddonCallbacks.CallPriority) do
self.nonAddonCallbacks[event] = nil
self.nonAddonCallbacks["CallPriority"][index] = nil
self.nonAddonCallbacks.CallPriority[index] = nil
E.callbacks:Fire(event)
end
+4 -4
View File
@@ -97,7 +97,7 @@ function TT:GameTooltip_SetDefaultAnchor(tt, parent)
end
if self.db.cursorAnchor then
tt:SetOwner(parent, "ANCHOR_CURSOR")
return;
return
else
tt:SetOwner(parent, "ANCHOR_NONE")
end
@@ -207,10 +207,10 @@ function TT:UPDATE_MOUSEOVER_UNIT(_, unit)
local unitTarget = unit.."target"
if self.db.targetInfo and unit ~= "player" and UnitExists(unitTarget) then
local targetColor;
local targetColor
if UnitIsPlayer(unitTarget) then
local _, class = UnitClass(unitTarget);
targetColor = CUSTOM_CLASS_COLORS and CUSTOM_CLASS_COLORS[class] or RAID_CLASS_COLORS[class];
local _, class = UnitClass(unitTarget)
targetColor = CUSTOM_CLASS_COLORS and CUSTOM_CLASS_COLORS[class] or RAID_CLASS_COLORS[class]
else
local reaction = UnitReaction(unitTarget, "player") or 4
targetColor = E.db.tooltip.useCustomFactionColors and E.db.tooltip.factionColors[reaction] or FACTION_BAR_COLORS[reaction]
@@ -259,17 +259,17 @@ function UF:HeaderConfig(header, configMode)
end
end
UF["headerFunctions"][header.groupName]:AdjustVisibility(header)
UF.headerFunctions[header.groupName]:AdjustVisibility(header)
end
function UF:PLAYER_REGEN_DISABLED()
for _, header in pairs(UF["headers"]) do
for _, header in pairs(UF.headers) do
if header.forceShow then
self:HeaderConfig(header)
end
end
for _, unit in pairs(UF["units"]) do
for _, unit in pairs(UF.units) do
local frame = self[unit]
if frame and frame.forceShow then
self:UnforceShow(frame)
@@ -24,7 +24,7 @@ function UF:Construct_AuraBars()
E:SetTemplate(self, "Default", nil, nil, UF.thinBorders, true)
local inset = UF.thinBorders and E.mult or nil
E:SetInside(bar, self, inset, inset)
UF["statusbars"][bar] = true
UF.statusbars[bar] = true
UF:Update_StatusBar(bar)
UF:Configure_FontString(bar.spelltime)
+4 -4
View File
@@ -79,7 +79,7 @@ function UF:Construct_AuraIcon(button)
if auraName then
E:Print(format(L["The spell '%s' has been added to the Blacklist unitframe aura filter."], auraName))
E.global["unitframe"]["aurafilters"]["Blacklist"]["spells"][auraName] = {
E.global.unitframe.aurafilters.Blacklist.spells[auraName] = {
["enable"] = true,
["priority"] = 0,
}
@@ -319,8 +319,8 @@ function UF:UpdateAuraIconSettings(auras, noCycle)
if not frame.db then return end
local db = frame.db[type]
local unitframeFont = LSM:Fetch("font", E.db["unitframe"].font)
local unitframeFontOutline = E.db["unitframe"].fontOutline
local unitframeFont = LSM:Fetch("font", E.db.unitframe.font)
local unitframeFontOutline = E.db.unitframe.fontOutline
local index = 1
auras.db = db
if db then
@@ -421,7 +421,7 @@ function UF:UpdateAuraTimer(elapsed)
if self.text:GetFont() then
self.text:SetText(format("%s%s|r", E.TimeColors[formatid], E.TimeFormats[formatid][2]), timervalue)
elseif self:GetParent():GetParent().db then
E:FontTemplate(self.text, LSM:Fetch("font", E.db["unitframe"].font), self:GetParent():GetParent().db[self:GetParent().type].fontSize, E.db["unitframe"].fontOutline)
E:FontTemplate(self.text, LSM:Fetch("font", E.db.unitframe.font), self:GetParent():GetParent().db[self:GetParent().type].fontSize, E.db.unitframe.fontOutline)
self.text:SetText(format("%s%s|r", E.TimeColors[formatid], E.TimeFormats[formatid][2]), timervalue)
end
end
@@ -30,7 +30,7 @@ local INVERT_ANCHORPOINT = {
function UF:Construct_Castbar(frame, moverName)
local castbar = CreateFrame("StatusBar", nil, frame)
castbar:SetFrameLevel(frame.RaisedElementParent:GetFrameLevel() + 30) --Make it appear above everything else
self["statusbars"][castbar] = true
self.statusbars[castbar] = true
castbar.CustomDelayText = self.CustomCastDelayText
castbar.CustomTimeText = self.CustomTimeText
castbar.PostCastStart = self.PostCastStart
+2 -2
View File
@@ -13,7 +13,7 @@ assert(ElvUF, "ElvUI was unable to locate oUF.")
function UF:Construct_PowerBar(frame, bg, text, textPos)
local power = CreateFrame("StatusBar", nil, frame)
UF["statusbars"][power] = true
UF.statusbars[power] = true
power.PostUpdate = self.PostUpdatePower
@@ -22,7 +22,7 @@ function UF:Construct_PowerBar(frame, bg, text, textPos)
if bg then
power.bg = power:CreateTexture(nil, "BORDER")
power.bg:SetAllPoints()
power.bg:SetTexture(E["media"].blankTex)
power.bg:SetTexture(E.media.blankTex)
power.bg.multiplier = 0.2
end
+3 -3
View File
@@ -35,7 +35,7 @@ function UF:Construct_PartyFrames()
UF:Update_StatusBars()
UF:Update_FontStrings()
UF:Update_PartyFrames(self, UF.db["units"]["party"])
UF:Update_PartyFrames(self, UF.db.units.party)
return self;
end
@@ -59,7 +59,7 @@ function UF:Update_PartyHeader(header)
header:RegisterEvent("PARTY_MEMBERS_CHANGED")
header:RegisterEvent("RAID_ROSTER_UPDATE")
header:SetScript("OnEvent", UF["PartySmartVisibility"])
header:SetScript("OnEvent", UF.PartySmartVisibility)
header.positioned = true
end
@@ -136,4 +136,4 @@ function UF:Update_PartyFrames(frame, db)
frame:UpdateAllElements("ElvUI_UpdateAllElements")
end
UF["headerstoload"]["party"] = true
UF.headerstoload.party = true
+3 -3
View File
@@ -37,7 +37,7 @@ function UF:Construct_RaidFrames()
UF:Update_FontStrings()
self.unitframeType = "raid"
UF:Update_RaidFrames(self, UF.db["units"]["raid"])
UF:Update_RaidFrames(self, UF.db.units.raid)
return self
end
@@ -61,7 +61,7 @@ function UF:Update_RaidHeader(header)
header:RegisterEvent("PARTY_MEMBERS_CHANGED")
header:RegisterEvent("RAID_ROSTER_UPDATE")
header:SetScript("OnEvent", UF["RaidSmartVisibility"])
header:SetScript("OnEvent", UF.RaidSmartVisibility)
header.positioned = true
end
@@ -140,4 +140,4 @@ function UF:Update_RaidFrames(frame, db)
frame:UpdateAllElements("ElvUI_UpdateAllElements")
end
UF["headerstoload"]["raid"] = true
UF.headerstoload.raid = true
+6 -6
View File
@@ -161,7 +161,7 @@ ElvUF.Tags.Methods["health:deficit-percent:name"] = function(unit)
if (deficit > 0 and currentHealth > 0) then
return _TAGS["health:percent-nostatus"](unit);
else
return _TAGS["name"](unit);
return _TAGS.name(unit);
end
end
@@ -215,11 +215,11 @@ end
ElvUF.Tags.Events["powercolor"] = "UNIT_ENERGY UNIT_FOCUS UNIT_MANA UNIT_RAGE UNIT_RUNIC_POWER UNIT_MAXPOWER"
ElvUF.Tags.Methods["powercolor"] = function(unit)
local color = ElvUF["colors"].power[UnitPowerType(unit)]
local color = ElvUF.colors.power[UnitPowerType(unit)]
if color then
return Hex(color[1], color[2], color[3])
else
return Hex(unpack(ElvUF["colors"].power[0]))
return Hex(unpack(ElvUF.colors.power[0]))
end
end
@@ -271,8 +271,8 @@ ElvUF.Tags.Methods["power:max"] = function(unit)
end
ElvUF.Tags.Methods["manacolor"] = function()
local altR, altG, altB = PowerBarColor["MANA"].r, PowerBarColor["MANA"].g, PowerBarColor["MANA"].b
local color = ElvUF["colors"].power["MANA"]
local altR, altG, altB = PowerBarColor.MANA.r, PowerBarColor.MANA.g, PowerBarColor.MANA.b
local color = ElvUF.colors.power[0]
if color then
return Hex(color[1], color[2], color[3])
else
@@ -358,7 +358,7 @@ ElvUF.Tags.Methods["namecolor"] = function(unit)
if not class then return "" end
return Hex(class[1], class[2], class[3])
elseif (unitReaction) then
local reaction = ElvUF["colors"].reaction[unitReaction]
local reaction = ElvUF.colors.reaction[unitReaction]
return Hex(reaction[1], reaction[2], reaction[3])
else
return "|cFFC2C2C2"
+65 -65
View File
@@ -24,37 +24,37 @@ local ns = oUF
ElvUF = ns.oUF
assert(ElvUF, "ElvUI was unable to locate oUF.")
UF["headerstoload"] = {}
UF["unitstoload"] = {}
UF.headerstoload = {}
UF.unitstoload = {}
UF["groupPrototype"] = {}
UF["headerPrototype"] = {}
UF["headers"] = {}
UF["units"] = {}
UF.groupPrototype = {}
UF.headerPrototype = {}
UF.headers = {}
UF.units = {}
UF["statusbars"] = {}
UF["fontstrings"] = {}
UF["badHeaderPoints"] = {
UF.statusbars = {}
UF.fontstrings = {}
UF.badHeaderPoints = {
["TOP"] = "BOTTOM",
["LEFT"] = "RIGHT",
["BOTTOM"] = "TOP",
["RIGHT"] = "LEFT"
}
UF["headerFunctions"] = {}
UF.headerFunctions = {}
UF["classMaxResourceBar"] = {
UF.classMaxResourceBar = {
["DRUID"] = 1
}
UF["mapIDs"] = {
UF.mapIDs = {
[443] = 10, -- Warsong Gulch
[461] = 15, -- Arathi Basin
[401] = 40, -- Alterac Valley
[566] = 15, -- Eye of the Storm
}
UF["headerGroupBy"] = {
UF.headerGroupBy = {
["CLASS"] = function(header)
header:SetAttribute("groupingOrder", "DRUID,HUNTER,MAGE,PALADIN,PRIEST,SHAMAN,WARLOCK,WARRIOR")
header:SetAttribute("sortMethod", "NAME")
@@ -325,7 +325,7 @@ end
function UF:Update_StatusBars()
local statusBarTexture = LSM:Fetch("statusbar", self.db.statusbar)
for statusbar in pairs(UF["statusbars"]) do
for statusbar in pairs(UF.statusbars) do
if statusbar and statusbar:GetObjectType() == "StatusBar" and not statusbar.isTransparent then
statusbar:SetStatusBarTexture(statusBarTexture)
elseif statusbar and statusbar:GetObjectType() == "Texture" then
@@ -344,24 +344,24 @@ end
function UF:Update_FontStrings()
local stringFont = LSM:Fetch("font", self.db.font)
for font in pairs(UF["fontstrings"]) do
for font in pairs(UF.fontstrings) do
E:FontTemplate(font, stringFont, self.db.fontSize, self.db.fontOutline)
end
end
function UF:Configure_FontString(obj)
UF["fontstrings"][obj] = true
UF.fontstrings[obj] = true
E:FontTemplate(obj) --This is temporary.
end
function UF:Update_AllFrames()
if E.private["unitframe"].enable ~= true then return; end
if E.private.unitframe.enable ~= true then return; end
self:UpdateColors()
self:Update_FontStrings()
self:Update_StatusBars()
for unit in pairs(self["units"]) do
if self.db["units"][unit].enable then
for unit in pairs(self.units) do
if self.db.units[unit].enable then
self[unit]:Enable()
self[unit]:Update()
E:EnableMover(self[unit].mover:GetName())
@@ -519,9 +519,9 @@ end
function UF.groupPrototype:Update(self)
local group = self.groupName
UF[group].db = UF.db["units"][group]
UF[group].db = UF.db.units[group]
for i = 1, getn(self.groups) do
self.groups[i].db = UF.db["units"][group]
self.groups[i].db = UF.db.units[group]
self.groups[i]:Update()
end
end
@@ -548,7 +548,7 @@ end
function UF.groupPrototype:UpdateHeader(self)
local group = self.groupName;
UF["Update_"..E:StringTitle(group).."Header"](UF, self, UF.db["units"][group]);
UF["Update_"..E:StringTitle(group).."Header"](UF, self, UF.db.units[group]);
end
function UF.headerPrototype:ClearChildPoints()
@@ -560,7 +560,7 @@ end
function UF.headerPrototype:Update(isForced)
local group = self.groupName
local db = UF.db["units"][group]
local db = UF.db.units[group]
local i = 1
local child = self:GetAttribute("child" .. i)
@@ -609,7 +609,7 @@ end
function UF:CreateHeader(parent, groupFilter, overrideName, template, groupName, headerTemplate)
local group = parent.groupName or groupName
local db = UF.db["units"][group]
local db = UF.db.units[group]
ElvUF:SetActiveStyle("ElvUF_"..E:StringTitle(group))
local header = ElvUF:SpawnHeader(overrideName, headerTemplate, nil,
"groupFilter", groupFilter,
@@ -630,7 +630,7 @@ function UF:CreateHeader(parent, groupFilter, overrideName, template, groupName,
end
function UF:CreateAndUpdateHeaderGroup(group, groupFilter, template, headerUpdate, headerTemplate)
local db = self.db["units"][group]
local db = self.db.units[group]
local numGroups = db.numGroups
if not self[group] then
@@ -645,16 +645,16 @@ function UF:CreateAndUpdateHeaderGroup(group, groupFilter, template, headerUpdat
self[group].groupName = group
self[group].template = self[group].template or template
self[group].headerTemplate = self[group].headerTemplate or headerTemplate
if not UF["headerFunctions"][group] then UF["headerFunctions"][group] = {} end
if not UF.headerFunctions[group] then UF.headerFunctions[group] = {} end
for k, v in pairs(self.groupPrototype) do
UF["headerFunctions"][group][k] = v
UF.headerFunctions[group][k] = v
end
else
self[group] = self:CreateHeader(E.UIParent, groupFilter, "ElvUF_"..E:StringTitle(group), template, group, headerTemplate)
end
self[group].db = db
self["headers"][group] = self[group]
self.headers[group] = self[group]
self[group]:Show()
end
@@ -671,17 +671,17 @@ function UF:CreateAndUpdateHeaderGroup(group, groupFilter, template, headerUpdat
end
end
UF["headerFunctions"][group]:AdjustVisibility(self[group])
UF.headerFunctions[group]:AdjustVisibility(self[group])
if headerUpdate or not self[group].mover then
UF["headerFunctions"][group]:Configure_Groups(self[group])
UF.headerFunctions[group]:Configure_Groups(self[group])
if not self[group].isForced and not self[group].blockVisibilityChanges then
-- RegisterStateDriver(self[group], "visibility", db.visibility)
end
else
UF["headerFunctions"][group]:Configure_Groups(self[group])
UF["headerFunctions"][group]:UpdateHeader(self[group])
UF["headerFunctions"][group]:Update(self[group])
UF.headerFunctions[group]:Configure_Groups(self[group])
UF.headerFunctions[group]:UpdateHeader(self[group])
UF.headerFunctions[group]:Update(self[group])
end
if db.enable then
@@ -700,9 +700,9 @@ function UF:CreateAndUpdateHeaderGroup(group, groupFilter, template, headerUpdat
else
self[group].db = db
if not UF["headerFunctions"][group] then UF["headerFunctions"][group] = {} end
UF["headerFunctions"][group]["Update"] = function()
local db = UF.db["units"][group]
if not UF.headerFunctions[group] then UF.headerFunctions[group] = {} end
UF.headerFunctions[group]["Update"] = function()
local db = UF.db.units[group]
if db.enable ~= true then
--UnregisterStateDriver(UF[group], "visibility")
UF[group]:Hide()
@@ -715,14 +715,14 @@ function UF:CreateAndUpdateHeaderGroup(group, groupFilter, template, headerUpdat
for i = 1, UF[group]:GetNumChildren() do
local child = select(i, UF[group]:GetChildren())
UF["Update_"..E:StringTitle(group).."Frames"](UF, child, UF.db["units"][group])
UF["Update_"..E:StringTitle(group).."Frames"](UF, child, UF.db.units[group])
if _G[child:GetName().."Target"] then
UF["Update_"..E:StringTitle(group).."Frames"](UF, _G[child:GetName().."Target"], UF.db["units"][group])
UF["Update_"..E:StringTitle(group).."Frames"](UF, _G[child:GetName().."Target"], UF.db.units[group])
end
if _G[child:GetName().."Pet"] then
UF["Update_"..E:StringTitle(group).."Frames"](UF, _G[child:GetName().."Pet"], UF.db["units"][group])
UF["Update_"..E:StringTitle(group).."Frames"](UF, _G[child:GetName().."Pet"], UF.db.units[group])
end
end
@@ -732,7 +732,7 @@ function UF:CreateAndUpdateHeaderGroup(group, groupFilter, template, headerUpdat
if headerUpdate then
UF["Update_"..E:StringTitle(group).."Header"](self, self[group], db)
else
UF["headerFunctions"][group]:Update(self[group])
UF.headerFunctions[group]:Update(self[group])
end
end
end
@@ -749,14 +749,14 @@ function UF:CreateAndUpdateUF(unit)
frameName = gsub(frameName, "t(arget)", "T%1")
if not self[unit] then
self[unit] = ElvUF:Spawn(unit, "ElvUF_"..frameName)
self["units"][unit] = unit
self.units[unit] = unit
end
self[unit].Update = function()
UF["Update_"..frameName.."Frame"](self, self[unit], self.db["units"][unit])
UF["Update_"..frameName.."Frame"](self, self[unit], self.db.units[unit])
end
if self.db["units"][unit].enable then
if self.db.units[unit].enable then
self[unit]:Enable()
self[unit].Update()
E:EnableMover(self[unit].mover:GetName())
@@ -767,12 +767,12 @@ function UF:CreateAndUpdateUF(unit)
end
function UF:LoadUnits()
for _, unit in pairs(self["unitstoload"]) do
for _, unit in pairs(self.unitstoload) do
self:CreateAndUpdateUF(unit)
end
self["unitstoload"] = nil
self.unitstoload = nil
for group, groupOptions in pairs(self["headerstoload"]) do
for group, groupOptions in pairs(self.headerstoload) do
local groupFilter, template, headerTemplate
if type(groupOptions) == "table" then
groupFilter, template, headerTemplate = unpack(groupOptions)
@@ -780,7 +780,7 @@ function UF:LoadUnits()
self:CreateAndUpdateHeaderGroup(group, groupFilter, template, nil, headerTemplate)
end
self["headerstoload"] = nil
self.headerstoload = nil
end
function UF:UpdateAllHeaders(event)
@@ -796,15 +796,15 @@ function UF:UpdateAllHeaders(event)
end
end
if E.private["unitframe"]["disabledBlizzardFrames"].party then
if E.private.unitframe.disabledBlizzardFrames.party then
ElvUF:DisableBlizzard("party")
end
for group, header in pairs(self["headers"]) do
for group, header in pairs(self.headers) do
if header.numGroups then
UF["headerFunctions"][group]:UpdateHeader(header)
UF.headerFunctions[group]:UpdateHeader(header)
end
UF["headerFunctions"][group]:Update(header)
UF.headerFunctions[group]:Update(header)
if group == "party" or group == "raid" then
--Update BuffIndicators on profile change as they might be using profile specific data
@@ -851,19 +851,19 @@ end
function ElvUF:DisableBlizzard(unit)
if not unit then return end
if(unit == "player") and E.private["unitframe"]["disabledBlizzardFrames"].player then
if(unit == "player") and E.private.unitframe.disabledBlizzardFrames.player then
HandleFrame(PlayerFrame)
elseif(unit == "pet") and E.private["unitframe"]["disabledBlizzardFrames"].player then
elseif(unit == "pet") and E.private.unitframe.disabledBlizzardFrames.player then
HandleFrame(PetFrame)
elseif(unit == "target") and E.private["unitframe"]["disabledBlizzardFrames"].target then
elseif(unit == "target") and E.private.unitframe.disabledBlizzardFrames.target then
HandleFrame(TargetFrame)
HandleFrame(ComboFrame)
-- elseif(unit == "focus") and E.private["unitframe"]["disabledBlizzardFrames"].focus then
-- elseif(unit == "focus") and E.private.unitframe.disabledBlizzardFrames.focus then
-- HandleFrame(FocusFrame)
-- HandleFrame(FocusFrameToT)
elseif(unit == "targettarget") and E.private["unitframe"]["disabledBlizzardFrames"].target then
elseif(unit == "targettarget") and E.private.unitframe.disabledBlizzardFrames.target then
HandleFrame(TargetofTargetFrame)
elseif string.match(unit, "(party)%d?$") == "party" and E.private["unitframe"]["disabledBlizzardFrames"].party then
elseif string.match(unit, "(party)%d?$") == "party" and E.private.unitframe.disabledBlizzardFrames.party then
local id = string.match(unit, "party(%d)")
if id then
HandleFrame("PartyMemberFrame"..id)
@@ -892,9 +892,9 @@ function UF:PLAYER_ENTERING_WORLD()
end
function UF:Initialize()
self.db = E.db["unitframe"]
self.db = E.db.unitframe
self.thinBorders = self.db.thinBorders or E.PixelMode
if E.private["unitframe"].enable ~= true then return; end
if E.private.unitframe.enable ~= true then return; end
E.UnitFrames = UF
self:UpdateColors()
@@ -915,14 +915,14 @@ function UF:Initialize()
end
function UF:ResetUnitSettings(unit)
E:CopyTable(self.db["units"][unit], P["unitframe"]["units"][unit])
E:CopyTable(self.db.units[unit], P.unitframe.units[unit])
if self.db["units"][unit].buffs and self.db["units"][unit].buffs.sizeOverride then
self.db["units"][unit].buffs.sizeOverride = P.unitframe.units[unit].buffs.sizeOverride or 0
if self.db.units[unit].buffs and self.db.units[unit].buffs.sizeOverride then
self.db.units[unit].buffs.sizeOverride = P.unitframe.units[unit].buffs.sizeOverride or 0
end
if self.db["units"][unit].debuffs and self.db["units"][unit].debuffs.sizeOverride then
self.db["units"][unit].debuffs.sizeOverride = P.unitframe.units[unit].debuffs.sizeOverride or 0
if self.db.units[unit].debuffs and self.db.units[unit].debuffs.sizeOverride then
self.db.units[unit].debuffs.sizeOverride = P.unitframe.units[unit].debuffs.sizeOverride or 0
end
self:Update_AllFrames()
@@ -958,7 +958,7 @@ local allowPass = {
}
function UF:MergeUnitSettings(fromUnit, toUnit, isGroupUnit)
local db = self.db["units"]
local db = self.db.units
local filter = ignoreSettings
if isGroupUnit then
filter = ignoreSettingsGroup
+1 -1
View File
@@ -86,4 +86,4 @@ function UF:Update_PetFrame(frame, db)
frame:UpdateAllElements("ElvUI_UpdateAllElements")
end
tinsert(UF["unitstoload"], "pet")
tinsert(UF.unitstoload, "pet")
+1 -1
View File
@@ -83,4 +83,4 @@ function UF:Update_PetTargetFrame(frame, db)
frame:UpdateAllElements("ElvUI_UpdateAllElements")
end
tinsert(UF["unitstoload"], "pettarget")
tinsert(UF.unitstoload, "pettarget")
+1 -1
View File
@@ -113,4 +113,4 @@ function UF:Update_PlayerFrame(frame, db)
frame:UpdateAllElements("ElvUI_UpdateAllElements")
end
tinsert(UF["unitstoload"], "player")
tinsert(UF.unitstoload, "player")
+1 -1
View File
@@ -102,4 +102,4 @@ function UF:Update_TargetFrame(frame, db)
frame:UpdateAllElements("ElvUI_UpdateAllElements")
end
tinsert(UF["unitstoload"], "target")
tinsert(UF.unitstoload, "target")
@@ -82,4 +82,4 @@ function UF:Update_TargetTargetFrame(frame, db)
frame:UpdateAllElements("ElvUI_UpdateAllElements")
end
tinsert(UF["unitstoload"], "targettarget")
tinsert(UF.unitstoload, "targettarget")