This commit is contained in:
Crum
2017-12-12 21:03:06 -06:00
parent 77faa3c3b5
commit 059f556c90
5 changed files with 144 additions and 12 deletions
@@ -50,12 +50,10 @@ local function LoadSkin()
S:HandleButton(ScriptErrorsFrame.close)
ScriptErrorsFrame.reload:SetPoint("BOTTOMLEFT", 12, 8)
ScriptErrorsFrame.previous:SetPoint("BOTTOM", ScriptErrorsFrame, "BOTTOM", -50, 7)
ScriptErrorsFrame.next:SetPoint("BOTTOM", ScriptErrorsFrame, "BOTTOM", 50, 7)
ScriptErrorsFrame.close:SetPoint("BOTTOMRIGHT", -12, 8)
-- TODO FIX HandleNextPrevButton button size
ScriptErrorsFrame.previous:SetPoint("BOTTOM", ScriptErrorsFrame, "BOTTOM", -50, 12)
ScriptErrorsFrame.next:SetPoint("BOTTOM", ScriptErrorsFrame, "BOTTOM", 50, 12)
local noscalemult = E.mult * GetCVar("uiScale")
HookScript(FrameStackTooltip, "OnShow", function()
this:SetBackdrop({
@@ -23,6 +23,7 @@
<Script file="Petition.lua"/>
<Script file="Quest.lua"/>
<Script file="QuestTimer.lua"/>
<Script file="Raid.lua"/>
<Script file="SpellBook.lua"/>
<Script file="Stable.lua"/>
<Script file="Tabard.lua"/>
@@ -6,18 +6,19 @@ local S = E:GetModule("Skins");
local _G = getfenv()
local format = format
--WoW API / Variables
local hooksecurefunc = hooksecurefunc
local function LoadSkin()
-- if E.private.skins.blizzard.enable ~= true or E.private.skins.blizzard.mirrorTimers ~= true then return end
local function MirrorTimerFrame_OnUpdate(frame, elapsed)
if (frame.paused) then
hooksecurefunc("MirrorTimerFrame_OnUpdate", function(frame, elapsed)
if frame.paused then
return
end
if frame.timeSinceUpdate >= 0.3 then
local minutes = frame.value / 60
local seconds = math.mod(frame.value, 60)
local seconds = frame.value - math.floor(frame.value / 60) * 60
local text = frame.label:GetText()
if frame.value > 0 then
@@ -29,7 +30,7 @@ local function LoadSkin()
else
frame.timeSinceUpdate = frame.timeSinceUpdate + elapsed
end
end
end)
for i = 1, MIRRORTIMER_NUMTIMERS do
local mirrorTimer = _G["MirrorTimer" .. i]
@@ -25,6 +25,7 @@ local function LoadSkin()
"OptionsFrameMiscellaneous",
"SoundOptionsFrame",
"TicketStatusFrame",
"ReadyCheckFrame",
"StackSplitFrame",
"DropDownList1MenuBackdrop",
"DropDownList2MenuBackdrop",
@@ -32,6 +33,9 @@ local function LoadSkin()
"DropDownList2Backdrop",
}
E:StripTextures(ReadyCheckFrame)
E:Kill(ReadyCheckPortrait)
for i = 1, getn(skins) do
E:SetTemplate(_G[skins[i]], "Transparent")
end
@@ -165,9 +169,9 @@ local function LoadSkin()
SoundOptionsFrameOkay:SetPoint("RIGHT",SoundOptionsFrameCancel,"LEFT",-4,0)
UIOptionsFrameOkay:ClearAllPoints()
UIOptionsFrameOkay:SetPoint("RIGHT",UIOptionsFrameCancel,"LEFT", -4,0)
-- ReadyCheckFrameYesButton:SetPoint("RIGHT", ReadyCheckFrame, "CENTER", -1, 0)
-- ReadyCheckFrameNoButton:SetPoint("LEFT", ReadyCheckFrameYesButton, "RIGHT", 3, 0)
-- ReadyCheckFrameText:SetPoint("TOP", ReadyCheckFrame, "TOP", 0, -18)
ReadyCheckFrameYesButton:SetPoint("RIGHT", ReadyCheckFrame, "CENTER", -1, 0)
ReadyCheckFrameNoButton:SetPoint("LEFT", ReadyCheckFrameYesButton, "RIGHT", 3, 0)
ReadyCheckFrameText:SetPoint("TOP", ReadyCheckFrame, "TOP", 0, -18)
-- others
ZoneTextFrame:ClearAllPoints()
@@ -179,7 +183,6 @@ local function LoadSkin()
S:HandleButton(CoinPickupOkayButton)
S:HandleButton(CoinPickupCancelButton)
-- ReadyCheckFrame:HookScript("OnShow", function(self) if UnitIsUnit("player", self.initiator) then self:Hide() end end) -- bug fix, don't show it if initiator
StackSplitFrame:GetRegions():Hide()
-- Declension frame
@@ -0,0 +1,129 @@
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local S = E:GetModule("Skins");
--Cache global variables
--Lua functions
local _G = getfenv()
local unpack = unpack
local pairs = pairs
--WoW API / Variables
local hooksecurefunc = hooksecurefunc
function LoadSkin()
-- if E.private.skins.blizzard.enable ~= true or E.private.skins.blizzard.raid ~= true then return end
local StripAllTextures = {
"RaidGroup1",
"RaidGroup2",
"RaidGroup3",
"RaidGroup4",
"RaidGroup5",
"RaidGroup6",
"RaidGroup7",
"RaidGroup8"
}
for _, object in pairs(StripAllTextures) do
if _G[object] then
E:StripTextures(_G[object])
end
end
S:HandleButton(RaidFrameAddMemberButton)
S:HandleButton(RaidFrameReadyCheckButton)
S:HandleButton(RaidFrameRaidInfoButton)
for i = 1, NUM_RAID_GROUPS*5 do
S:HandleButton(_G["RaidGroupButton" .. i], true)
end
for i = 1, 8 do
for j = 1, 5 do
E:StripTextures(_G["RaidGroup" .. i .. "Slot" .. j])
E:SetTemplate(_G["RaidGroup" .. i .. "Slot" .. j], "Transparent")
end
end
-- hooksecurefunc("RaidClassButton_Update", function()
-- local button, icon, count
-- for index, value in pairs(RAID_CLASS_BUTTONS) do
-- button = _G["RaidClassButton" .. value.button]
-- icon = _G["RaidClassButton" .. value.button .. "IconTexture"]
-- count = _G["RaidClassButton" .. value.button .. "Count"]
-- E:StripTextures(button)
-- if not button.backdrop then
-- E:CreateBackdrop(button, "Default")
-- E:SetOutside(button.backdrop, icon)
-- end
-- if button:GetID() == value.button then
-- button.class = index
-- if index == "PETS" then
-- icon:SetTexture("Interface\\RaidFrame\\UI-RaidFrame-Pets")
-- icon:SetTexCoord(unpack(E.TexCoords))
-- elseif index == "MAINTANK" then
-- icon:SetTexture("Interface\\RaidFrame\\UI-RaidFrame-MainTank")
-- icon:SetTexCoord(unpack(E.TexCoords))
-- elseif index == "MAINASSIST" then
-- icon:SetTexture("Interface\\RaidFrame\\UI-RaidFrame-MainAssist")
-- icon:SetTexCoord(unpack(E.TexCoords))
-- else
-- icon:SetTexture("Interface\\WorldStateFrame\\Icons-Classes")
-- icon:SetTexCoord(value.coords[1] + 0.015, value.coords[2] - 0.02, value.coords[3] + 0.018, value.coords[4] - 0.02)
-- end
-- icon:SetWidth(20)
-- icon:SetHeight(20)
-- E:FontTemplate(count, nil, 12, "OUTLINE")
-- end
-- end
-- end)
local function skinPulloutFrames()
for i = 1, NUM_RAID_PULLOUT_FRAMES do
local rp = _G["RaidPullout" .. i]
if not rp.backdrop then
_G["RaidPullout"..i.."MenuBackdrop"]:SetBackdrop(nil)
E:CreateBackdrop(rp, "Transparent")
rp.backdrop:SetPoint("TOPLEFT", 9, -17)
rp.backdrop:SetPoint("BOTTOMRIGHT", -7, 10)
end
end
end
hooksecurefunc("RaidPullout_GetFrame", function()
skinPulloutFrames()
end)
hooksecurefunc("RaidPullout_Update", function(pullOutFrame)
local pfName = pullOutFrame:GetName()
for i = 1, pullOutFrame.numPulloutButtons do
local pfBName = pfName .. "Button" .. i
local pfBObj = _G[pfBName]
if not pfBObj.backdrop then
for _, v in pairs{"HealthBar", "ManaBar", "Target", "TargetTarget"} do
local sBar = pfBName .. v
E:StripTextures(_G[sBar])
_G[sBar]:SetStatusBarTexture(E["media"].normTex)
end
_G[pfBName .. "ManaBar"]:SetPoint("TOP", "$parentHealthBar", "BOTTOM", 0, 0)
_G[pfBName .. "Target"]:SetPoint("TOP", "$parentManaBar", "BOTTOM", 0, -1)
E:CreateBackdrop(pfBObj, "Default")
pfBObj.backdrop:SetPoint("TOPLEFT", E.PixelMode and 0 or -1, -(E.PixelMode and 10 or 9))
pfBObj.backdrop:SetPoint("BOTTOMRIGHT", E.PixelMode and 0 or 1, E.PixelMode and 1 or 0)
end
if not _G[pfBName .. "TargetTargetFrame"].backdrop then
E:StripTextures(_G[pfBName .. "TargetTargetFrame"])
E:CreateBackdrop(_G[pfBName .. "TargetTargetFrame"], "Default")
_G[pfBName .. "TargetTargetFrame"].backdrop:SetPoint("TOPLEFT", E.PixelMode and 10 or 9, -(E.PixelMode and 15 or 14))
_G[pfBName .. "TargetTargetFrame"].backdrop:SetPoint("BOTTOMRIGHT", -(E.PixelMode and 10 or 9), E.PixelMode and 8 or 7)
end
end
end)
end
S:AddCallbackForAddon("Blizzard_RaidUI", "RaidUI", LoadSkin)