PageRenderTime 263ms CodeModel.GetById 121ms app.highlight 4ms RepoModel.GetById 101ms app.codeStats 36ms

/Tukui/modules/skins/guildbank.lua

http://github.com/Asphyxia/Tukui
Lua | 92 lines | 74 code | 16 blank | 2 comment | 7 complexity | db62a1f9465606eac6fc97a5c4e756df MD5 | raw file
 1local T, C, L = unpack(select(2, ...))
 2
 3local function LoadSkin()
 4	GuildBankFrame:StripTextures()
 5	GuildBankFrame:SetTemplate("Transparent")
 6	GuildBankEmblemFrame:StripTextures(true)
 7	
 8	--Close button doesn't have a fucking name, extreme hackage
 9	for i=1, GuildBankFrame:GetNumChildren() do
10		local child = select(i, GuildBankFrame:GetChildren())
11		if child.GetPushedTexture and child:GetPushedTexture() and not child:GetName() then
12			T.SkinCloseButton(child)
13		end
14	end
15	
16	T.SkinButton(GuildBankFrameDepositButton, true)
17	T.SkinButton(GuildBankFrameWithdrawButton, true)
18	T.SkinButton(GuildBankInfoSaveButton, true)
19	T.SkinButton(GuildBankFramePurchaseButton, true)
20	
21	GuildBankFrameWithdrawButton:Point("RIGHT", GuildBankFrameDepositButton, "LEFT", -2, 0)
22
23	GuildBankInfoScrollFrame:StripTextures()
24	GuildBankTransactionsScrollFrame:StripTextures()
25	
26	GuildBankFrame.inset = CreateFrame("Frame", nil, GuildBankFrame)
27	GuildBankFrame.inset:SetTemplate("Transparent")
28	GuildBankFrame.inset:Point("TOPLEFT", 30, -65)
29	GuildBankFrame.inset:Point("BOTTOMRIGHT", -20, 63)
30	
31	for i=1, NUM_GUILDBANK_COLUMNS do
32		_G["GuildBankColumn"..i]:StripTextures()
33		
34		for x=1, NUM_SLOTS_PER_GUILDBANK_GROUP do
35			local button = _G["GuildBankColumn"..i.."Button"..x]
36			local icon = _G["GuildBankColumn"..i.."Button"..x.."IconTexture"]
37			button:StripTextures()
38			button:StyleButton()
39			button:SetTemplate("Transparent", true)
40			
41			icon:ClearAllPoints()
42			icon:Point("TOPLEFT", 2, -2)
43			icon:Point("BOTTOMRIGHT", -2, 2)
44			icon:SetTexCoord(.08, .92, .08, .92)
45		end
46	end
47	
48	for i=1, 8 do
49		local button = _G["GuildBankTab"..i.."Button"]
50		local texture = _G["GuildBankTab"..i.."ButtonIconTexture"]
51		_G["GuildBankTab"..i]:StripTextures(true)
52		
53		button:StripTextures()
54		button:StyleButton(true)
55		button:SetTemplate("Transparent", true)
56		
57		texture:ClearAllPoints()
58		texture:Point("TOPLEFT", 2, -2)
59		texture:Point("BOTTOMRIGHT", -2, 2)
60		texture:SetTexCoord(.08, .92, .08, .92)
61	end
62	
63	for i=1, 4 do
64		T.SkinTab(_G["GuildBankFrameTab"..i])
65	end
66	
67	--Popup
68	GuildBankPopupFrame:StripTextures()
69	GuildBankPopupScrollFrame:StripTextures()
70	GuildBankPopupFrame:SetTemplate("Transparent")
71	GuildBankPopupFrame:Point("TOPLEFT", GuildBankFrame, "TOPRIGHT", 1, -30)
72	T.SkinButton(GuildBankPopupOkayButton)
73	T.SkinButton(GuildBankPopupCancelButton)
74	T.SkinEditBox(GuildBankPopupEditBox)
75	GuildBankPopupNameLeft:Kill()
76	GuildBankPopupNameRight:Kill()
77	GuildBankPopupNameMiddle:Kill()
78
79	for i=1, 16 do
80		local button = _G["GuildBankPopupButton"..i]
81		local icon = _G[button:GetName().."Icon"]
82		button:StripTextures()
83		button:SetTemplate("Transparent")
84		button:StyleButton(true)
85		icon:ClearAllPoints()
86		icon:Point("TOPLEFT", 2, -2)
87		icon:Point("BOTTOMRIGHT", -2, 2)
88		icon:SetTexCoord(.08, .92, .08, .92)
89	end	
90end
91
92T.SkinFuncs["Blizzard_GuildBankUI"] = LoadSkin