update skins, Battlefield, Gossip, Greeting

This commit is contained in:
Crum
2018-01-04 10:34:40 -06:00
parent de36d33f0a
commit 616a34ce78
3 changed files with 46 additions and 43 deletions
@@ -1,6 +1,11 @@
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local S = E:GetModule("Skins");
--Cache global variables
--Lua functions
--WoW API / Variables
local function LoadSkin()
if E.private.skins.blizzard.enable ~= true or E.private.skins.blizzard.battlefield ~= true then return end
@@ -13,6 +18,8 @@ local function LoadSkin()
E:StripTextures(BattlefieldListScrollFrame)
S:HandleScrollBar(BattlefieldListScrollFrameScrollBar)
BattlefieldFrameZoneDescription:SetTextColor(1, 1, 1)
S:HandleButton(BattlefieldFrameCancelButton)
S:HandleButton(BattlefieldFrameJoinButton)
S:HandleButton(BattlefieldFrameGroupJoinButton)
@@ -5,54 +5,54 @@ local S = E:GetModule("Skins");
--Lua functions
local _G = _G
--WoW API / Variables
local hooksecurefunc = hooksecurefunc
local function LoadSkin()
if E.private.skins.blizzard.enable ~= true or E.private.skins.blizzard.gossip ~= true then return end
-- ItemTextFrame
E:StripTextures(ItemTextFrame, true)
E:StripTextures(ItemTextScrollFrame)
S:HandleScrollBar(ItemTextScrollFrameScrollBar)
E:CreateBackdrop(ItemTextFrame, "Transparent")
ItemTextFrame.backdrop:SetPoint("TOPLEFT", 13, -13)
ItemTextFrame.backdrop:SetPoint("BOTTOMRIGHT", -32, 74)
S:HandleCloseButton(ItemTextCloseButton)
S:HandleNextPrevButton(ItemTextPrevPageButton)
S:HandleNextPrevButton(ItemTextNextPageButton)
ItemTextPrevPageButton:ClearAllPoints()
ItemTextNextPageButton:ClearAllPoints()
ItemTextPrevPageButton:SetPoint("TOPLEFT", ItemTextFrame, "TOPLEFT", 30, -50)
ItemTextNextPageButton:SetPoint("TOPRIGHT", ItemTextFrame, "TOPRIGHT", -48, -50)
S:HandleCloseButton(ItemTextCloseButton)
ItemTextPageText:SetTextColor(1, 1, 1)
ItemTextPageText.SetTextColor = E.noop
S:HandleScrollBar(GossipGreetingScrollFrameScrollBar, 5)
-- GossipFrame
E:StripTextures(GossipFrameGreetingPanel)
S:HandleScrollBar(GossipGreetingScrollFrameScrollBar, 5)
E:Kill(GossipFramePortrait)
E:CreateBackdrop(GossipFrame, "Transparent")
GossipFrame.backdrop:SetPoint("TOPLEFT", 15, -19)
GossipFrame.backdrop:SetPoint("BOTTOMRIGHT", -30, 67)
S:HandleButton(GossipFrameGreetingGoodbyeButton)
GossipFrameGreetingGoodbyeButton:SetPoint("BOTTOMRIGHT", GossipFrame, -34, 71)
--[[for i = 1, NUMGOSSIPBUTTONS do
local obj = select(3,_G["GossipTitleButton"..i]:GetRegions())
obj:SetTextColor(1, 1, 1)
end]]
GossipGreetingText:SetTextColor(1,1,1)
E:CreateBackdrop(GossipFrame, "Transparent")
GossipFrame.backdrop:SetPoint("TOPLEFT", 15, -19)
GossipFrame.backdrop:SetPoint("BOTTOMRIGHT", -30, 67)
S:HandleCloseButton(GossipFrameCloseButton)
hooksecurefunc("GossipFrameUpdate", function()
for i=1, NUMGOSSIPBUTTONS do
local button = _G["GossipTitleButton"..i]
GossipGreetingText:SetTextColor(1, 1, 1)
if button:GetFontString() then
if button:GetFontString():GetText() and string.gfind(button:GetFontString():GetText(), "|cff000000") then
button:GetFontString():SetText(string.gsub(button:GetFontString():GetText(), "|cff000000", "|cffFFFF00"))
end
end
end
end)
for i = 1, NUMGOSSIPBUTTONS do
local button = _G["GossipTitleButton"..i]
button:SetTextColor(1, 1, 1)
end
end
S:AddCallback("Gossip", LoadSkin)
@@ -4,31 +4,27 @@ local S = E:GetModule("Skins");
--Cache global variables
--Lua functions
local _G = _G
local find, gsub = string.find, string.gsub
--WoW API / Variables
local HookScript = HookScript
local function LoadSkin()
if E.private.skins.blizzard.enable ~= true or E.private.skins.blizzard.greeting ~= true then return end
HookScript(QuestFrameGreetingPanel, "OnShow", function()
E:StripTextures(QuestFrameGreetingPanel)
S:HandleButton(QuestFrameGreetingGoodbyeButton, true)
GreetingText:SetTextColor(1, 1, 1)
CurrentQuestsText:SetTextColor(1, 1, 0)
E:Kill(QuestGreetingFrameHorizontalBreak)
AvailableQuestsText:SetTextColor(1, 1, 0)
S:HandleScrollBar(QuestGreetingScrollFrameScrollBar)
for i = 1, MAX_NUM_QUESTS do
local button = _G["QuestTitleButton"..i]
button:SetTextColor(1, 1, 1)
if button:GetFontString() then
if button:GetFontString():GetText() and find(button:GetFontString():GetText(), "|cff000000") then
button:GetFontString():SetText(gsub(button:GetFontString():GetText(), "|cff000000", "|cffFFFF00"))
end
end
end
end)
E:StripTextures(QuestFrameGreetingPanel)
E:Kill(QuestGreetingFrameHorizontalBreak)
S:HandleScrollBar(QuestGreetingScrollFrameScrollBar)
S:HandleButton(QuestFrameGreetingGoodbyeButton, true)
GreetingText:SetTextColor(1, 1, 1)
CurrentQuestsText:SetTextColor(1, 1, 0)
AvailableQuestsText:SetTextColor(1, 1, 0)
for i = 1, MAX_NUM_QUESTS do
local button = _G["QuestTitleButton"..i]
button:SetTextColor(1, 1, 0)
end
end
S:AddCallback("Greeting", LoadSkin)