comparison Modules/Frames.lua @ 65:32d53abee666

Converting ItemAuditor modules into true modules instead of a bunch of files that all write to the ItemAuditor table.
author Asa Ayers <Asa.Ayers@Gmail.com>
date Tue, 27 Jul 2010 18:15:38 -0700
parents e7d287cc3b02
children f37ab41f1928
comparison
equal deleted inserted replaced
64:e92a5adf75bf 65:32d53abee666
3 3
4 local AceGUI = LibStub("AceGUI-3.0") 4 local AceGUI = LibStub("AceGUI-3.0")
5 5
6 local tabs = {} 6 local tabs = {}
7 7
8 function ItemAuditor:RegisterTab(text, value, callback) 8 function Frames.RegisterTab(text, value, callback)
9 tabs[value] = {text=text, callback=callback} 9 tabs[value] = {text=text, callback=callback}
10 end 10 end
11 11
12 local displayFrame = false 12 local displayFrame = false
13 local currentContent = false 13 local currentContent = false
27 end 27 end
28 28
29 currentContent = cb(container) 29 currentContent = cb(container)
30 end 30 end
31 31
32 32 function Frames.CreateFrame(selectedTab)
33 function ItemAuditor:CreateFrame(selectedTab)
34 33
35 if not displayFrame then 34 if not displayFrame then
36 -- Create the frame container 35 -- Create the frame container
37 displayFrame = AceGUI:Create("Frame") 36 displayFrame = AceGUI:Create("Frame")
38 ItemAuditor:RegisterFrame(displayFrame) 37 ItemAuditor:RegisterFrame(displayFrame)
75 74
76 displayFrame.tab:SelectTab(selectedTab) 75 displayFrame.tab:SelectTab(selectedTab)
77 displayFrame:Show() 76 displayFrame:Show()
78 end 77 end
79 78
80 function ItemAuditor:UpdateStatusText(message) 79 function Frames.UpdateStatusText(message)
81 if displayFrame then 80 if displayFrame then
82 displayFrame:SetStatusText(message) 81 displayFrame:SetStatusText(message)
83 end 82 end
84 end 83 end
84
85 function ItemAuditor:UpdateStatusText(message)
86 return Frames.UpdateStatusText(message)
87 end
88
89 function ItemAuditor:RegisterTab(text, value, callback)
90 return Frames.RegisterTab(text, value, callback)
91 end
92
93 function ItemAuditor:CreateFrame(selectedTab)
94 Frames.CreateFrame(selectedTab)
95 end