mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 08:24:44 +00:00
big update
This commit is contained in:
+12
-13
@@ -204,7 +204,6 @@ function CC:PLAYER_ENTERING_WORLD()
|
||||
self:UnregisterEvent("PARTY_MEMBERS_CHANGED")
|
||||
self:UnregisterEvent("RAID_ROSTER_UPDATE")
|
||||
|
||||
|
||||
self:RegisterEvent("UPDATE_BATTLEFIELD_SCORE")
|
||||
|
||||
if self.onBattleground then
|
||||
@@ -246,13 +245,13 @@ function CC:PLAYER_GUILD_UPDATE()
|
||||
end
|
||||
|
||||
function CC:FRIENDLIST_UPDATE()
|
||||
local name, classLocalized, _
|
||||
local name, class, _
|
||||
|
||||
for i = 1, GetNumFriends() do
|
||||
name, _, classLocalized = GetFriendInfo(i)
|
||||
name, _, class = GetFriendInfo(i)
|
||||
|
||||
if classLocalized then
|
||||
self:CachePlayer(name, GetEnglishClassName(classLocalized))
|
||||
if class then
|
||||
self:CachePlayer(name, GetEnglishClassName(class))
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -260,13 +259,13 @@ end
|
||||
function CC:GUILD_ROSTER_UPDATE(_, update)
|
||||
if not update then return end
|
||||
|
||||
local name, classLocalized, _
|
||||
local name, class, _
|
||||
|
||||
for i = 1, GetNumGuildMembers() do
|
||||
name, _, _, _, _, classLocalized = GetGuildRosterInfo(i)
|
||||
name, _, _, _, class = GetGuildRosterInfo(i)
|
||||
|
||||
if classLocalized then
|
||||
self:CachePlayer(name, GetEnglishClassName(classLocalized))
|
||||
if class then
|
||||
self:CachePlayer(name, GetEnglishClassName(class))
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -345,14 +344,14 @@ function CC:UPDATE_BATTLEFIELD_SCORE()
|
||||
return
|
||||
end
|
||||
|
||||
local name, realm, classLocalized, _
|
||||
local name, realm, class, _
|
||||
|
||||
for i = 1, numPlayers do
|
||||
name, _, _, _, _, _, _, _, classLocalized = GetBattlefieldScore(i)
|
||||
name, _, _, _, _, _, _, _, class = GetBattlefieldScore(i)
|
||||
|
||||
if name and classLocalized then
|
||||
if name and class then
|
||||
name, realm = split("-", name)
|
||||
self:CachePlayer(name, GetEnglishClassName(classLocalized), realm)
|
||||
self:CachePlayer(name, GetEnglishClassName(class), realm)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -71,15 +71,14 @@ function E:FarmMode(msg)
|
||||
end
|
||||
|
||||
function E:Grid(msg)
|
||||
if msg and type(tonumber(msg)) == "number" and tonumber(msg) <= 256 and tonumber(msg) >= 4 then
|
||||
msg = msg and tonumber(msg)
|
||||
if type(msg) == "number" and (msg <= 256 and msg >= 4) then
|
||||
E.db.gridSize = msg
|
||||
E:Grid_Show()
|
||||
elseif _G.ElvUIGrid and _G.ElvUIGrid:IsShown() then
|
||||
E:Grid_Hide()
|
||||
else
|
||||
if EGrid then
|
||||
E:Grid_Hide()
|
||||
else
|
||||
E:Grid_Show()
|
||||
end
|
||||
E:Grid_Show()
|
||||
end
|
||||
end
|
||||
|
||||
@@ -91,10 +90,10 @@ function E:LuaError(msg)
|
||||
EnableAddOn("!DebugTools")
|
||||
EnableAddOn("ElvUI")
|
||||
EnableAddOn("ElvUI_Config")
|
||||
SetCVar("ShowErrors", "1")
|
||||
SetCVar("ShowErrors", 1)
|
||||
ReloadUI()
|
||||
elseif msg == "off" then
|
||||
SetCVar("ShowErrors", "0")
|
||||
SetCVar("ShowErrors", 0)
|
||||
E:Print("Lua errors off.")
|
||||
else
|
||||
E:Print("/luaerror on - /luaerror off")
|
||||
|
||||
@@ -54,14 +54,7 @@ function E:ToggleConfigMode(override, configType)
|
||||
if override ~= nil and override ~= "" then E.ConfigurationMode = override end
|
||||
|
||||
if E.ConfigurationMode ~= true then
|
||||
if not grid then
|
||||
E:Grid_Create()
|
||||
elseif grid.boxSize ~= E.db.gridSize then
|
||||
grid:Hide()
|
||||
E:Grid_Create()
|
||||
else
|
||||
grid:Show()
|
||||
end
|
||||
E:Grid_Show()
|
||||
|
||||
if not ElvUIMoverPopupWindow then
|
||||
E:CreateMoverPopup()
|
||||
@@ -75,14 +68,12 @@ function E:ToggleConfigMode(override, configType)
|
||||
|
||||
E.ConfigurationMode = true
|
||||
else
|
||||
E:Grid_Hide()
|
||||
|
||||
if ElvUIMoverPopupWindow then
|
||||
ElvUIMoverPopupWindow:Hide()
|
||||
end
|
||||
|
||||
if grid then
|
||||
grid:Hide()
|
||||
end
|
||||
|
||||
E.ConfigurationMode = false
|
||||
end
|
||||
|
||||
@@ -93,8 +84,35 @@ function E:ToggleConfigMode(override, configType)
|
||||
self:ToggleMovers(E.ConfigurationMode, configType or "ALL")
|
||||
end
|
||||
|
||||
function E:Grid_GetRegion()
|
||||
if grid then
|
||||
if grid.regionCount and grid.regionCount > 0 then
|
||||
local line = select(grid.regionCount, grid:GetRegions())
|
||||
grid.regionCount = grid.regionCount - 1
|
||||
line:SetAlpha(1)
|
||||
return line
|
||||
else
|
||||
return grid:CreateTexture()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function E:Grid_Create()
|
||||
grid = CreateFrame("Frame", "EGrid", UIParent)
|
||||
if not grid then
|
||||
grid = CreateFrame("Frame", "ElvUIGrid", UIParent)
|
||||
grid:SetFrameStrata("BACKGROUND")
|
||||
else
|
||||
grid.regionCount = 0
|
||||
local numRegions = grid:GetNumRegions()
|
||||
for i = 1, numRegions do
|
||||
local region = select(i, grid:GetRegions())
|
||||
if region and region.IsObjectType and region:IsObjectType("Texture") then
|
||||
grid.regionCount = grid.regionCount + 1
|
||||
region:SetAlpha(0)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
grid.boxSize = E.db.gridSize
|
||||
grid:SetAllPoints(E.UIParent)
|
||||
grid:Show()
|
||||
@@ -108,34 +126,41 @@ function E:Grid_Create()
|
||||
local hStep = height / E.db.gridSize
|
||||
|
||||
for i = 0, E.db.gridSize do
|
||||
local tx = grid:CreateTexture(nil, "BACKGROUND")
|
||||
local tx = E:Grid_GetRegion()
|
||||
if i == E.db.gridSize / 2 then
|
||||
tx:SetTexture(1, 0, 0)
|
||||
tx:SetDrawLayer("BACKGROUND", 1)
|
||||
else
|
||||
tx:SetTexture(0, 0, 0)
|
||||
tx:SetDrawLayer("BACKGROUND", 0)
|
||||
end
|
||||
tx:ClearAllPoints()
|
||||
E:Point(tx, "TOPLEFT", grid, "TOPLEFT", i*wStep - (size/2), 0)
|
||||
E:Point(tx, "BOTTOMRIGHT", grid, "BOTTOMLEFT", i*wStep + (size/2), 0)
|
||||
end
|
||||
height = GetScreenHeight()
|
||||
|
||||
do
|
||||
local tx = grid:CreateTexture(nil, "BACKGROUND")
|
||||
local tx = E:Grid_GetRegion()
|
||||
tx:SetTexture(1, 0, 0)
|
||||
tx:SetDrawLayer("BACKGROUND", 1)
|
||||
tx:ClearAllPoints()
|
||||
E:Point(tx, "TOPLEFT", grid, "TOPLEFT", 0, -(height/2) + (size/2))
|
||||
E:Point(tx, "BOTTOMRIGHT", grid, "TOPRIGHT", 0, -(height/2 + size/2))
|
||||
end
|
||||
|
||||
for i = 1, floor((height/2)/hStep) do
|
||||
local tx = grid:CreateTexture(nil, "BACKGROUND")
|
||||
for i = 1, floor((height / 2) / hStep) do
|
||||
local tx = E:Grid_GetRegion()
|
||||
tx:SetTexture(0, 0, 0)
|
||||
|
||||
tx:SetDrawLayer("BACKGROUND", 0)
|
||||
tx:ClearAllPoints()
|
||||
E:Point(tx, "TOPLEFT", grid, "TOPLEFT", 0, -(height/2+i*hStep) + (size/2))
|
||||
E:Point(tx, "BOTTOMRIGHT", grid, "TOPRIGHT", 0, -(height/2+i*hStep + size/2))
|
||||
|
||||
tx = grid:CreateTexture(nil, "BACKGROUND")
|
||||
tx = E:Grid_GetRegion()
|
||||
tx:SetTexture(0, 0, 0)
|
||||
|
||||
tx:SetDrawLayer("BACKGROUND", 0)
|
||||
tx:ClearAllPoints()
|
||||
E:Point(tx, "TOPLEFT", grid, "TOPLEFT", 0, -(height/2-i*hStep) + (size/2))
|
||||
E:Point(tx, "BOTTOMRIGHT", grid, "TOPRIGHT", 0, -(height/2-i*hStep + size/2))
|
||||
end
|
||||
@@ -148,7 +173,7 @@ local function ConfigMode_OnClick()
|
||||
end
|
||||
|
||||
local function ConfigMode_Initialize()
|
||||
local info = {}
|
||||
local info = L_UIDropDownMenu_CreateInfo()
|
||||
info.func = ConfigMode_OnClick
|
||||
|
||||
for _, configMode in ipairs(E.ConfigModeLayouts) do
|
||||
@@ -439,8 +464,8 @@ function E:CreateMoverPopup()
|
||||
end)
|
||||
upButton.icon = upButton:CreateTexture(nil, "ARTWORK")
|
||||
E:Size(upButton.icon, 13)
|
||||
E:Point(upButton.icon, "CENTER", 0)
|
||||
upButton.icon:SetTexture([[Interface\AddOns\ElvUI\Media\Textures\SquareButtonTextures.blp]])
|
||||
E:Point(upButton.icon, "CENTER", 0, 0)
|
||||
upButton.icon:SetTexture([[Interface\AddOns\ElvUI\media\textures\SquareButtonTextures]])
|
||||
upButton.icon:SetTexCoord(0.01562500, 0.20312500, 0.01562500, 0.20312500)
|
||||
|
||||
S:SquareButton_SetIcon(upButton, "UP")
|
||||
@@ -454,8 +479,8 @@ function E:CreateMoverPopup()
|
||||
end)
|
||||
downButton.icon = downButton:CreateTexture(nil, "ARTWORK")
|
||||
E:Size(downButton.icon, 13)
|
||||
E:Point(downButton.icon, "CENTER", 0)
|
||||
downButton.icon:SetTexture([[Interface\AddOns\ElvUI\Media\Textures\SquareButtonTextures.blp]])
|
||||
E:Point(downButton.icon, "CENTER", 0, 0)
|
||||
downButton.icon:SetTexture([[Interface\AddOns\ElvUI\media\textures\SquareButtonTextures]])
|
||||
downButton.icon:SetTexCoord(0.01562500, 0.20312500, 0.01562500, 0.20312500)
|
||||
|
||||
S:SquareButton_SetIcon(downButton, "DOWN")
|
||||
@@ -469,8 +494,8 @@ function E:CreateMoverPopup()
|
||||
end)
|
||||
leftButton.icon = leftButton:CreateTexture(nil, "ARTWORK")
|
||||
E:Size(leftButton.icon, 13)
|
||||
E:Point(leftButton.icon, "CENTER", 0)
|
||||
leftButton.icon:SetTexture([[Interface\AddOns\ElvUI\Media\Textures\SquareButtonTextures.blp]])
|
||||
E:Point(leftButton.icon, "CENTER", 0, 0)
|
||||
leftButton.icon:SetTexture([[Interface\AddOns\ElvUI\media\textures\SquareButtonTextures]])
|
||||
leftButton.icon:SetTexCoord(0.01562500, 0.20312500, 0.01562500, 0.20312500)
|
||||
|
||||
S:SquareButton_SetIcon(leftButton, "LEFT")
|
||||
@@ -484,8 +509,8 @@ function E:CreateMoverPopup()
|
||||
end)
|
||||
rightButton.icon = rightButton:CreateTexture(nil, "ARTWORK")
|
||||
E:Size(rightButton.icon, 13)
|
||||
E:Point(rightButton.icon, "CENTER", 0)
|
||||
rightButton.icon:SetTexture([[Interface\AddOns\ElvUI\Media\Textures\SquareButtonTextures.blp]])
|
||||
E:Point(rightButton.icon, "CENTER", 0, 0)
|
||||
rightButton.icon:SetTexture([[Interface\AddOns\ElvUI\media\textures\SquareButtonTextures]])
|
||||
rightButton.icon:SetTexCoord(0.01562500, 0.20312500, 0.01562500, 0.20312500)
|
||||
|
||||
S:SquareButton_SetIcon(rightButton, "RIGHT")
|
||||
+48
-108
@@ -21,7 +21,7 @@ local IsInInstance, GetNumPartyMembers, GetNumRaidMembers = IsInInstance, GetNum
|
||||
local RequestBattlefieldScoreData = RequestBattlefieldScoreData
|
||||
local SendAddonMessage = SendAddonMessage
|
||||
local UnitFactionGroup = UnitFactionGroup
|
||||
local NONE = NONE
|
||||
local NONE = L["None"]
|
||||
local RAID_CLASS_COLORS = RAID_CLASS_COLORS
|
||||
|
||||
-- Constants
|
||||
@@ -170,6 +170,16 @@ function E:ShapeshiftDelayedUpdate(func, ...)
|
||||
end, 0.05)
|
||||
end
|
||||
|
||||
function E:GetPlayerRole()
|
||||
if self.HealingClasses[self.myclass] ~= nil and self:CheckTalentTree(self.HealingClasses[E.myclass]) then
|
||||
return "HEALER"
|
||||
elseif E.Role == "Tank" then
|
||||
return "TANK"
|
||||
else
|
||||
return "DAMAGER"
|
||||
end
|
||||
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
|
||||
@@ -296,7 +306,7 @@ function E:RequestBGInfo()
|
||||
end
|
||||
|
||||
function E:PLAYER_ENTERING_WORLD()
|
||||
-- self:ScheduleTimer("CheckRole", 0.01)
|
||||
self:ScheduleTimer("CheckRole", 0.01)
|
||||
|
||||
if not self.MediaUpdated then
|
||||
self:UpdateMedia()
|
||||
@@ -413,9 +423,9 @@ end
|
||||
|
||||
function E:UpdateStatusBars()
|
||||
for _, statusBar in pairs(self.statusBars) do
|
||||
if statusBar and statusBar:GetObjectType() == "StatusBar" then
|
||||
if statusBar and statusBar:IsObjectType("StatusBar") then
|
||||
statusBar:SetStatusBarTexture(self.media.normTex)
|
||||
elseif statusBar and statusBar:GetObjectType() == "Texture" then
|
||||
elseif statusBar and statusBar:IsObjectType("Texture") then
|
||||
statusBar:SetTexture(self.media.normTex)
|
||||
end
|
||||
end
|
||||
@@ -463,6 +473,19 @@ function E:GetTalentSpecInfo(isInspect)
|
||||
return specIdx, specName, specIcon
|
||||
end
|
||||
|
||||
function E:CheckTalentTree(tree)
|
||||
local talentTree = self.TalentTree
|
||||
if not talentTree then return false end
|
||||
|
||||
if type(tree) == "number" then
|
||||
return tree == talentTree
|
||||
elseif type(tree) == "table" then
|
||||
for _, index in pairs(tree) do
|
||||
return index == talentTree
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function E:CheckRole()
|
||||
local talentTree = self:GetTalentSpecInfo()
|
||||
local role
|
||||
@@ -484,14 +507,6 @@ function E:CheckRole()
|
||||
self.TalentTree = talentTree
|
||||
self.callbacks:Fire("RoleChanged")
|
||||
end
|
||||
|
||||
if E.myclass == "SHAMAN" then
|
||||
if talentTree == 3 then
|
||||
self.DispelClasses[self.myclass].Curse = true
|
||||
else
|
||||
self.DispelClasses[self.myclass].Curse = false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function E:IncompatibleAddOn(addon, module)
|
||||
@@ -505,17 +520,16 @@ end
|
||||
function E:CheckIncompatible()
|
||||
if E.global.ignoreIncompatible then return end
|
||||
|
||||
if IsAddOnLoaded("Prat-3.0") and E.private.chat.enable then
|
||||
E:IncompatibleAddOn("Prat-3.0", "Chat")
|
||||
if IsAddOnLoaded("SnowfallKeyPress") and E.private.actionbar.enable then
|
||||
E.private.actionbar.keyDown = true
|
||||
E:IncompatibleAddOn("SnowfallKeyPress", "ActionBar")
|
||||
end
|
||||
|
||||
if IsAddOnLoaded("Chatter") and E.private.chat.enable then
|
||||
E:IncompatibleAddOn("Chatter", "Chat")
|
||||
end
|
||||
|
||||
if IsAddOnLoaded("SnowfallKeyPress") and E.private.actionbar.enable then
|
||||
E.private.actionbar.keyDown = true
|
||||
E:IncompatibleAddOn("SnowfallKeyPress", "ActionBar")
|
||||
if IsAddOnLoaded("Prat") and E.private.chat.enable then
|
||||
E:IncompatibleAddOn("Prat", "Chat")
|
||||
end
|
||||
|
||||
if IsAddOnLoaded("TidyPlates") and E.private.nameplates.enable then
|
||||
@@ -911,6 +925,7 @@ function E:UpdateAll(ignoreInstall)
|
||||
Chat:PositionChat(true)
|
||||
Chat:SetupChat()
|
||||
Chat:UpdateAnchors()
|
||||
Chat:Panels_ColorUpdate()
|
||||
end
|
||||
|
||||
DataBars:EnableDisable_ExperienceBar()
|
||||
@@ -1089,108 +1104,33 @@ function E:DBConversions()
|
||||
end
|
||||
end
|
||||
|
||||
local CPU_USAGE = {}
|
||||
local function CompareCPUDiff(showall, module, minCalls)
|
||||
local greatestUsage, greatestCalls, greatestName, newName, newFunc
|
||||
local greatestDiff, lastModule, mod, newUsage, calls, differance = 0
|
||||
|
||||
for name, oldUsage in pairs(CPU_USAGE) do
|
||||
newName, newFunc = match(name, "^([^:]+):(.+)$")
|
||||
if not newFunc then
|
||||
E:Print("CPU_USAGE:", name, newFunc)
|
||||
else
|
||||
if newName ~= lastModule then
|
||||
mod = E:GetModule(newName, true) or E
|
||||
lastModule = newName
|
||||
end
|
||||
newUsage, calls = GetFunctionCPUUsage(mod[newFunc], true)
|
||||
differance = newUsage - oldUsage
|
||||
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
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if greatestName then
|
||||
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)
|
||||
local module, showall, delay, minCalls = match(msg, "^([^%s]+)%s*([^%s]*)%s*([^%s]*)%s*(.*)$")
|
||||
local mod
|
||||
|
||||
module = (module == "nil" and nil) or module
|
||||
if not module then
|
||||
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"
|
||||
|
||||
showall = (showall == "true" and true) or false
|
||||
delay = (delay == "nil" and nil) or tonumber(delay) or 5
|
||||
minCalls = (minCalls == "nil" and nil) or tonumber(minCalls) or 15
|
||||
|
||||
twipe(CPU_USAGE)
|
||||
if module == "all" then
|
||||
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
|
||||
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: "..(checkCore or module)..", showall: "..tostring(showall)..", minCalls: "..tostring(minCalls)..", delay: "..tostring(delay)..")")
|
||||
end
|
||||
|
||||
function E:Initialize()
|
||||
function E:Initialize(loginFrame)
|
||||
self.myfaction, self.myLocalizedFaction = UnitFactionGroup("player")
|
||||
|
||||
twipe(self.db)
|
||||
twipe(self.global)
|
||||
twipe(self.private)
|
||||
|
||||
self.data = LibStub("AceDB-3.0"):New("ElvDB", self.DF)
|
||||
local AceDB = LibStub("AceDB-3.0")
|
||||
|
||||
self.data = AceDB:New("ElvDB", self.DF)
|
||||
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.charSettings = AceDB:New("ElvPrivateDB", self.privateVars)
|
||||
self.private = self.charSettings.profile
|
||||
self.db = self.data.profile
|
||||
self.global = self.data.global
|
||||
self:CheckIncompatible()
|
||||
self:DBConversions()
|
||||
|
||||
-- self:ScheduleTimer("CheckRole", 0.01)
|
||||
self:UIScale("PLAYER_LOGIN")
|
||||
self:ScheduleTimer("CheckRole", 0.01)
|
||||
|
||||
self:UIScale("PLAYER_LOGIN", loginFrame)
|
||||
|
||||
if not E.db.general.cropIcon then
|
||||
E.TexCoords = {0, 1, 0, 1}
|
||||
end
|
||||
|
||||
self:LoadCommands() --Load Commands
|
||||
self:InitializeModules() --Load Modules
|
||||
@@ -1215,8 +1155,8 @@ function E:Initialize()
|
||||
self:UpdateBorderColors()
|
||||
self:UpdateBackdropColors()
|
||||
self:UpdateStatusBars()
|
||||
-- self:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED", "CheckRole")
|
||||
-- self:RegisterEvent("CHARACTER_POINTS_CHANGED", "CheckRole")
|
||||
|
||||
self:RegisterEvent("CHARACTER_POINTS_CHANGED", "CheckRole")
|
||||
self:RegisterEvent("CVAR_UPDATE", "UIScale")
|
||||
self:RegisterEvent("PLAYER_ENTERING_WORLD")
|
||||
|
||||
@@ -1231,6 +1171,6 @@ function E:Initialize()
|
||||
collectgarbage()
|
||||
|
||||
if self.db.general.loginmessage then
|
||||
print(select(2, E:GetModule("Chat"):FindURL("CHAT_MSG_DUMMY", format(L["LOGIN_MSG"], self["media"].hexvaluecolor, self["media"].hexvaluecolor, self.version)))..".")
|
||||
self:Print(select(2, E:GetModule("Chat"):FindURL("CHAT_MSG_DUMMY", format(L["LOGIN_MSG"], self.media.hexvaluecolor, self.media.hexvaluecolor, self.version)))..".")
|
||||
end
|
||||
end
|
||||
|
||||
+8
-14
@@ -24,7 +24,7 @@ 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 CLASS, CONTINUE, PREVIOUS = CLASS, CONTINUE, PREVIOUS
|
||||
local NUM_CHAT_WINDOWS = NUM_CHAT_WINDOWS
|
||||
local LOOT, GENERAL, TRADE = LOOT, GENERAL, TRADE
|
||||
local GUILD_EVENT_LOG = GUILD_EVENT_LOG
|
||||
@@ -213,6 +213,7 @@ local function SetupCVars()
|
||||
ALWAYS_SHOW_MULTIBARS = 1
|
||||
LOCK_ACTIONBAR = 1
|
||||
SIMPLE_CHAT = 0
|
||||
|
||||
SetActionBarToggles(1, 0, 1, 1)
|
||||
TutorialFrame_HideAllAlerts()
|
||||
ClearTutorials()
|
||||
@@ -328,9 +329,6 @@ 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
|
||||
@@ -548,9 +546,6 @@ 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
|
||||
@@ -761,7 +756,7 @@ local function SetPage(PageNum)
|
||||
InstallOption1Button:SetScript("OnClick", SetupCVars)
|
||||
InstallOption1Button:SetText(L["Setup CVars"])
|
||||
elseif PageNum == 3 then
|
||||
f.SubTitle:SetText(CHAT_LABEL)
|
||||
f.SubTitle:SetText(L["Chat"])
|
||||
f.Desc1:SetText(L["This part of the installation process sets up your chat windows names, positions and colors."])
|
||||
f.Desc2:SetText(L["The chat windows function the same as Blizzard standard chat windows, you can right click the tabs and drag them around, rename, etc. Please click the button below to setup your chat windows."])
|
||||
f.Desc3:SetText(L["Importance: |cffD3CF00Medium|r"])
|
||||
@@ -897,7 +892,7 @@ function E:Install()
|
||||
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:FontTemplate(imsg.text, E.media.normFont, 32, "OUTLINE")
|
||||
E:Point(imsg.text, "BOTTOM", 0, 16)
|
||||
imsg.text:SetTextColor(1, 0.82, 0)
|
||||
imsg.text:SetJustifyH("CENTER")
|
||||
@@ -945,7 +940,7 @@ function E:Install()
|
||||
f.Status:SetMinMaxValues(0, MAX_PAGE)
|
||||
E:Point(f.Status, "TOPLEFT", f.Prev, "TOPRIGHT", 6, -2)
|
||||
E:Point(f.Status, "BOTTOMRIGHT", f.Next, "BOTTOMLEFT", -6, 2)
|
||||
|
||||
-- Setup StatusBar Animation
|
||||
f.Status.anim = CreateAnimationGroup(f.Status)
|
||||
f.Status.anim.progress = f.Status.anim:CreateAnimation("Progress")
|
||||
f.Status.anim.progress:SetSmoothing("Out")
|
||||
@@ -976,7 +971,7 @@ function E:Install()
|
||||
|
||||
f.Option3 = CreateFrame("Button", "InstallOption3Button", f, "UIPanelButtonTemplate")
|
||||
E:StripTextures(f.Option3)
|
||||
E:Size(f.Option3, 110, 30)
|
||||
E:Size(f.Option3, 100, 30)
|
||||
E:Point(f.Option3, "LEFT", f.Option2, "RIGHT", 4, 0)
|
||||
f.Option3:SetText("")
|
||||
f.Option3:Hide()
|
||||
@@ -986,7 +981,7 @@ function E:Install()
|
||||
|
||||
f.Option4 = CreateFrame("Button", "InstallOption4Button", f, "UIPanelButtonTemplate")
|
||||
E:StripTextures(f.Option4)
|
||||
E:Size(f.Option4, 110, 30)
|
||||
E:Size(f.Option4, 100, 30)
|
||||
E:Point(f.Option4, "LEFT", f.Option3, "RIGHT", 4, 0)
|
||||
f.Option4:SetText("")
|
||||
f.Option4:Hide()
|
||||
@@ -1030,9 +1025,8 @@ function E:Install()
|
||||
|
||||
f.tutorialImage = f:CreateTexture("InstallTutorialImage", "OVERLAY")
|
||||
E:Size(f.tutorialImage, 256, 128)
|
||||
f.tutorialImage:SetTexture("Interface\\AddOns\\ElvUI\\media\\textures\\logo.tga")
|
||||
f.tutorialImage:SetTexture("Interface\\AddOns\\ElvUI\\media\\textures\\logo")
|
||||
E:Point(f.tutorialImage, "BOTTOM", 0, 70)
|
||||
|
||||
end
|
||||
|
||||
ElvUIInstallFrame:Show()
|
||||
|
||||
@@ -198,7 +198,7 @@ function E:GetXYOffset(position, override)
|
||||
end
|
||||
end
|
||||
|
||||
local styles = {
|
||||
local gftStyles, gftDec, gftUseStyle, gftDeficit = {
|
||||
-- keep percents in this table with `PERCENT` in the key, and `%.1f%%` in the value somewhere.
|
||||
-- we use these two things to follow our setting for decimal length. they need to be EXACT.
|
||||
["CURRENT"] = "%s",
|
||||
@@ -209,9 +209,8 @@ local styles = {
|
||||
["DEFICIT"] = "-%s"
|
||||
}
|
||||
|
||||
local gftDec, gftUseStyle, gftDeficit
|
||||
function E:GetFormattedText(style, min, max)
|
||||
assert(styles[style], "Invalid format style: "..style)
|
||||
assert(gftStyles[style], "Invalid format style: "..style)
|
||||
assert(min, "You need to provide a current value. Usage: E:GetFormattedText(style, min, max)")
|
||||
assert(max, "You need to provide a maximum value. Usage: E:GetFormattedText(style, min, max)")
|
||||
|
||||
@@ -219,9 +218,9 @@ function E:GetFormattedText(style, min, max)
|
||||
|
||||
gftDec = (E.db.general.decimalLength or 1)
|
||||
if (gftDec ~= 1) and find(style, "PERCENT") then
|
||||
gftUseStyle = gsub(styles[style], "%%%.1f%%%%", "%%."..gftDec.."f%%%%")
|
||||
gftUseStyle = gsub(gftStyles[style], "%%%.1f%%%%", "%%."..gftDec.."f%%%%")
|
||||
else
|
||||
gftUseStyle = styles[style]
|
||||
gftUseStyle = gftStyles[style]
|
||||
end
|
||||
|
||||
if style == "DEFICIT" then
|
||||
@@ -230,7 +229,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(gftStyles.CURRENT, E:ShortValue(min))
|
||||
elseif style == "CURRENT_MAX" then
|
||||
return format(gftUseStyle, E:ShortValue(min), E:ShortValue(max))
|
||||
elseif style == "CURRENT_PERCENT" then
|
||||
@@ -386,10 +385,10 @@ function E:FormatMoney(amount, style)
|
||||
local silvername = L.silverabbrev
|
||||
local goldname = L.goldabbrev
|
||||
|
||||
local value = abs(amount)
|
||||
local gold = floor(value / 10000)
|
||||
local silver = floor(mod(value / 100, 100))
|
||||
local copper = floor(mod(value, 100))
|
||||
local val = abs(amount)
|
||||
local gold = floor(val / 10000)
|
||||
local silver = floor(mod(val / 100, 100))
|
||||
local copper = floor(mod(val, 100))
|
||||
|
||||
if not style or style == "SMART" then
|
||||
local str = ""
|
||||
@@ -399,7 +398,7 @@ function E:FormatMoney(amount, style)
|
||||
if silver > 0 then
|
||||
str = format("%s%d%s%s", str, silver, silvername, copper > 0 and " " or "")
|
||||
end
|
||||
if copper > 0 or value == 0 then
|
||||
if copper > 0 or val == 0 then
|
||||
str = format("%s%d%s", str, copper, coppername)
|
||||
end
|
||||
return str
|
||||
@@ -32,7 +32,7 @@ function CP:CreateModuleConfigGroup(Name, section, pluginSection)
|
||||
general = {
|
||||
order = 1,
|
||||
type = "toggle",
|
||||
name = GENERAL
|
||||
name = L["General"]
|
||||
},
|
||||
PreButtonSpacer = {
|
||||
order = 200,
|
||||
@@ -140,7 +140,7 @@ end
|
||||
function CP:CopyTable(CopyFrom, CopyTo, CopyDefault, module)
|
||||
for key, value in pairs(CopyTo) do
|
||||
if type(value) ~= "table" then
|
||||
if module == true or (type(module) == "table" and module.general == nil or (not CopyTo.general and module.general)) then --Some dark magic of a logic to figure out stuff
|
||||
if module == true or (type(module) == "table" and (module.general == nil or (not CopyTo.general and module.general))) then --Some dark magic of a logic to figure out stuff
|
||||
--This check is to see if the profile we are copying from has keys absent from defaults.
|
||||
--If key exists, then copy. If not, then clear obsolite key from the profile.
|
||||
if CopyDefault[key] ~= nil then
|
||||
@@ -153,7 +153,7 @@ function CP:CopyTable(CopyFrom, CopyTo, CopyDefault, module)
|
||||
if module == true then --Copy over entire section of profile subgroup
|
||||
E:CopyTable(CopyTo, CopyDefault)
|
||||
E:CopyTable(CopyTo, CopyFrom)
|
||||
elseif module[key] ~= nil then
|
||||
elseif type(module) == "table" and module[key] ~= nil then
|
||||
--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.
|
||||
@@ -200,12 +200,12 @@ function CP:ImportFromProfile(section, pluginSection)
|
||||
--Some checks for the occasion someone passes wrong stuff
|
||||
if not section then error("No profile section provided. Usage CP:ImportFromProfile(\"section\")") end
|
||||
if not pluginSection and CP.InternalOptions[section] then error(format("Section name could not be \"%s\". This name is reserved for internal setting"), section) end
|
||||
if pluginSection and CP.InternalOptions[pluginSection][section] then error(format("Section name for plugin group \"%s\" could not be \"%s\". This name is reserved for internal setting"), pluginSection, section) end
|
||||
if pluginSection and (CP.InternalOptions[pluginSection] and CP.InternalOptions[pluginSection][section]) then error(format("Section name for plugin group \"%s\" could not be \"%s\". This name is reserved for internal setting"), pluginSection, section) end
|
||||
|
||||
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] and ElvDB.profiles[E.global.profileCopy.selected][pluginSection][section] or P[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)
|
||||
|
||||
@@ -479,7 +479,7 @@ function E:SetMoversPositions()
|
||||
end
|
||||
end
|
||||
|
||||
for name, _ in pairs(E.CreatedMovers) do
|
||||
for name in pairs(E.CreatedMovers) do
|
||||
local f = _G[name]
|
||||
local point, anchor, secondaryPoint, x, y
|
||||
if E.db.movers and E.db.movers[name] and type(E.db.movers[name]) == "string" then
|
||||
@@ -90,6 +90,7 @@ function E:UIScale(event)
|
||||
--[[Eyefinity Test mode
|
||||
Resize the E.UIParent to be smaller than it should be, all objects inside should relocate.
|
||||
Dragging moveable frames outside the box and reloading the UI ensures that they are saving position correctly.
|
||||
E:Size(E.UIParent, UIParent:GetWidth() - 250, UIParent:GetHeight() - 250)
|
||||
]]
|
||||
else
|
||||
width, height = UIParent:GetWidth(), UIParent:GetHeight()
|
||||
|
||||
@@ -131,7 +131,7 @@ local function SetPage(PageNum, PrevPage)
|
||||
if i == f.CurrentPage then
|
||||
color = f.StepTitlesColorSelected or {.09,.52,.82}
|
||||
else
|
||||
color = f.StepTitlesColor or {1,1,1}
|
||||
color = f.StepTitlesColor or {1, 1, 1}
|
||||
end
|
||||
b.text:SetTextColor(color[1] or color.r, color[2] or color.g, color[3] or color.b)
|
||||
end
|
||||
@@ -172,23 +172,23 @@ function PI:CreateStepComplete()
|
||||
imsg.firstShow = false
|
||||
|
||||
imsg.bg = imsg:CreateTexture(nil, "BACKGROUND")
|
||||
imsg.bg:SetTexture([[Interface\LevelUp\LevelUpTex]])
|
||||
E:Point(imsg.bg, "BOTTOM", 0, 0)
|
||||
imsg.bg:SetTexture([[Interface\AddOns\ElvUI\media\textures\LevelUpTex]])
|
||||
imsg.bg:SetPoint("BOTTOM", 0, 0)
|
||||
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\LevelUp\LevelUpTex]])
|
||||
E:Point(imsg.lineTop, "TOP", 0, 0)
|
||||
imsg.lineTop:SetTexture([[Interface\AddOns\ElvUI\media\textures\LevelUpTex]])
|
||||
imsg.lineTop:SetPoint("TOP", 0, 0)
|
||||
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\LevelUp\LevelUpTex]])
|
||||
E:Point(imsg.lineBottom, "BOTTOM", 0, 0)
|
||||
imsg.lineBottom:SetTexture([[Interface\AddOns\ElvUI\media\textures\LevelUpTex]])
|
||||
imsg.lineBottom:SetPoint("BOTTOM", 0, 0)
|
||||
E:Size(imsg.lineBottom, 418, 7)
|
||||
imsg.lineBottom:SetTexCoord(0.00195313, 0.81835938, 0.01953125, 0.03320313)
|
||||
|
||||
@@ -204,7 +204,7 @@ function PI:CreateFrame()
|
||||
f.SetPage = SetPage
|
||||
E:Size(f, 550, 400)
|
||||
E:SetTemplate(f, "Transparent")
|
||||
E:Point(f, "CENTER", 0, 0)
|
||||
f:SetPoint("CENTER", 0, 0)
|
||||
f:SetFrameStrata("TOOLTIP")
|
||||
|
||||
f.Title = f:CreateFontString(nil, "OVERLAY")
|
||||
@@ -246,7 +246,7 @@ function PI:CreateFrame()
|
||||
|
||||
f.Status.text = f.Status:CreateFontString(nil, "OVERLAY")
|
||||
E:FontTemplate(f.Status.text)
|
||||
E:Point(f.Status.text, "CENTER", 0, 0)
|
||||
f.Status.text:SetPoint("CENTER", 0, 0)
|
||||
|
||||
f.Option1 = CreateFrame("Button", "PluginInstallOption1Button", f, "UIPanelButtonTemplate")
|
||||
E:StripTextures(f.Option1)
|
||||
@@ -319,20 +319,20 @@ function PI:CreateFrame()
|
||||
E:Width(f.Desc4, f:GetWidth() - 40)
|
||||
|
||||
local close = CreateFrame("Button", "PluginInstallCloseButton", f, "UIPanelCloseButton")
|
||||
E:Point(close, "TOPRIGHT", f, "TOPRIGHT")
|
||||
close:SetPoint("TOPRIGHT", f, "TOPRIGHT")
|
||||
close:SetScript("OnClick", function() f:Hide() end)
|
||||
E.Skins:HandleCloseButton(close)
|
||||
|
||||
f.pending = CreateFrame("Frame", "PluginInstallPendingButton", f)
|
||||
E:Size(f.pending, 20)
|
||||
E:Point(f.pending, "TOPLEFT", f, "TOPLEFT", 8, -8)
|
||||
f.pending:SetPoint("TOPLEFT", f, "TOPLEFT", 8, -8)
|
||||
f.pending.tex = f.pending:CreateTexture(nil, "OVERLAY")
|
||||
E:Point(f.pending.tex, "TOPLEFT", f.pending, "TOPLEFT", 2, -2)
|
||||
E:Point(f.pending.tex, "BOTTOMRIGHT", f.pending, "BOTTOMRIGHT", -2, 2)
|
||||
f.pending.tex:SetTexture([[Interface\OptionsFrame\UI-OptionsFrame-NewFeatureIcon]])
|
||||
f.pending.tex:SetTexture([[Interface\AddOns\ElvUI\media\textures\UI-OptionsFrame-NewFeatureIcon]])
|
||||
E:CreateBackdrop(f.pending, "Transparent")
|
||||
f.pending:SetScript("OnEnter", function(self)
|
||||
_G["GameTooltip"]:SetOwner(self, "ANCHOR_BOTTOMLEFT", E.PixelMode and -7 or -9);
|
||||
_G["GameTooltip"]:SetOwner(self, "ANCHOR_BOTTOMLEFT", E.PixelMode and -7 or -9)
|
||||
_G["GameTooltip"]:AddLine(L["List of installations in queue:"], 1, 1, 1)
|
||||
_G["GameTooltip"]:AddLine(" ")
|
||||
for i = 1, getn(PI.Installs) do
|
||||
@@ -350,11 +350,11 @@ function PI:CreateFrame()
|
||||
|
||||
f.side = CreateFrame("Frame", "PluginInstallTitleFrame", f)
|
||||
E:SetTemplate(f.side, "Transparent")
|
||||
E:Point(f.side, "TOPLEFT", f, "TOPRIGHT", E.PixelMode and 1 or 3, 0)
|
||||
E:Point(f.side, "BOTTOMLEFT", f, "BOTTOMRIGHT", E.PixelMode and 1 or 3, 0)
|
||||
f.side:SetPoint("TOPLEFT", f, "TOPRIGHT", E.PixelMode and 1 or 3, 0)
|
||||
f.side:SetPoint("BOTTOMLEFT", f, "BOTTOMRIGHT", E.PixelMode and 1 or 3, 0)
|
||||
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:SetPoint("TOP", f.side, "TOP", 0, -4)
|
||||
f.side.text:SetFont(E.media.normFont, 18, "OUTLINE")
|
||||
f.side.text:SetText(L["Steps"])
|
||||
f.side.Lines = {} --Table to keep shown lines
|
||||
@@ -362,14 +362,14 @@ function PI:CreateFrame()
|
||||
for i = 1, 18 do
|
||||
local button = CreateFrame("Button", nil, f)
|
||||
if i == 1 then
|
||||
E:Point(button, "TOP", f.side.text, "BOTTOM", 0, -6)
|
||||
button:SetPoint("TOP", f.side.text, "BOTTOM", 0, -6)
|
||||
else
|
||||
E:Point(button, "TOP", f.side.Lines[i - 1], "BOTTOM")
|
||||
button:SetPoint("TOP", f.side.Lines[i - 1], "BOTTOM")
|
||||
end
|
||||
E:Size(button, 130, BUTTON_HEIGHT)
|
||||
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:SetPoint("TOPLEFT", button, "TOPLEFT", 2, -2)
|
||||
button.text:SetPoint("BOTTOMRIGHT", button, "BOTTOMRIGHT", -2, 2)
|
||||
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("")
|
||||
@@ -419,20 +419,20 @@ function PI:RunInstall()
|
||||
f.Title:SetText(db.Title or L["ElvUI Plugin Installation"])
|
||||
f.Status:SetMinMaxValues(0, f.MaxPage)
|
||||
f.Status.text:SetText(f.CurrentPage.." / "..f.MaxPage)
|
||||
f.tutorialImage:SetTexture(db.tutorialImage or [[Interface\AddOns\ElvUI\media\textures\logo.tga]])
|
||||
f.tutorialImage:SetTexture(db.tutorialImage or [[Interface\AddOns\ElvUI\media\textures\logo]])
|
||||
|
||||
f.Pages = db.Pages
|
||||
|
||||
PluginInstallFrame:Show()
|
||||
E:Point(f, "CENTER")
|
||||
f:SetPoint("CENTER", 0, 0)
|
||||
if db.StepTitles and getn(db.StepTitles) == f.MaxPage then
|
||||
E:Point(f, "CENTER", E.UIParent, "CENTER", -((db.StepTitleWidth or 140)/2), 0)
|
||||
E:Width(f.side, db.StepTitleWidth or 140)
|
||||
f:SetPoint("CENTER", E.UIParent, "CENTER", -((db.StepTitleWidth or 140)/2), 0)
|
||||
f.side:SetWidth(db.StepTitleWidth or 140)
|
||||
f.side:Show()
|
||||
|
||||
for i = 1, getn(f.side.Lines) do
|
||||
if db.StepTitles[i] then
|
||||
E:Width(f.side.Lines[i], db.StepTitleButtonWidth or 130)
|
||||
f.side.Lines[i]:SetWidth(db.StepTitleButtonWidth or 130)
|
||||
f.side.Lines[i].text:SetJustifyH(db.StepTitleTextJustification or "CENTER")
|
||||
f.side.Lines[i]:Show()
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user