Mercurial > wow > itemauditor
comparison Modules/Frames.lua @ 63:e7d287cc3b02
Replaced all instances of addon with ItemAuditor and I moved ItemAuditor out of the global namespace. The conversion was mostly a search/replace offering no new functionality. That will come in a later commit.
| author | Asa Ayers <Asa.Ayers@Gmail.com> |
|---|---|
| date | Tue, 27 Jul 2010 17:58:33 -0700 |
| parents | 4ec321eb0dfe |
| children | 32d53abee666 |
comparison
equal
deleted
inserted
replaced
| 62:70dc84df13b3 | 63:e7d287cc3b02 |
|---|---|
| 1 local addonName, addonTable = ...; | 1 local ItemAuditor = select(2, ...) |
| 2 local addon = _G[addonName] | 2 local Frames = ItemAuditor:NewModule("Frames") |
| 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 addon:RegisterTab(text, value, callback) | 8 function ItemAuditor: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 |
| 28 | 28 |
| 29 currentContent = cb(container) | 29 currentContent = cb(container) |
| 30 end | 30 end |
| 31 | 31 |
| 32 | 32 |
| 33 function addon:CreateFrame(selectedTab) | 33 function ItemAuditor:CreateFrame(selectedTab) |
| 34 | 34 |
| 35 if not displayFrame then | 35 if not displayFrame then |
| 36 -- Create the frame container | 36 -- Create the frame container |
| 37 displayFrame = AceGUI:Create("Frame") | 37 displayFrame = AceGUI:Create("Frame") |
| 38 ItemAuditor:RegisterFrame(displayFrame) | 38 ItemAuditor:RegisterFrame(displayFrame) |
| 75 | 75 |
| 76 displayFrame.tab:SelectTab(selectedTab) | 76 displayFrame.tab:SelectTab(selectedTab) |
| 77 displayFrame:Show() | 77 displayFrame:Show() |
| 78 end | 78 end |
| 79 | 79 |
| 80 function addon:UpdateStatusText(message) | 80 function ItemAuditor:UpdateStatusText(message) |
| 81 if displayFrame then | 81 if displayFrame then |
| 82 displayFrame:SetStatusText(message) | 82 displayFrame:SetStatusText(message) |
| 83 end | 83 end |
| 84 end | 84 end |
