/Tukui/modules/skins/gossip.lua
http://github.com/Asphyxia/Tukui · Lua · 56 lines · 51 code · 5 blank · 0 comment · 3 complexity · 9b071fc138ee673675587bd0732ac523 MD5 · raw file
- local T, C, L = unpack(select(2, ...))
- local function LoadSkin()
- local StripAllTextures = {
- "GossipFrameGreetingPanel",
- }
- for _, object in pairs(StripAllTextures) do
- _G[object]:StripTextures()
- end
- T.SkinScrollBar(GossipGreetingScrollFrameScrollBar, 5)
- local KillTextures = {
- "GossipFramePortrait",
- }
- for _, texture in pairs(KillTextures) do
- _G[texture]:Kill()
- end
- local buttons = {
- "GossipFrameGreetingGoodbyeButton",
- }
- for i = 1, #buttons do
- _G[buttons[i]]:StripTextures()
- T.SkinButton(_G[buttons[i]])
- end
- for i = 1, NUMGOSSIPBUTTONS do
- obj = select(3,_G["GossipTitleButton"..i]:GetRegions())
- obj:SetTextColor(1,1,1)
- end
- GossipGreetingText:SetTextColor(1,1,1)
- GossipFrame:CreateBackdrop("Transparent")
- GossipFrame.backdrop:Point("TOPLEFT", GossipFrame, "TOPLEFT", 15, -20)
- GossipFrame.backdrop:Point("BOTTOMRIGHT", GossipFrame, "BOTTOMRIGHT", -30, 65)
- T.SkinCloseButton(GossipFrameCloseButton,GossipFrame.backdrop)
- --Extreme hackage, blizzard makes button text on quest frame use hex color codes for some reason
- hooksecurefunc("GossipFrameUpdate", function()
- for i=1, NUMGOSSIPBUTTONS do
- local button = _G["GossipTitleButton"..i]
-
- if button:GetFontString() then
- if button:GetFontString():GetText() and button:GetFontString():GetText():find("|cff000000") then
- button:GetFontString():SetText(string.gsub(button:GetFontString():GetText(), "|cff000000", "|cffFFFF00"))
- end
- end
- end
- end)
- end
- tinsert(T.SkinFuncs["Tukui"], LoadSkin)