/Tukui/modules/skins/gossip.lua
Lua | 56 lines | 43 code | 12 blank | 1 comment | 7 complexity | 9b071fc138ee673675587bd0732ac523 MD5 | raw file
1local T, C, L = unpack(select(2, ...)) 2 3local function LoadSkin() 4 local StripAllTextures = { 5 "GossipFrameGreetingPanel", 6 } 7 8 for _, object in pairs(StripAllTextures) do 9 _G[object]:StripTextures() 10 end 11 T.SkinScrollBar(GossipGreetingScrollFrameScrollBar, 5) 12 local KillTextures = { 13 "GossipFramePortrait", 14 } 15 16 for _, texture in pairs(KillTextures) do 17 _G[texture]:Kill() 18 end 19 20 local buttons = { 21 "GossipFrameGreetingGoodbyeButton", 22 } 23 24 for i = 1, #buttons do 25 _G[buttons[i]]:StripTextures() 26 T.SkinButton(_G[buttons[i]]) 27 end 28 29 30 for i = 1, NUMGOSSIPBUTTONS do 31 obj = select(3,_G["GossipTitleButton"..i]:GetRegions()) 32 obj:SetTextColor(1,1,1) 33 end 34 35 GossipGreetingText:SetTextColor(1,1,1) 36 GossipFrame:CreateBackdrop("Transparent") 37 GossipFrame.backdrop:Point("TOPLEFT", GossipFrame, "TOPLEFT", 15, -20) 38 GossipFrame.backdrop:Point("BOTTOMRIGHT", GossipFrame, "BOTTOMRIGHT", -30, 65) 39 T.SkinCloseButton(GossipFrameCloseButton,GossipFrame.backdrop) 40 41 42 --Extreme hackage, blizzard makes button text on quest frame use hex color codes for some reason 43 hooksecurefunc("GossipFrameUpdate", function() 44 for i=1, NUMGOSSIPBUTTONS do 45 local button = _G["GossipTitleButton"..i] 46 47 if button:GetFontString() then 48 if button:GetFontString():GetText() and button:GetFontString():GetText():find("|cff000000") then 49 button:GetFontString():SetText(string.gsub(button:GetFontString():GetText(), "|cff000000", "|cffFFFF00")) 50 end 51 end 52 end 53 end) 54end 55 56tinsert(T.SkinFuncs["Tukui"], LoadSkin)