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
+1 -1
View File
@@ -220,7 +220,7 @@ function E:CreateMoverPopup()
E:Point(header, "CENTER", f, "TOP")
header:SetFrameLevel(header:GetFrameLevel() + 2)
header:EnableMouse(true)
header:RegisterForClicks("AnyUp", "AnyDown")
header:RegisterForClicks("LeftButtonUp", "RightButtonUp", "LeftButtonDown", "RightButtonDown")
header:SetScript("OnMouseDown", function() f:StartMoving() end)
header:SetScript("OnMouseUp", function() f:StopMovingOrSizing() end)
+1 -1
View File
@@ -230,7 +230,7 @@ function E:GetFormattedText(style, min, max)
elseif style == "PERCENT" then
return format(gftUseStyle, min / max * 100)
elseif style == "CURRENT" or ((style == "CURRENT_MAX" or style == "CURRENT_MAX_PERCENT" or style == "CURRENT_PERCENT") and min == max) then
return format(styles["CURRENT"], E:ShortValue(min))
return format(styles.CURRENT, E:ShortValue(min))
elseif style == "CURRENT_MAX" then
return format(gftUseStyle, E:ShortValue(min), E:ShortValue(max))
elseif style == "CURRENT_PERCENT" then
+6 -6
View File
@@ -306,9 +306,9 @@ function E:CalculateMoverPoints(mover, nudgeX, nudgeY)
end
function E:UpdatePositionOverride(name)
if _G[name] and _G[name]:GetScript("OnDragStop") then
_G[name]:GetScript("OnDragStop")(_G[name])
end
local frame = _G[name]
local OnDragStop = frame and frame.GetScript and frame:GetScript("OnDragStop")
if OnDragStop then OnDragStop(frame) end
end
function E:HasMoverBeenMoved(name)
@@ -371,7 +371,7 @@ end
function E:ToggleMovers(show, moverType)
self.configMode = show
for name, _ in pairs(E.CreatedMovers) do
for name in pairs(E.CreatedMovers) do
if not show then
_G[name]:Hide()
else
@@ -430,7 +430,7 @@ end
function E:ResetMovers(arg)
if arg == "" or arg == nil then
for name, _ in pairs(E.CreatedMovers) do
for name in pairs(E.CreatedMovers) do
local f = _G[name]
local point, anchor, secondaryPoint, x, y = split(",", E.CreatedMovers[name].point)
f:ClearAllPoints()
@@ -444,7 +444,7 @@ function E:ResetMovers(arg)
end
self.db.movers = nil
else
for name, _ in pairs(E.CreatedMovers) do
for name in pairs(E.CreatedMovers) do
for key, value in pairs(E.CreatedMovers[name]) do
if key == "text" then
if arg == value then
+3 -3
View File
@@ -61,13 +61,13 @@ E.PopupDialogs["ELVUI_EDITBOX"] = {
text = E.title,
button1 = OKAY,
hasEditBox = 1,
OnShow = function()
OnShow = function(data)
this.editBox:SetAutoFocus(false)
this.editBox.width = this.editBox:GetWidth()
E:Width(this.editBox, 280)
this.editBox:AddHistoryLine("text")
this.editBox.temptxt = arg1
this.editBox:SetText(arg1)
this.editBox.temptxt = data
this.editBox:SetText(data)
this.editBox:HighlightText()
this.editBox:SetJustifyH("CENTER")
end,
+199 -185
View File
@@ -1,14 +1,15 @@
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local LSM = LibStub("LibSharedMedia-3.0");
local LBF = LibStub("LibButtonFacade", true);
--Cache global variables
--Lua functions
local _G = _G
local tonumber, pairs, ipairs, error, unpack, select, tostring = tonumber, pairs, ipairs, error, unpack, select, tostring
local assert, print, type, collectgarbage, pcall, date = assert, print, type, collectgarbage, pcall, date
local assert, type, collectgarbage, pcall ,print, date = assert, type, collectgarbage, pcall, print, date
local getn, twipe, tinsert, tremove, next = table.getn, table.wipe, tinsert, tremove, next
local floor = floor
local format, find, match, strrep, len, sub, gsub = string.format, string.find, string.match, strrep, string.len, string.sub, string.gsub
local format, find, match, strrep, len, sub, gsub, strjoin = string.format, string.find, string.match, strrep, string.len, string.sub, string.gsub, strjoin
--WoW API / Variables
local CreateFrame = CreateFrame
local GetCVar = GetCVar
@@ -37,21 +38,22 @@ E.resolution = GetCVar("gxResolution")
E.screenheight = tonumber(match(E.resolution, "%d+x(%d+)"))
E.screenwidth = tonumber(match(E.resolution, "(%d+)x+%d"))
E.isMacClient = IsMacClient()
E.PixelMode = false
E["media"] = {}
E["frames"] = {}
E["unitFrameElements"] = {}
E["statusBars"] = {}
E["texts"] = {}
E["snapBars"] = {}
E["RegisteredModules"] = {}
E["RegisteredInitialModules"] = {}
E["ModuleCallbacks"] = {["CallPriority"] = {}}
E["InitialModuleCallbacks"] = {["CallPriority"] = {}}
E["valueColorUpdateFuncs"] = {}
--Tables
E.media = {}
E.frames = {}
E.unitFrameElements = {}
E.statusBars = {}
E.texts = {}
E.snapBars = {}
E.RegisteredModules = {}
E.RegisteredInitialModules = {}
E.ModuleCallbacks = {["CallPriority"] = {}}
E.InitialModuleCallbacks = {["CallPriority"] = {}}
E.valueColorUpdateFuncs = {}
E.TexCoords = {.08, .92, .08, .92}
E.CreditsList = {}
E.PixelMode = false
E.InversePoints = {
TOP = "BOTTOM",
@@ -73,7 +75,7 @@ E.DispelClasses = {
["SHAMAN"] = {
["Poison"] = true,
["Disease"] = true,
["Curse"] = false
["Curse"] = true
},
["PALADIN"] = {
["Poison"] = true,
@@ -144,6 +146,7 @@ function E:Print(msg)
(_G[self.db.general.messageRedirect] or DEFAULT_CHAT_FRAME):AddMessage(strjoin("", self:ColorizedName("ElvUI", true), msg)) -- I put DEFAULT_CHAT_FRAME as a fail safe.
end
--Workaround for people wanting to use white and it reverting to their class color.
E.PriestColors = {
r = 0.99,
g = 0.99,
@@ -167,10 +170,11 @@ function E:ShapeshiftDelayedUpdate(func, ...)
end, 0.05)
end
--Basically check if another class border is being used on a class that doesn't match. And then return true if a match is found.
function E:CheckClassColor(r, g, b)
r, g, b = floor(r*100 + .5) / 100, floor(g*100 + .5) / 100, floor(b*100 + .5) / 100
local matchFound = false
for class, _ in pairs(RAID_CLASS_COLORS) do
for class in pairs(RAID_CLASS_COLORS) do
if class ~= E.myclass then
local colorTable = class == "PRIEST" and E.PriestColors or (CUSTOM_CLASS_COLORS and CUSTOM_CLASS_COLORS[class] or RAID_CLASS_COLORS[class])
if colorTable.r == r and colorTable.g == g and colorTable.b == b then
@@ -195,55 +199,56 @@ function E:GetColorTable(data)
end
function E:UpdateMedia()
if not (self.db and self.db["general"] and self.private["general"]) then return end
if not self.db.general or not self.private.general then return end --Prevent rare nil value errors
-- Fonts
self["media"].normFont = LSM:Fetch("font", self.db["general"].font)
self["media"].combatFont = LSM:Fetch("font", self.db["general"].dmgfont)
self.media.normFont = LSM:Fetch("font", self.db.general.font)
self.media.combatFont = LSM:Fetch("font", self.private.general.dmgfont)
-- Textures
self["media"].blankTex = LSM:Fetch("background", "ElvUI Blank")
self["media"].normTex = LSM:Fetch("statusbar", self.private["general"].normTex)
self["media"].glossTex = LSM:Fetch("statusbar", self.private["general"].glossTex)
self.media.blankTex = LSM:Fetch("background", "ElvUI Blank")
self.media.normTex = LSM:Fetch("statusbar", self.private.general.normTex)
self.media.glossTex = LSM:Fetch("statusbar", self.private.general.glossTex)
-- Border Color
local border = E.db["general"].bordercolor
local border = E.db.general.bordercolor
if self:CheckClassColor(border.r, border.g, border.b) then
local classColor = E.myclass == "PRIEST" and E.PriestColors or (CUSTOM_CLASS_COLORS and CUSTOM_CLASS_COLORS[E.myclass] or RAID_CLASS_COLORS[E.myclass])
E.db["general"].bordercolor.r = classColor.r
E.db["general"].bordercolor.g = classColor.g
E.db["general"].bordercolor.b = classColor.b
E.db.general.bordercolor.r = classColor.r
E.db.general.bordercolor.g = classColor.g
E.db.general.bordercolor.b = classColor.b
end
self["media"].bordercolor = {border.r, border.g, border.b}
self.media.bordercolor = {border.r, border.g, border.b}
-- UnitFrame Border Color
border = E.db["unitframe"].colors.borderColor
border = E.db.unitframe.colors.borderColor
if self:CheckClassColor(border.r, border.g, border.b) then
local classColor = E.myclass == "PRIEST" and E.PriestColors or (CUSTOM_CLASS_COLORS and CUSTOM_CLASS_COLORS[E.myclass] or RAID_CLASS_COLORS[E.myclass])
E.db["unitframe"].colors.borderColor.r = classColor.r
E.db["unitframe"].colors.borderColor.g = classColor.g
E.db["unitframe"].colors.borderColor.b = classColor.b
E.db.unitframe.colors.borderColor.r = classColor.r
E.db.unitframe.colors.borderColor.g = classColor.g
E.db.unitframe.colors.borderColor.b = classColor.b
end
self["media"].unitframeBorderColor = {border.r, border.g, border.b}
self.media.unitframeBorderColor = {border.r, border.g, border.b}
-- Backdrop Color
self["media"].backdropcolor = E:GetColorTable(self.db["general"].backdropcolor)
self.media.backdropcolor = E:GetColorTable(self.db.general.backdropcolor)
-- Backdrop Fade Color
self["media"].backdropfadecolor = E:GetColorTable(self.db["general"].backdropfadecolor)
self.media.backdropfadecolor = E:GetColorTable(self.db.general.backdropfadecolor)
-- Value Color
local value = self.db["general"].valuecolor
local value = self.db.general.valuecolor
if self:CheckClassColor(value.r, value.g, value.b) then
value = E.myclass == "PRIEST" and E.PriestColors or (CUSTOM_CLASS_COLORS and CUSTOM_CLASS_COLORS[E.myclass] or RAID_CLASS_COLORS[E.myclass])
self.db["general"].valuecolor.r = value.r
self.db["general"].valuecolor.g = value.g
self.db["general"].valuecolor.b = value.b
self.db.general.valuecolor.r = value.r
self.db.general.valuecolor.g = value.g
self.db.general.valuecolor.b = value.b
end
self["media"].hexvaluecolor = self:RGBToHex(value.r, value.g, value.b)
self["media"].rgbvaluecolor = {value.r, value.g, value.b}
self.media.hexvaluecolor = self:RGBToHex(value.r, value.g, value.b)
self.media.rgbvaluecolor = {value.r, value.g, value.b}
if LeftChatPanel and LeftChatPanel.tex and RightChatPanel and RightChatPanel.tex then
LeftChatPanel.tex:SetTexture(E.db.chat.panelBackdropNameLeft)
@@ -258,13 +263,14 @@ function E:UpdateMedia()
self:UpdateBlizzardFonts()
end
--Update font/texture paths when they are registered by the addon providing them
--This helps fix most of the issues with fonts or textures reverting to default because the addon providing them is loading after ElvUI.
--We use a wrapper to avoid errors in :UpdateMedia because "self" is passed to the function with a value other than ElvUI.
local function LSMCallback()
E:UpdateMedia()
end
LSM.RegisterCallback(E, "LibSharedMedia_Registered", LSMCallback)
local LBF = LibStub("LibButtonFacade", true)
local LBFGroupToTableElement = {
["ActionBars"] = "actionbar",
["Auras"] = "auras"
@@ -308,91 +314,95 @@ function E:PLAYER_ENTERING_WORLD()
end
function E:ValueFuncCall()
for func, _ in pairs(self["valueColorUpdateFuncs"]) do
func(self["media"].hexvaluecolor, unpack(self["media"].rgbvaluecolor))
for func in pairs(self.valueColorUpdateFuncs) do
func(self.media.hexvaluecolor, unpack(self.media.rgbvaluecolor))
end
end
function E:UpdateFrameTemplates()
for frame in pairs(self["frames"]) do
if frame and frame.template then
E:SetTemplate(frame, frame.template, frame.glossTex)
for frame in pairs(self.frames) do
if frame and frame.template and not frame.ignoreUpdates then
if not frame.ignoreFrameTemplates then
E:SetTemplate(frame, frame.template, frame.glossTex)
end
else
self["frames"][frame] = nil
self.frames[frame] = nil
end
end
for frame in pairs(self["unitFrameElements"]) do
for frame in pairs(self.unitFrameElements) do
if frame and frame.template and not frame.ignoreUpdates then
E:SetTemplate(frame, frame.template, frame.glossTex)
if not frame.ignoreFrameTemplates then
E:SetTemplate(frame, frame.template, frame.glossTex)
end
else
self["unitFrameElements"][frame] = nil
self.unitFrameElements[frame] = nil
end
end
end
function E:UpdateBorderColors()
for frame, _ in pairs(self["frames"]) do
for frame in pairs(self.frames) do
if frame and not frame.ignoreUpdates then
if not frame.ignoreBorderColors then
if frame.template == "Default" or frame.template == "Transparent" or frame.template == nil then
frame:SetBackdropBorderColor(unpack(self["media"].bordercolor))
frame:SetBackdropBorderColor(unpack(self.media.bordercolor))
end
end
else
self["frames"][frame] = nil
self.frames[frame] = nil
end
end
for frame, _ in pairs(self["unitFrameElements"]) do
for frame in pairs(self.unitFrameElements) do
if frame and not frame.ignoreUpdates then
if not frame.ignoreBorderColors then
if frame.template == "Default" or frame.template == "Transparent" or frame.template == nil then
frame:SetBackdropBorderColor(unpack(self["media"].unitframeBorderColor))
frame:SetBackdropBorderColor(unpack(self.media.unitframeBorderColor))
end
end
else
self["unitFrameElements"][frame] = nil
self.unitFrameElements[frame] = nil
end
end
end
function E:UpdateBackdropColors()
for frame, _ in pairs(self["frames"]) do
for frame in pairs(self.frames) do
if frame then
if not frame.ignoreBackdropColors then
if frame.template == "Default" or frame.template == nil then
frame:SetBackdropColor(unpack(self["media"].backdropcolor))
frame:SetBackdropColor(unpack(self.media.backdropcolor))
elseif frame.template == "Transparent" then
frame:SetBackdropColor(unpack(self["media"].backdropfadecolor))
frame:SetBackdropColor(unpack(self.media.backdropfadecolor))
end
end
else
self["frames"][frame] = nil
self.frames[frame] = nil
end
end
for frame, _ in pairs(self["unitFrameElements"]) do
for frame in pairs(self.unitFrameElements) do
if frame then
if not frame.ignoreBackdropColors then
if frame.template == "Default" or frame.template == nil then
frame:SetBackdropColor(unpack(self["media"].backdropcolor))
frame:SetBackdropColor(unpack(self.media.backdropcolor))
elseif frame.template == "Transparent" then
frame:SetBackdropColor(unpack(self["media"].backdropfadecolor))
frame:SetBackdropColor(unpack(self.media.backdropfadecolor))
end
end
else
self["unitFrameElements"][frame] = nil
self.unitFrameElements[frame] = nil
end
end
end
function E:UpdateFontTemplates()
for text, _ in pairs(self["texts"]) do
for text in pairs(self.texts) do
if text then
E:FontTemplate(text, text.font, text.fontSize, text.fontStyle)
else
self["texts"][text] = nil
self.texts[text] = nil
end
end
end
@@ -417,7 +427,7 @@ E.UIParent:SetFrameLevel(UIParent:GetFrameLevel())
E.UIParent:SetPoint("CENTER", UIParent, "CENTER")
E.UIParent:SetWidth(GetScreenWidth())
E.UIParent:SetHeight(GetScreenHeight())
E["snapBars"][getn(E["snapBars"]) + 1] = E.UIParent
E.snapBars[getn(E["snapBars"]) + 1] = E.UIParent
E.HiddenFrame = CreateFrame("Frame")
E.HiddenFrame:Hide()
@@ -554,6 +564,10 @@ function E:RemoveEmptySubTables(tbl)
end
end
--Compare 2 tables and remove duplicate key/value pairs
--param cleanTable : table you want cleaned
--param checkTable : table you want to check against.
--return : a copy of cleanTable with duplicate key/value pairs removed
function E:RemoveTableDuplicates(cleanTable, checkTable)
if type(cleanTable) ~= "table" then
E:Print("Bad argument #1 to 'RemoveTableDuplicates' (table expected)")
@@ -569,12 +583,14 @@ function E:RemoveTableDuplicates(cleanTable, checkTable)
if type(value) == "table" and checkTable[option] and type(checkTable[option]) == "table" then
cleaned[option] = self:RemoveTableDuplicates(value, checkTable[option])
else
-- Add unique data to our clean table
if cleanTable[option] ~= checkTable[option] then
cleaned[option] = value
end
end
end
--Clean out empty sub-tables
self:RemoveEmptySubTables(cleaned)
return cleaned
@@ -744,18 +760,21 @@ function E:StringSplitMultiDelim(s, delim)
assert(type (delim) == "string" and len(delim) > 0, "bad delimiter")
local start = 1
local t = {}
local t = {} -- results table
-- find each instance of a string followed by the delimiter
while(true) do
local pos = find(s, delim, start, true)
local pos = find(s, delim, start, true) -- plain find
if not pos then
break
end
tinsert(t, sub(s, start, pos - 1))
start = pos + len(delim)
end
end -- while
-- insert final one (after last delimiter)
tinsert(t, sub(s, start))
return unpack(t)
@@ -782,13 +801,11 @@ end
local SendRecieveGroupSize = 0
local function SendRecieve()
local prefix, message, sender = arg1, arg2, arg4
if event == "CHAT_MSG_ADDON" then
if sender == E.myname then return end
if arg4 == E.myname then return end
if arg1 == "ELVUI_VERSIONCHK" then
local msg, ver = tonumber(message), tonumber(E.version)
local msg, ver = tonumber(arg2), tonumber(E.version)
if msg and (msg > ver) then -- you're outdated D:
if not E.recievedOutOfDateMessage then
E:Print(L["ElvUI is out of date. You can download the newest version from https://github.com/ElvUI-TBC/ElvUI/"])
@@ -829,95 +846,78 @@ f:RegisterEvent("PLAYER_ENTERING_WORLD")
f:SetScript("OnEvent", SendRecieve)
function E:UpdateAll(ignoreInstall)
self.private = self.charSettings.profile
self.db = self.data.profile
self.global = self.data.global
self.db.theme = nil
self.db.install_complete = nil
E.private = E.charSettings.profile
E.db = E.data.profile
E.global = E.data.global
E.db.theme = nil
E.db.install_complete = nil
self:SetMoversPositions()
self:UpdateMedia()
self:UpdateCooldownSettings("all")
E:DBConversions()
local UF = self:GetModule("UnitFrames")
UF.db = self.db.unitframe
UF:Update_AllFrames()
local ActionBars = E:GetModule("ActionBars")
local AFK = E:GetModule("AFK")
local Auras = E:GetModule("Auras")
local Bags = E:GetModule("Bags")
local Blizzard = E:GetModule("Blizzard")
local Chat = E:GetModule("Chat")
local DataBars = E:GetModule("DataBars")
local DataTexts = E:GetModule("DataTexts")
local Layout = E:GetModule("Layout")
local Minimap = E:GetModule("Minimap")
local NamePlates = E:GetModule("NamePlates")
local Tooltip = E:GetModule("Tooltip")
local UnitFrames = E:GetModule("UnitFrames")
local CH = self:GetModule("Chat")
CH.db = self.db.chat
CH:PositionChat(true)
CH:SetupChat()
CH:UpdateAnchors()
local AB = self:GetModule("ActionBars")
AB.db = self.db.actionbar
AB:UpdateButtonSettings()
AB:UpdateMicroPositionDimensions()
local bags = E:GetModule("Bags")
bags.db = self.db.bags
bags:Layout()
bags:Layout(true)
bags:SizeAndPositionBagBar()
bags:UpdateItemLevelDisplay()
bags:UpdateCountDisplay()
-- local totems = E:GetModule("Totems")
-- totems.db = self.db.general.totems
-- totems:PositionAndSize()
-- totems:ToggleEnable()
self:GetModule("Layout"):ToggleChatPanels()
local DT = self:GetModule("DataTexts")
DT.db = self.db.datatexts
DT:LoadDataTexts()
-- local NP = self:GetModule("NamePlates")
-- NP.db = self.db.nameplates
-- NP:StyleFilterInitializeAllFilters()
-- NP:ConfigureAll()
local DataBars = self:GetModule("DataBars")
ActionBars.db = E.db.actionbar
Auras.db = E.db.auras
Bags.db = E.db.bags
Chat.db = E.db.chat
DataBars.db = E.db.databars
DataBars:UpdateDataBarDimensions()
DataTexts.db = E.db.datatexts
NamePlates.db = E.db.nameplates
Tooltip.db = E.db.tooltip
UnitFrames.db = E.db.unitframe
E:SetMoversPositions()
E:UpdateMedia()
E:UpdateBorderColors()
E:UpdateBackdropColors()
E:UpdateFrameTemplates()
E:UpdateStatusBars()
E:UpdateCooldownSettings("all")
Layout:ToggleChatPanels()
Layout:BottomPanelVisibility()
Layout:TopPanelVisibility()
Layout:SetDataPanelStyle()
ActionBars:UpdateButtonSettings()
ActionBars:UpdateMicroPositionDimensions()
AFK:Toggle()
Bags:Layout()
Bags:Layout(true)
Bags:SizeAndPositionBagBar()
Bags:UpdateCountDisplay()
Bags:UpdateItemLevelDisplay()
Chat:PositionChat(true)
Chat:SetupChat()
Chat:UpdateAnchors()
DataBars:EnableDisable_ExperienceBar()
DataBars:EnableDisable_ReputationBar()
DataBars:UpdateDataBarDimensions()
DataTexts:LoadDataTexts()
Minimap:UpdateSettings()
NamePlates:ConfigureAll()
UnitFrames:Update_AllFrames()
-- local T = self:GetModule("Threat")
-- T.db = self.db.general.threat
-- T:UpdatePosition()
-- T:ToggleEnable()
self:GetModule("Auras").db = self.db.auras
self:GetModule("Tooltip").db = self.db.tooltip
-- if ElvUIPlayerBuffs then
-- E:GetModule("Auras"):UpdateHeader(ElvUIPlayerBuffs)
-- end
-- if ElvUIPlayerDebuffs then
-- E:GetModule("Auras"):UpdateHeader(ElvUIPlayerDebuffs)
-- end
if not (self.private.install_complete or ignoreInstall) then
self:Install()
if E.RefreshGUI then
E:RefreshGUI()
end
self:GetModule("Minimap"):UpdateSettings()
self:GetModule("AFK"):Toggle()
self:UpdateBorderColors()
self:UpdateBackdropColors()
self:UpdateFrameTemplates()
self:UpdateStatusBars()
local LO = E:GetModule("Layout")
LO:ToggleChatPanels()
LO:BottomPanelVisibility()
LO:TopPanelVisibility()
LO:SetDataPanelStyle()
if not (self.private.install_complete or ignoreInstall) then
E:Install()
end
collectgarbage()
end
@@ -957,17 +957,16 @@ function E:RegisterModule(name, loadFunc)
--Add module name to registry
self.ModuleCallbacks[name] = true
tinsert(self.ModuleCallbacks["CallPriority"], name)
self.ModuleCallbacks.CallPriority[getn(self.ModuleCallbacks.CallPriority) + 1] = name
--Register loadFunc to be called when event is fired
E:RegisterCallback(name, loadFunc, E:GetModule(name))
end
--Old deprecated initialize method
else
if self.initialized then
self:GetModule(name):Initialize()
else
tinsert(self["RegisteredModules"], name)
self.RegisteredModules[getn(self.RegisteredModules) + 1] = name
end
end
end
@@ -983,26 +982,25 @@ function E:RegisterInitialModule(name, loadFunc)
--Add module name to registry
self.InitialModuleCallbacks[name] = true
tinsert(self.InitialModuleCallbacks["CallPriority"], name)
self.InitialModuleCallbacks.CallPriority[getn(self.InitialModuleCallbacks.CallPriority) + 1] = name
--Register loadFunc to be called when event is fired
E:RegisterCallback(name, loadFunc, E:GetModule(name))
--Old deprecated initialize method
else
tinsert(self["RegisteredInitialModules"], name)
self.RegisteredInitialModules[getn(self.RegisteredInitialModules) + 1] = name
end
end
function E:InitializeInitialModules()
--Fire callbacks for any module using the new system
for index, moduleName in ipairs(self.InitialModuleCallbacks["CallPriority"]) do
for index, moduleName in ipairs(self.InitialModuleCallbacks.CallPriority) do
self.InitialModuleCallbacks[moduleName] = nil
self.InitialModuleCallbacks["CallPriority"][index] = nil
self.InitialModuleCallbacks.CallPriority[index] = nil
E.callbacks:Fire(moduleName)
end
--Old deprecated initialize method, we keep it for any plugins that may need it
for _, module in pairs(E["RegisteredInitialModules"]) do
for _, module in pairs(E.RegisteredInitialModules) do
module = self:GetModule(module, true)
if module and module.Initialize then
local _, catch = pcall(module.Initialize, module)
@@ -1021,17 +1019,18 @@ end
function E:InitializeModules()
--Fire callbacks for any module using the new system
for index, moduleName in ipairs(self.ModuleCallbacks["CallPriority"]) do
for index, moduleName in ipairs(self.ModuleCallbacks.CallPriority) do
self.ModuleCallbacks[moduleName] = nil
self.ModuleCallbacks["CallPriority"][index] = nil
self.ModuleCallbacks.CallPriority[index] = nil
E.callbacks:Fire(moduleName)
end
--Old deprecated initialize method, we keep it for any plugins that may need it
for _, module in pairs(E["RegisteredModules"]) do
for _, module in pairs(E.RegisteredModules) do
module = self:GetModule(module)
if module.Initialize then
local _, catch = pcall(module.Initialize, module)
if catch and GetCVar("ShowErrors") == "1" then
ScriptErrorsFrame_OnError(catch, false)
end
@@ -1041,7 +1040,12 @@ end
--DATABASE CONVERSIONS
function E:DBConversions()
-- Add conversions here
--Vendor Greys option is now in bags table
if E.db.general.vendorGrays then
E.db.bags.vendorGrays.enable = E.db.general.vendorGrays
E.db.general.vendorGrays = nil
E.db.general.vendorGraysDetails = nil
end
end
local CPU_USAGE = {}
@@ -1060,8 +1064,8 @@ local function CompareCPUDiff(showall, module, minCalls)
end
newUsage, calls = GetFunctionCPUUsage(mod[newFunc], true)
differance = newUsage - oldUsage
if showall and calls > minCalls then
E:Print(calls, name, differance)
if showall and (calls > minCalls) then
E:Print('Name('..name..') Calls('..calls..') Diff('..(differance > 0 and format("%.3f", differance) or 0)..')')
end
if (differance > greatestDiff) and calls > minCalls then
greatestName, greatestUsage, greatestCalls, greatestDiff = name, newUsage, calls, differance
@@ -1070,10 +1074,12 @@ local function CompareCPUDiff(showall, module, minCalls)
end
if greatestName then
E:Print(greatestName .. " had the CPU usage difference of: " .. greatestUsage .. "ms. And has been called " .. greatestCalls .. " times.")
E:Print(greatestName.. " had the CPU usage difference of: "..(greatestUsage > 0 and format("%.3f", greatestUsage) or 0).."ms. And has been called ".. greatestCalls.." times.")
else
E:Print("CPU Usage: No CPU Usage differences found.")
end
twipe(CPU_USAGE)
end
function E:GetTopCPUFunc(msg)
@@ -1085,6 +1091,7 @@ function E:GetTopCPUFunc(msg)
E:Print("cpuusage: module (arg1) is required! This can be set as 'all' too.")
return
end
local module, showall, delay, minCalls = msg:match("^(%S+)%s*(%S*)%s*(%S*)%s*(.*)$")
local checkCore, mod = (not module or module == "") and "E"
@@ -1094,25 +1101,33 @@ function E:GetTopCPUFunc(msg)
twipe(CPU_USAGE)
if module == "all" then
for _, registeredModule in pairs(self["RegisteredModules"]) do
mod = self:GetModule(registeredModule, true) or self
for name in pairs(mod) do
if type(mod[name]) == "function" and name ~= "GetModule" then
CPU_USAGE[registeredModule .. ":" .. name] = GetFunctionCPUUsage(mod[name], true)
for moduName, modu in pairs(self.modules) do
for funcName, func in pairs(modu) do
if (funcName ~= "GetModule") and (type(func) == "function") then
CPU_USAGE[moduName..":"..funcName] = GetFunctionCPUUsage(func, true)
end
end
end
else
mod = self:GetModule(module, true) or self
for name in pairs(mod) do
if type(mod[name]) == "function" and name ~= "GetModule" then
CPU_USAGE[module .. ":" .. name] = GetFunctionCPUUsage(mod[name], true)
if not checkCore then
mod = self:GetModule(module, true)
if not mod then
self:Print(module.." not found, falling back to checking core.")
mod, checkCore = self, "E"
end
else
mod = self
end
for name, func in pairs(mod) do
if (name ~= "GetModule") and type(func) == "function" then
CPU_USAGE[(checkCore or module)..":"..name] = GetFunctionCPUUsage(func, true)
end
end
end
self:Delay(delay, CompareCPUDiff, showall, module, minCalls)
self:Print("Calculating CPU Usage differences (module: " .. (module or "?") .. ", showall: " .. tostring(showall) .. ", minCalls: " .. tostring(minCalls) .. ", delay: " .. tostring(delay) .. ")")
self:Print("Calculating CPU Usage differences (module: "..(checkCore or module)..", showall: "..tostring(showall)..", minCalls: "..tostring(minCalls)..", delay: "..tostring(delay)..")")
end
function E:Initialize()
@@ -1126,7 +1141,6 @@ function E:Initialize()
self.data.RegisterCallback(self, "OnProfileChanged", "UpdateAll")
self.data.RegisterCallback(self, "OnProfileCopied", "UpdateAll")
self.data.RegisterCallback(self, "OnProfileReset", "OnProfileReset")
self.charSettings = LibStub("AceDB-3.0"):New("ElvPrivateDB", self.privateVars)
self.private = self.charSettings.profile
self.db = self.data.profile
@@ -1137,9 +1151,9 @@ function E:Initialize()
-- self:ScheduleTimer("CheckRole", 0.01)
self:UIScale("PLAYER_LOGIN")
self:LoadCommands()
self:InitializeModules()
self:LoadMovers()
self:LoadCommands() --Load Commands
self:InitializeModules() --Load Modules
self:LoadMovers() --Load Movers
self:UpdateCooldownSettings("all")
self.initialized = true
+80 -39
View File
@@ -6,7 +6,7 @@ local LibBase64 = LibStub("LibBase64-1.0");
--Cache global variables
--Lua functions
local tonumber, type, pcall, loadstring = tonumber, type, pcall, loadstring
local len, format, split, find = string.len, string.format, string.split, string.find
local len, format, gsub, split, find = string.len, string.format, string.gsub, string.split, string.find
--WoW API / Variables
local CreateFrame = CreateFrame
local GetNumRaidMembers, UnitInRaid = GetNumRaidMembers, UnitInRaid
@@ -85,19 +85,17 @@ function D:Distribute(target, otherServer, isGlobal)
end
function D:CHAT_MSG_ADDON()
local prefix, message, sender = arg1, arg2, arg4
if not Downloads[sender] then return end
if --[[prefix ~= TRANSFER_PREFIX or --]] not Downloads[sender] then return end
local cur = len(arg2)
local max = Downloads[arg4].length
Downloads[arg4].current = Downloads[arg4].current + cur
local cur = len(message)
local max = Downloads[sender].length
Downloads[sender].current = Downloads[sender].current + cur
if Downloads[sender].current > max then
Downloads[sender].current = max
if Downloads[arg4].current > max then
Downloads[arg4].current = max
end
self.statusBar:SetValue(Downloads[sender].current)
self.statusBar:SetValue(Downloads[arg4].current)
end
function D:OnCommReceived(prefix, msg, dist, sender)
@@ -237,6 +235,61 @@ function D:OnCommReceived(prefix, msg, dist, sender)
end
end
--Keys that should not be exported
local blacklistedKeys = {
["profile"] = {
["actionbar"] = {
--[[
["bar1"] = {
["paging"] = true,
},
["bar2"] = {
["paging"] = true,
},
["bar3"] = {
["paging"] = true,
},
["bar4"] = {
["paging"] = true,
},
["bar5"] = {
["paging"] = true,
},
["bar6"] = {
["paging"] = true,
},
["bar7"] = {
["paging"] = true,
},
["bar8"] = {
["paging"] = true,
},
["bar9"] = {
["paging"] = true,
},
["bar10"] = {
["paging"] = true,
},
--]]
}
},
["private"] = {},
["global"] = {
["uiScale"] = true,
["general"] = {
["autoScale"] = true,
["minUiScale"] = true,
["eyefinity"] = true,
},
["chat"] = {
["classColorMentionExcludedNames"] = true
},
["unitframe"] = {
["spellRangeCheck"] = true
}
}
}
local function GetProfileData(profileType)
if not profileType or type(profileType) ~= "string" then
E:Print("Bad argument #1 to 'GetProfileData' (string expected)")
@@ -257,44 +310,35 @@ local function GetProfileData(profileType)
--This makes the table huge, and will cause the WoW client to lock up for several seconds.
--We compare against the default table and remove all duplicates from our table. The table is now much smaller.
profileData = E:RemoveTableDuplicates(profileData, P)
profileData = E:FilterTableFromBlacklist(profileData, blacklistedKeys.profile)
elseif profileType == "private" then
local privateProfileKey = E.myname.." - "..E.myrealm
profileKey = "private"
profileData = E:CopyTable(profileData, ElvPrivateDB.profiles[privateProfileKey])
profileData = E:RemoveTableDuplicates(profileData, V)
profileData = E:FilterTableFromBlacklist(profileData, blacklistedKeys.private)
elseif profileType == "global" then
profileKey = "global"
profileData = E:CopyTable(profileData, ElvDB.global)
profileData = E:RemoveTableDuplicates(profileData, G)
elseif profileType == "filtersNP" then
profileKey = "filtersNP"
profileData = E:FilterTableFromBlacklist(profileData, blacklistedKeys.global)
elseif profileType == "filters" then
profileKey = "filters"
profileData["nameplates"] = {}
profileData["nameplates"]["filter"] = {}
profileData["nameplates"]["filter"] = E:CopyTable(profileData["nameplates"]["filter"], ElvDB.global.nameplates.filter)
profileData.unitframe = {}
profileData.unitframe.aurafilters = {}
profileData.unitframe.aurafilters = E:CopyTable(profileData.unitframe.aurafilters, ElvDB.global.unitframe.aurafilters)
profileData.unitframe.buffwatch = {}
profileData.unitframe.buffwatch = E:CopyTable(profileData.unitframe.buffwatch, ElvDB.global.unitframe.buffwatch)
profileData = E:RemoveTableDuplicates(profileData, G)
elseif profileType == "filtersUF" then
profileKey = "filtersUF"
elseif profileType == "styleFilters" then
profileKey = "styleFilters"
profileData["unitframe"] = {}
profileData["unitframe"]["aurafilters"] = {}
profileData["unitframe"]["aurafilters"] = E:CopyTable(profileData["unitframe"]["aurafilters"], ElvDB.global.unitframe.aurafilters)
profileData["unitframe"]["buffwatch"] = {}
profileData["unitframe"]["buffwatch"] = E:CopyTable(profileData["unitframe"]["buffwatch"], ElvDB.global.unitframe.buffwatch)
profileData = E:RemoveTableDuplicates(profileData, G)
elseif profileType == "filtersAll" then
profileKey = "filtersAll"
profileData["nameplates"] = {}
profileData["nameplates"]["filter"] = {}
profileData["nameplates"]["filter"] = E:CopyTable(profileData["nameplates"]["filter"], ElvDB.global.nameplates.filter)
profileData["unitframe"] = {}
profileData["unitframe"]["aurafilters"] = {}
profileData["unitframe"]["aurafilters"] = E:CopyTable(profileData["unitframe"]["aurafilters"], ElvDB.global.unitframe.aurafilters)
profileData["unitframe"]["buffwatch"] = {}
profileData["unitframe"]["buffwatch"] = E:CopyTable(profileData["unitframe"]["buffwatch"], ElvDB.global.unitframe.buffwatch)
profileData.nameplates = {}
profileData.nameplates.filters = {}
profileData.nameplates.filters = E:CopyTable(profileData.nameplates.filters, ElvDB.global.nameplates.filters)
profileData = E:RemoveTableDuplicates(profileData, G)
end
@@ -443,13 +487,10 @@ local function SetImportedProfile(profileType, profileKey, profileData, force)
elseif profileType == "global" then
E:CopyTable(ElvDB.global, profileData)
E:StaticPopup_Show("IMPORT_RL")
elseif profileType == "filtersNP" then
E:CopyTable(ElvDB.global.nameplates, profileData.nameplates)
elseif profileType == "filtersUF" then
elseif profileType == "filters" then
E:CopyTable(ElvDB.global.unitframe, profileData.unitframe)
elseif profileType == "filtersAll" then
elseif profileType == "styleFilters" then
E:CopyTable(ElvDB.global.nameplates, profileData.nameplates)
E:CopyTable(ElvDB.global.unitframe, profileData.unitframe)
end
--Update all ElvUI modules
+38 -45
View File
@@ -1,9 +1,6 @@
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local LSM = LibStub("LibSharedMedia-3.0");
--Cache global variables
--Lua functions
--WoW API / Variables
local SetCVar = SetCVar
@@ -18,9 +15,9 @@ local function SetFont(obj, font, size, style, r, g, b, sr, sg, sb, sox, soy)
end
function E:UpdateBlizzardFonts()
local NORMAL = self["media"].normFont
local NORMAL = self.media.normFont
local COMBAT = LSM:Fetch("font", self.private.general.dmgfont)
local NUMBER = self["media"].normFont
local NUMBER = self.media.normFont
local NAMEFONT = LSM:Fetch("font", self.private.general.namefont)
local MONOCHROME = ""
@@ -42,49 +39,45 @@ function E:UpdateBlizzardFonts()
InterfaceOptionsCombatTextPanelPeriodicDamage:Hide()
InterfaceOptionsCombatTextPanelPetDamage:Hide()
InterfaceOptionsCombatTextPanelHealing:Hide()
SetCVar("CombatLogPeriodicSpells",0)
SetCVar("PetMeleeDamage",0)
SetCVar("CombatDamage",0)
SetCVar("CombatHealing",0)
SetCVar("CombatLogPeriodicSpells", 0)
SetCVar("PetMeleeDamage", 0)
SetCVar("CombatDamage", 0)
SetCVar("CombatHealing", 0)
-- set an invisible font for xp, honor kill, etc
local INVISIBLE = "Interface\\Addons\\ElvUI\\Media\\Fonts\\Invisible.ttf"
local INVISIBLE = [[Interface\Addons\ElvUI\media\fonts\Invisible.ttf]]
COMBAT = INVISIBLE
end
if(self.private.general.replaceBlizzFonts) then
SetFont(SystemFont, NORMAL, self.db.general.fontSize);
SetFont(GameFontNormal, NORMAL, self.db.general.fontSize);
SetFont(GameFontNormalSmall, NORMAL, self.db.general.fontSize);
SetFont(GameFontNormalLarge, NORMAL, self.db.general.fontSize);
SetFont(GameFontNormalHuge, NORMAL, 25, MONOCHROME .. "OUTLINE");
-- SetFont(BossEmoteNormalHuge, NORMAL, 25, MONOCHROME .. "OUTLINE");
SetFont(GameFontBlack, NORMAL, self.db.general.fontSize);
SetFont(NumberFontNormal, NUMBER, self.db.general.fontSize, MONOCHROME .. "OUTLINE");
SetFont(NumberFontNormalSmall, NUMBER, self.db.general.fontSize);
SetFont(NumberFontNormalLarge, NUMBER, self.db.general.fontSize);
SetFont(NumberFontNormalHuge, NUMBER, self.db.general.fontSize);
SetFont(ChatFontNormal, NORMAL, self.db.general.fontSize);
SetFont(ChatFontSmall, NORMAL, self.db.general.fontSize);
SetFont(QuestTitleFont, NORMAL, self.db.general.fontSize + 8);
SetFont(QuestFont, NORMAL, self.db.general.fontSize);
SetFont(QuestFontHighlight, NORMAL, self.db.general.fontSize);
SetFont(ItemTextFontNormal, NORMAL, self.db.general.fontSize);
SetFont(ItemTextFontNormal, NORMAL, self.db.general.fontSize);
SetFont(MailTextFontNormal, NORMAL, self.db.general.fontSize);
SetFont(SubSpellFont, NORMAL, self.db.general.fontSize);
SetFont(DialogButtonNormalText, NORMAL, self.db.general.fontSize);
SetFont(ZoneTextFont, NORMAL, 32, MONOCHROME .. "OUTLINE");
SetFont(SubZoneTextFont, NORMAL, 25, MONOCHROME .. "OUTLINE");
SetFont(PVPInfoTextFont, NORMAL, 22, MONOCHROME .. "OUTLINE");
SetFont(TextStatusBarText, NORMAL, self.db.general.fontSize);
SetFont(TextStatusBarTextSmall, NORMAL, self.db.general.fontSize);
-- SetFont(GameTooltipText, NORMAL, self.db.general.fontSize);
-- SetFont(GameTooltipTextSmall, NORMAL, self.db.general.fontSize);
-- SetFont(GameTooltipHeaderText, NORMAL, self.db.general.fontSize);
SetFont(WorldMapTextFont, NORMAL, 32, MONOCHROME .. "OUTLINE");
SetFont(InvoiceTextFontNormal, NORMAL, self.db.general.fontSize);
SetFont(InvoiceTextFontSmall, NORMAL, self.db.general.fontSize);
SetFont(CombatTextFont, COMBAT, 25, MONOCHROME .. "OUTLINE");
if self.private.general.replaceBlizzFonts then
SetFont(SystemFont, NORMAL, self.db.general.fontSize)
SetFont(GameFontNormal, NORMAL, self.db.general.fontSize)
SetFont(GameFontNormalSmall, NORMAL, self.db.general.fontSize)
SetFont(GameFontNormalLarge, NORMAL, self.db.general.fontSize)
SetFont(GameFontNormalHuge, NORMAL, 25, MONOCHROME.."OUTLINE")
SetFont(BossEmoteNormalHuge, NORMAL, 25, MONOCHROME.."OUTLINE")
SetFont(GameFontBlack, NORMAL, self.db.general.fontSize)
SetFont(NumberFontNormal, NUMBER, self.db.general.fontSize, MONOCHROME.."OUTLINE")
SetFont(NumberFontNormalSmall, NUMBER, self.db.general.fontSize)
SetFont(NumberFontNormalLarge, NUMBER, self.db.general.fontSize)
SetFont(NumberFontNormalHuge, NUMBER, self.db.general.fontSize)
SetFont(ChatFontNormal, NORMAL, self.db.general.fontSize)
SetFont(ChatFontSmall, NORMAL, self.db.general.fontSize)
SetFont(QuestTitleFont, NORMAL, self.db.general.fontSize + 8)
SetFont(QuestFont, NORMAL, self.db.general.fontSize)
SetFont(QuestFontHighlight, NORMAL, self.db.general.fontSize)
SetFont(ItemTextFontNormal, NORMAL, self.db.general.fontSize)
SetFont(ItemTextFontNormal, NORMAL, self.db.general.fontSize)
SetFont(MailTextFontNormal, NORMAL, self.db.general.fontSize)
SetFont(SubSpellFont, NORMAL, self.db.general.fontSize)
SetFont(DialogButtonNormalText, NORMAL, self.db.general.fontSize)
SetFont(ZoneTextFont, NORMAL, 32, MONOCHROME.."OUTLINE")
SetFont(SubZoneTextFont, NORMAL, 24, MONOCHROME.."OUTLINE")
SetFont(PVPInfoTextFont, NORMAL, 22, MONOCHROME.."OUTLINE")
SetFont(TextStatusBarText, NORMAL, self.db.general.fontSize)
SetFont(TextStatusBarTextSmall, NORMAL, self.db.general.fontSize)
SetFont(InvoiceTextFontNormal, NORMAL, self.db.general.fontSize)
SetFont(InvoiceTextFontSmall, NORMAL, self.db.general.fontSize)
SetFont(CombatTextFont, COMBAT, 25, MONOCHROME.."OUTLINE")
end
end
end
+91 -56
View File
@@ -5,45 +5,44 @@ local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, Profi
local _G = _G
local format = string.format
--WoW API / Variables
local ChangeChatColor = ChangeChatColor
local ChatFrame_ActivateCombatMessages = ChatFrame_ActivateCombatMessages
local ChatFrame_AddChannel = ChatFrame_AddChannel
local ChatFrame_AddMessageGroup = ChatFrame_AddMessageGroup
local ChatFrame_RemoveAllMessageGroups = ChatFrame_RemoveAllMessageGroups
local ChatFrame_RemoveChannel = ChatFrame_RemoveChannel
local CreateFrame = CreateFrame
local FCF_DockFrame, FCF_UnDockFrame = FCF_DockFrame, FCF_UnDockFrame
local FCF_OpenNewWindow = FCF_OpenNewWindow
local FCF_SetChatWindowFontSize = FCF_SetChatWindowFontSize
local FCF_SetLocked = FCF_SetLocked
local FCF_SetWindowName = FCF_SetWindowName
local GetScreenWidth = GetScreenWidth
local IsAddOnLoaded = IsAddOnLoaded
local GetScreenWidth = GetScreenWidth
local SetCVar = SetCVar
local PlaySoundFile = PlaySoundFile
local ReloadUI = ReloadUI
local SetCVar = SetCVar
local UIFrameFadeOut = UIFrameFadeOut
local RAID_CLASS_COLORS = RAID_CLASS_COLORS
local CUSTOM_CLASS_COLORS = CUSTOM_CLASS_COLORS
local CHAT_LABEL, CLASS, CONTINUE, PREV = CHAT_LABEL, CLASS, CONTINUE, PREV
local GUILD_EVENT_LOG = GUILD_EVENT_LOG
local LOOT, GENERAL, TRADE = LOOT, GENERAL, TRADE
local ChatFrame_AddMessageGroup = ChatFrame_AddMessageGroup
local ChatFrame_RemoveAllMessageGroups = ChatFrame_RemoveAllMessageGroups
local ChatFrame_AddChannel = ChatFrame_AddChannel
local ChatFrame_RemoveChannel = ChatFrame_RemoveChannel
local ChangeChatColor = ChangeChatColor
local FCF_ResetChatWindows = FCF_ResetChatWindows
local FCF_SetLocked = FCF_SetLocked
local FCF_DockFrame, FCF_UnDockFrame = FCF_DockFrame, FCF_UnDockFrame
local FCF_OpenNewWindow = FCF_OpenNewWindow
local FCF_SetWindowName = FCF_SetWindowName
local FCF_StopDragging = FCF_StopDragging
local FCF_SetChatWindowFontSize = FCF_SetChatWindowFontSize
local CLASS, CHAT_LABEL, CONTINUE, PREVIOUS = CLASS, CHAT_LABEL, CONTINUE, PREVIOUS
local NUM_CHAT_WINDOWS = NUM_CHAT_WINDOWS
local LOOT, GENERAL, TRADE = LOOT, GENERAL, TRADE
local GUILD_EVENT_LOG = GUILD_EVENT_LOG
local RAID_CLASS_COLORS = RAID_CLASS_COLORS
local CURRENT_PAGE = 0
local MAX_PAGE = 8
local function FCF_ResetChatWindows()
ChatFrame1:ClearAllPoints()
E:Point(ChatFrame1, "BOTTOMLEFT", "UIParent", "BOTTOMLEFT", 32, 95)
E:Size(ChatFrame1, 430, 120)
ChatFrame1:SetPoint("BOTTOMLEFT", "UIParent", "BOTTOMLEFT", 32, 95)
ChatFrame1:SetWidth(430)
ChatFrame1:SetHeight(120)
ChatFrame1.isInitialized = 0
FCF_SetButtonSide(ChatFrame1, "left")
FCF_SetChatWindowFontSize(ChatFrame1, 14)
FCF_SetWindowName(ChatFrame1, GENERAL)
FCF_SetWindowColor(ChatFrame1, DEFAULT_CHATFRAME_COLOR.r, DEFAULT_CHATFRAME_COLOR.g, DEFAULT_CHATFRAME_COLOR.b)
FCF_SetWindowName(ChatFrame1, DEFAULT_CHATFRAME_COLOR.r, DEFAULT_CHATFRAME_COLOR.g, DEFAULT_CHATFRAME_COLOR.b)
FCF_SetWindowAlpha(ChatFrame1, DEFAULT_CHATFRAME_ALPHA)
FCF_UnDockFrame(ChatFrame1)
FCF_ValidateChatFramePosition(ChatFrame1)
@@ -169,9 +168,6 @@ local function SetupChat()
ChatFrame_AddMessageGroup(ChatFrame1, "DND")
ChatFrame_AddMessageGroup(ChatFrame1, "IGNORED")
ChatFrame_AddMessageGroup(ChatFrame1, "CHANNEL")
ChatFrame_ActivateCombatMessages(ChatFrame2)
ChatFrame_AddChannel(ChatFrame1, GENERAL)
ChatFrame_RemoveMessageGroup(ChatFrame1, "SKILL")
ChatFrame_RemoveMessageGroup(ChatFrame1, "LOOT")
@@ -179,6 +175,8 @@ local function SetupChat()
ChatFrame_RemoveMessageGroup(ChatFrame1, "COMBAT_FACTION_CHANGE")
ChatFrame_RemoveChannel(ChatFrame1, TRADE)
ChatFrame_ActivateCombatMessages(ChatFrame2)
ChatFrame_RemoveAllMessageGroups(ChatFrame3)
ChatFrame_AddMessageGroup(ChatFrame3, "SKILL")
ChatFrame_AddMessageGroup(ChatFrame3, "LOOT")
@@ -198,11 +196,11 @@ local function SetupChat()
if E.Chat then
E.Chat:PositionChat(true)
if E.db["RightChatPanelFaded"] then
if E.db.RightChatPanelFaded then
RightChatToggleButton:Click()
end
if E.db["LeftChatPanelFaded"] then
if E.db.LeftChatPanelFaded then
LeftChatToggleButton:Click()
end
end
@@ -235,7 +233,6 @@ function E:SetupTheme(theme, noDisplayMsg)
E.db.general.bordercolor = (E.PixelMode and E:GetColor(0, 0, 0) or E:GetColor(.31, .31, .31))
E.db.general.backdropcolor = E:GetColor(.1, .1, .1)
E.db.general.backdropfadecolor = E:GetColor(.06, .06, .06, .8)
E.db.unitframe.colors.borderColor = (E.PixelMode and E:GetColor(0, 0, 0) or E:GetColor(.31, .31, .31))
E.db.unitframe.colors.healthclass = false
E.db.unitframe.colors.health = E:GetColor(.31, .31, .31)
@@ -291,6 +288,8 @@ function E:SetupResolution(noDataReset)
if not noDataReset then
E.db.chat.panelWidth = 400
E.db.chat.panelHeight = 180
E.db.chat.panelWidthRight = 400
E.db.chat.panelHeightRight = 180
E.db.bags.bagWidth = 394
E.db.bags.bankWidth = 394
@@ -331,6 +330,9 @@ function E:SetupResolution(noDataReset)
E.db.unitframe.units.targettarget.power.enable = false
E.db.unitframe.units.targettarget.width = 200
E.db.unitframe.units.targettarget.height = 26
E.db.unitframe.units.arena.width = 200
E.db.unitframe.units.arena.castbar.width = 200
end
local isPixel = E.private.general.pixelPerfect
@@ -409,16 +411,11 @@ function E:SetupLayout(layout, noDataReset)
E.db.unitframe.units.raid.debuffs.xOffset = -4
E.db.unitframe.units.raid.debuffs.yOffset = -7
E.db.unitframe.units.raid.height = 45
E.db.unitframe.units.raid.buffs.noConsolidated = false
E.db.unitframe.units.raid.buffs.xOffset = 50
E.db.unitframe.units.raid.buffs.yOffset = -6
E.db.unitframe.units.raid.buffs.clickThrough = true
E.db.unitframe.units.raid.buffs.noDuration = false
E.db.unitframe.units.raid.buffs.playerOnly = false
E.db.unitframe.units.raid.buffs.perrow = 1
E.db.unitframe.units.raid.buffs.useFilter = "TurtleBuffs"
E.db.unitframe.units.raid.buffs.sizeOverride = 22
E.db.unitframe.units.raid.buffs.useBlacklist = false
E.db.unitframe.units.raid.buffs.enable = true
E.db.unitframe.units.raid.growthDirection = "LEFT_UP"
@@ -431,18 +428,12 @@ function E:SetupLayout(layout, noDataReset)
E.db.unitframe.units.party.debuffs.xOffset = -4
E.db.unitframe.units.party.debuffs.yOffset = -7
E.db.unitframe.units.party.height = 45
E.db.unitframe.units.party.buffs.noConsolidated = false
E.db.unitframe.units.party.buffs.xOffset = 50
E.db.unitframe.units.party.buffs.yOffset = -6
E.db.unitframe.units.party.buffs.clickThrough = true
E.db.unitframe.units.party.buffs.noDuration = false
E.db.unitframe.units.party.buffs.playerOnly = false
E.db.unitframe.units.party.buffs.perrow = 1
E.db.unitframe.units.party.buffs.useFilter = "TurtleBuffs"
E.db.unitframe.units.party.buffs.sizeOverride = 22
E.db.unitframe.units.party.buffs.useBlacklist = false
E.db.unitframe.units.party.buffs.enable = true
E.db.unitframe.units.party.roleIcon.position = "BOTTOMRIGHT"
E.db.unitframe.units.party.health.text_format = "[healthcolor][health:deficit]"
E.db.unitframe.units.party.health.position = "BOTTOM"
E.db.unitframe.units.party.GPSArrow.size = 40
@@ -452,16 +443,16 @@ function E:SetupLayout(layout, noDataReset)
E.db.unitframe.units.party.name.position = "TOP"
E.db.unitframe.units.party.power.text_format = ""
-- E.db.unitframe.units.raid40.height = 30
-- E.db.unitframe.units.raid40.growthDirection = "LEFT_UP"
E.db.unitframe.units.raid40.height = 30
E.db.unitframe.units.raid40.growthDirection = "LEFT_UP"
E.db.unitframe.units.party.health.frequentUpdates = true
E.db.unitframe.units.raid.health.frequentUpdates = true
-- E.db.unitframe.units.raid40.health.frequentUpdates = true
E.db.unitframe.units.raid40.health.frequentUpdates = true
E.db.unitframe.units.party.healPrediction = true
E.db.unitframe.units.raid.healPrediction = true
-- E.db.unitframe.units.raid40.healPrediction = true
E.db.unitframe.units.raid40.healPrediction = true
E.db.unitframe.units.player.castbar.insideInfoPanel = false
E.db.actionbar.bar2.enabled = true
@@ -476,6 +467,7 @@ function E:SetupLayout(layout, noDataReset)
end
if not E.db.movers then E.db.movers = {} end
--Make sure we account for EyeFinity or other scenarious where ElvUIParent is not the same size as UIParent
local xOffset = ((GetScreenWidth() - E.diffGetLeft - E.diffGetRight) * 0.34375)
if E.PixelMode then
@@ -483,7 +475,6 @@ function E:SetupLayout(layout, noDataReset)
E.db.movers.ElvAB_5 = "BOTTOM,ElvUIParent,BOTTOM,-312,4"
E.db.movers.ElvUF_PartyMover = "BOTTOMRIGHT,ElvUIParent,BOTTOMLEFT,"..xOffset..",450"
E.db.movers.ElvUF_RaidMover = "BOTTOMRIGHT,ElvUIParent,BOTTOMLEFT,"..xOffset..",450"
E.db.movers.ElvUF_Raid40Mover = "BOTTOMRIGHT,ElvUIParent,BOTTOMLEFT,"..xOffset..",450"
if not E.db.lowresolutionset then
@@ -559,6 +550,9 @@ function E:SetupLayout(layout, noDataReset)
E.db.unitframe.units.targettarget.power.enable = false
E.db.unitframe.units.targettarget.width = 200
E.db.unitframe.units.targettarget.height = 26
E.db.unitframe.units.arena.width = 200
E.db.unitframe.units.arena.castbar.width = 200
end
if layout == "dpsCaster" or layout == "healer" or (layout == "dpsMelee" and E.myclass == "HUNTER") then
@@ -607,6 +601,7 @@ function E:SetupLayout(layout, noDataReset)
E.db.movers.ElvUF_PlayerCastbarMover = "BOTTOM,ElvUIParent,BOTTOM,-2,"..(yOffset + 5)
end
elseif (layout == "dpsMelee" or layout == "tank") and not E.db.lowresolutionset and not E.PixelMode then
if not E.db.movers then E.db.movers = {} end
E.db.movers.ElvUF_PlayerMover = "BOTTOM,ElvUIParent,BOTTOM,-307,76"
E.db.movers.ElvUF_TargetMover = "BOTTOM,ElvUIParent,BOTTOM,307,76"
E.db.movers.ElvUF_TargetTargetMover = "BOTTOM,ElvUIParent,BOTTOM,0,76"
@@ -644,7 +639,7 @@ end
local function SetupAuras(style)
local UF = E:GetModule("UnitFrames")
local frame = UF["player"]
local frame = UF.player
E:CopyTable(E.db.unitframe.units.player.buffs, P.unitframe.units.player.buffs)
E:CopyTable(E.db.unitframe.units.player.debuffs, P.unitframe.units.player.debuffs)
E:CopyTable(E.db.unitframe.units.player.aurabar, P.unitframe.units.player.aurabar)
@@ -655,11 +650,10 @@ local function SetupAuras(style)
-- UF:Configure_AuraBars(frame)
end
frame = UF["target"]
frame = UF.target
E:CopyTable(E.db.unitframe.units.target.buffs, P.unitframe.units.target.buffs)
E:CopyTable(E.db.unitframe.units.target.debuffs, P.unitframe.units.target.debuffs)
E:CopyTable(E.db.unitframe.units.target.aurabar, P.unitframe.units.target.aurabar)
E.db.unitframe.units.target.smartAuraDisplay = P.unitframe.units.target.smartAuraDisplay
if frame then
UF:Configure_Auras(frame, "Buffs")
@@ -667,18 +661,33 @@ local function SetupAuras(style)
-- UF:Configure_AuraBars(frame)
end
frame = UF.focus
E:CopyTable(E.db.unitframe.units.focus.buffs, P.unitframe.units.focus.buffs)
E:CopyTable(E.db.unitframe.units.focus.debuffs, P.unitframe.units.focus.debuffs)
E:CopyTable(E.db.unitframe.units.focus.aurabar, P.unitframe.units.focus.aurabar)
if frame then
UF:Configure_Auras(frame, "Buffs")
UF:Configure_Auras(frame, "Debuffs")
UF:Configure_AuraBars(frame)
end
if not style then
--PLAYER
E.db.unitframe.units.player.buffs.enable = true
E.db.unitframe.units.player.buffs.attachTo = "FRAME"
E.db.unitframe.units.player.buffs.noDuration = false
E.db.unitframe.units.player.debuffs.attachTo = "BUFFS"
E.db.unitframe.units.player.aurabar.enable = false
E:GetModule("UnitFrames"):CreateAndUpdateUF("player")
if E.private.unitframe.enable then
E:GetModule("UnitFrames"):CreateAndUpdateUF("player")
end
E.db.unitframe.units.target.smartAuraDisplay = "DISABLED"
--TARGET
E.db.unitframe.units.target.debuffs.enable = true
E.db.unitframe.units.target.aurabar.enable = false
E:GetModule("UnitFrames"):CreateAndUpdateUF("target")
if E.private.unitframe.enable then
E:GetModule("UnitFrames"):CreateAndUpdateUF("target")
end
end
if InstallStepComplete then
@@ -834,8 +843,12 @@ local function SetPage(PageNum)
f.Desc1:SetText(L["You are now finished with the installation process. If you are in need of technical support please visit us at https://github.com/ElvUI-Vanilla/ElvUI"])
f.Desc2:SetText(L["Please click the button below so you can setup variables and ReloadUI."])
InstallOption1Button:Show()
InstallOption1Button:SetScript("OnClick", InstallComplete)
InstallOption1Button:SetText(L["Finished"])
InstallOption1Button:SetScript("OnClick", function() E:StaticPopup_Show("ELVUI_EDITBOX", nil, nil, "https://discord.gg/Uatdmm7") end)
InstallOption1Button:SetText("Discord") -- No need for a locale
InstallOption2Button:Show()
InstallOption2Button:SetScript("OnClick", InstallComplete)
InstallOption2Button:SetText(L["Finished"])
E:Size(ElvUIInstallFrame, 550, 350)
end
end
@@ -875,6 +888,27 @@ function E:Install()
imsg.firstShow = false
imsg.bg = imsg:CreateTexture(nil, "BACKGROUND")
imsg.bg:SetTexture([[Interface\AddOns\ElvUI\media\textures\LevelUpTex]])
E:Point(imsg.bg, "BOTTOM")
E:Size(imsg.bg, 326, 103)
imsg.bg:SetTexCoord(0.00195313, 0.63867188, 0.03710938, 0.23828125)
imsg.bg:SetVertexColor(1, 1, 1, 0.6)
imsg.lineTop = imsg:CreateTexture(nil, "BACKGROUND")
imsg.lineTop:SetDrawLayer('BACKGROUND', 2)
imsg.lineTop:SetTexture([[Interface\AddOns\ElvUI\media\textures\LevelUpTex]])
E:Point(imsg.lineTop, "TOP")
E:Size(imsg.lineTop, 418, 7)
imsg.lineTop:SetTexCoord(0.00195313, 0.81835938, 0.01953125, 0.03320313)
imsg.lineBottom = imsg:CreateTexture(nil, "BACKGROUND")
imsg.lineBottom:SetDrawLayer('BACKGROUND', 2)
imsg.lineBottom:SetTexture([[Interface\AddOns\ElvUI\media\textures\LevelUpTex]])
E:Point(imsg.lineBottom, "BOTTOM")
E:Size(imsg.lineBottom, 418, 7)
imsg.lineBottom:SetTexCoord(0.00195313, 0.81835938, 0.01953125, 0.03320313)
imsg.text = imsg:CreateFontString(nil, "OVERLAY")
E:FontTemplate(imsg.text, E["media"].normFont, 32, "OUTLINE")
E:Point(imsg.text, "BOTTOM", 0, 16)
@@ -882,6 +916,7 @@ function E:Install()
imsg.text:SetJustifyH("CENTER")
end
--Create Frame
if not ElvUIInstallFrame then
local f = CreateFrame("Button", "ElvUIInstallFrame", E.UIParent)
f.SetPage = SetPage
@@ -918,7 +953,7 @@ function E:Install()
f.Status = CreateFrame("StatusBar", "InstallStatus", f)
f.Status:SetFrameLevel(f.Status:GetFrameLevel() + 2)
E:CreateBackdrop(f.Status, "Default")
f.Status:SetStatusBarTexture(E["media"].normTex)
f.Status:SetStatusBarTexture(E.media.normTex)
E:RegisterStatusBar(f.Status)
f.Status:SetMinMaxValues(0, MAX_PAGE)
E:Point(f.Status, "TOPLEFT", f.Prev, "TOPRIGHT", 6, -2)
@@ -1015,4 +1050,4 @@ function E:Install()
ElvUIInstallFrame:Show()
NextPage()
end
end
+13 -13
View File
@@ -44,7 +44,7 @@ function CP:CreateModuleConfigGroup(Name, section, pluginSection)
type = "execute",
name = L["Import Now"],
func = function()
E.PopupDialogs["MODULE_COPY_CONFIRM"].text = format(L["You are going to copy settings for |cffD3CF00\"%s\"|r from |cff4beb2c\"%s\"|r profile to your current |cff4beb2c\"%s\"|r profile. Are you sure?"], Name, E.global.profileCopy.selected, ElvDB["profileKeys"][E.myname.." - "..E.myrealm])
E.PopupDialogs["MODULE_COPY_CONFIRM"].text = format(L["You are going to copy settings for |cffD3CF00\"%s\"|r from |cff4beb2c\"%s\"|r profile to your current |cff4beb2c\"%s\"|r profile. Are you sure?"], Name, E.global.profileCopy.selected, ElvDB.profileKeys[E.myname.." - "..E.myrealm])
E.PopupDialogs["MODULE_COPY_CONFIRM"].OnAccept = function()
CP:ImportFromProfile(section, pluginSection)
end
@@ -56,7 +56,7 @@ function CP:CreateModuleConfigGroup(Name, section, pluginSection)
type = "execute",
name = L["Export Now"],
func = function()
E.PopupDialogs["MODULE_COPY_CONFIRM"].text = format(L["You are going to copy settings for |cffD3CF00\"%s\"|r from your current |cff4beb2c\"%s\"|r profile to |cff4beb2c\"%s\"|r profile. Are you sure?"], Name, ElvDB["profileKeys"][E.myname.." - "..E.myrealm], E.global.profileCopy.selected)
E.PopupDialogs["MODULE_COPY_CONFIRM"].text = format(L["You are going to copy settings for |cffD3CF00\"%s\"|r from your current |cff4beb2c\"%s\"|r profile to |cff4beb2c\"%s\"|r profile. Are you sure?"], Name, ElvDB.profileKeys[E.myname.." - "..E.myrealm], E.global.profileCopy.selected)
E.PopupDialogs["MODULE_COPY_CONFIRM"].OnAccept = function()
CP:ExportToProfile(section, pluginSection)
end
@@ -94,7 +94,7 @@ function CP:CreateMoversConfigGroup()
type = "execute",
name = L["Import Now"],
func = function()
E.PopupDialogs["MODULE_COPY_CONFIRM"].text = format(L["You are going to copy settings for |cffD3CF00\"%s\"|r from |cff4beb2c\"%s\"|r profile to your current |cff4beb2c\"%s\"|r profile. Are you sure?"], L["Movers"], E.global.profileCopy.selected, ElvDB["profileKeys"][E.myname.." - "..E.myrealm])
E.PopupDialogs["MODULE_COPY_CONFIRM"].text = format(L["You are going to copy settings for |cffD3CF00\"%s\"|r from |cff4beb2c\"%s\"|r profile to your current |cff4beb2c\"%s\"|r profile. Are you sure?"], L["Movers"], E.global.profileCopy.selected, ElvDB.profileKeys[E.myname.." - "..E.myrealm])
E.PopupDialogs["MODULE_COPY_CONFIRM"].OnAccept = function()
CP:CopyMovers("import")
end
@@ -106,7 +106,7 @@ function CP:CreateMoversConfigGroup()
type = "execute",
name = L["Export Now"],
func = function()
E.PopupDialogs["MODULE_COPY_CONFIRM"].text = format(L["You are going to copy settings for |cffD3CF00\"%s\"|r from your current |cff4beb2c\"%s\"|r profile to |cff4beb2c\"%s\"|r profile. Are you sure?"], L["Movers"], ElvDB["profileKeys"][E.myname.." - "..E.myrealm], E.global.profileCopy.selected)
E.PopupDialogs["MODULE_COPY_CONFIRM"].text = format(L["You are going to copy settings for |cffD3CF00\"%s\"|r from your current |cff4beb2c\"%s\"|r profile to |cff4beb2c\"%s\"|r profile. Are you sure?"], L["Movers"], ElvDB.profileKeys[E.myname.." - "..E.myrealm], E.global.profileCopy.selected)
E.PopupDialogs["MODULE_COPY_CONFIRM"].OnAccept = function()
CP:CopyMovers("export")
end
@@ -154,7 +154,7 @@ function CP:CopyTable(CopyFrom, CopyTo, CopyDefault, module)
E:CopyTable(CopyTo, CopyDefault)
E:CopyTable(CopyTo, CopyFrom)
elseif module[key] ~= nil then
--Making sure tables actually exist in profiles (e.g absent values in ElvDB["profiles"] are for default values)
--Making sure tables actually exist in profiles (e.g absent values in ElvDB.profiles are for default values)
CopyFrom[key], CopyTo[key] = CP:TablesExist(CopyFrom[key], CopyTo[key], CopyDefault[key])
--If key exists, then copy. If not, then clear obsolite key from the profile.
--Someone should double check this logic. Cause for single keys it is fine, but I'm no sure bout whole tables @Darth
@@ -176,7 +176,7 @@ G["profileCopy"][YourOptionGroupName] = {
...
}
* For example
G["profileCopy"]["auras"] = {
G["profileCopy"].auras = {
["general"] = true,
["buffs"] = true,
["debuffs"] = true,
@@ -205,10 +205,10 @@ function CP:ImportFromProfile(section, pluginSection)
local module = pluginSection and E.global.profileCopy[pluginSection][section] or E.global.profileCopy[section]
if not module then error(format("Provided section name \"%s\" does not have a template for profile copy.", section)) end
--Starting digging through the settings
local CopyFrom = pluginSection and ElvDB["profiles"][E.global.profileCopy.selected][pluginSection][section] or ElvDB["profiles"][E.global.profileCopy.selected][section]
local CopyFrom = pluginSection and ElvDB.profiles[E.global.profileCopy.selected][pluginSection][section] or ElvDB.profiles[E.global.profileCopy.selected][section]
local CopyTo = pluginSection and E.db[pluginSection][section] or E.db[section]
local CopyDefault = pluginSection and P[pluginSection][section] or P[section]
--Making sure tables actually exist in profiles (e.g absent values in ElvDB["profiles"] are for default values)
--Making sure tables actually exist in profiles (e.g absent values in ElvDB.profiles are for default values)
CopyFrom, CopyTo = CP:TablesExist(CopyFrom, CopyTo, CopyDefault)
if type(module) == "table" and next(module) then --This module is not an empty table
CP:CopyTable(CopyFrom, CopyTo, CopyDefault, module)
@@ -230,11 +230,11 @@ function CP:ExportToProfile(section, pluginSection)
local module = pluginSection and E.global.profileCopy[pluginSection][section] or E.global.profileCopy[section]
if not module then error(format("Provided section name \"%s\" does not have a template for profile copy.", section)) end
--Making sure tables actually exist
if not ElvDB["profiles"][E.global.profileCopy.selected][section] then ElvDB["profiles"][E.global.profileCopy.selected][section] = {} end
if not ElvDB.profiles[E.global.profileCopy.selected][section] then ElvDB.profiles[E.global.profileCopy.selected][section] = {} end
if not E.db[section] then E.db[section] = {} end
--Starting digging through the settings
local CopyFrom = pluginSection and E.db[pluginSection][section] or E.db[section]
local CopyTo = pluginSection and ElvDB["profiles"][E.global.profileCopy.selected][pluginSection][section] or ElvDB["profiles"][E.global.profileCopy.selected][section]
local CopyTo = pluginSection and ElvDB.profiles[E.global.profileCopy.selected][pluginSection][section] or ElvDB.profiles[E.global.profileCopy.selected][section]
local CopyDefault = pluginSection and P[pluginSection][section] or P[section]
if type(module) == "table" and next(module) then --This module is not an empty table
CP:CopyTable(CopyFrom, CopyTo, CopyDefault, module)
@@ -248,12 +248,12 @@ end
function CP:CopyMovers(mode)
if not E.db.movers then E.db.movers = {} end --Nothing was moved in cutrrent profile
if not ElvDB["profiles"][E.global.profileCopy.selected].movers then ElvDB["profiles"][E.global.profileCopy.selected].movers = {} end --Nothing was moved in selected profile
if not ElvDB.profiles[E.global.profileCopy.selected].movers then ElvDB.profiles[E.global.profileCopy.selected].movers = {} end --Nothing was moved in selected profile
local CopyFrom, CopyTo
if mode == "export" then
CopyFrom, CopyTo = E.db.movers, ElvDB["profiles"][E.global.profileCopy.selected].movers
CopyFrom, CopyTo = E.db.movers, ElvDB.profiles[E.global.profileCopy.selected].movers
else
CopyFrom, CopyTo = ElvDB["profiles"][E.global.profileCopy.selected].movers or {}, E.db.movers
CopyFrom, CopyTo = ElvDB.profiles[E.global.profileCopy.selected].movers or {}, E.db.movers
end
for moverName in pairs(E.CreatedMovers) do
+5 -5
View File
@@ -193,7 +193,7 @@ function PI:CreateStepComplete()
imsg.lineBottom:SetTexCoord(0.00195313, 0.81835938, 0.01953125, 0.03320313)
imsg.text = imsg:CreateFontString(nil, "ARTWORK")
E:FontTemplate(imsg.text, E["media"].normFont, 32, "OUTLINE")
E:FontTemplate(imsg.text, E.media.normFont, 32, "OUTLINE")
E:Point(imsg.text, "BOTTOM", 0, 12)
imsg.text:SetTextColor(1, 0.82, 0)
imsg.text:SetJustifyH("CENTER")
@@ -234,8 +234,8 @@ function PI:CreateFrame()
f.Status = CreateFrame("StatusBar", "PluginInstallStatus", f)
f.Status:SetFrameLevel(f.Status:GetFrameLevel() + 2)
E:CreateBackdrop(f.Status, "Default", true)
f.Status:SetStatusBarTexture(E["media"].normTex)
f.Status:SetStatusBarColor(unpack(E["media"].rgbvaluecolor))
f.Status:SetStatusBarTexture(E.media.normTex)
f.Status:SetStatusBarColor(unpack(E.media.rgbvaluecolor))
E:Point(f.Status, "TOPLEFT", f.Prev, "TOPRIGHT", 6, -2)
E:Point(f.Status, "BOTTOMRIGHT", f.Next, "BOTTOMLEFT", -6, 2)
-- Setup StatusBar Animation
@@ -355,7 +355,7 @@ function PI:CreateFrame()
E:Width(f.side, 140)
f.side.text = f.side:CreateFontString(nil, "OVERLAY")
E:Point(f.side.text, "TOP", f.side, "TOP", 0, -4)
f.side.text:SetFont(E["media"].normFont, 18, "OUTLINE")
f.side.text:SetFont(E.media.normFont, 18, "OUTLINE")
f.side.text:SetText(L["Steps"])
f.side.Lines = {} --Table to keep shown lines
f.side:Hide()
@@ -370,7 +370,7 @@ function PI:CreateFrame()
button.text = button:CreateFontString(nil, "OVERLAY")
E:Point(button.text, "TOPLEFT", button, "TOPLEFT", 2, -2)
E:Point(button.text, "BOTTOMRIGHT", button, "BOTTOMRIGHT", -2, 2)
button.text:SetFont(E["media"].normFont, 14, "OUTLINE")
button.text:SetFont(E.media.normFont, 14, "OUTLINE")
button:SetScript("OnClick", function() if i <= f.MaxPage then SetPage(i, f.CurrentPage) end end)
button.text:SetText("")
f.side.Lines[i] = button