comparison Modules/DisplayInvested.lua @ 59:4ec321eb0dfe

Adding a crafing tab to the ItemAuditor window.
author Asa Ayers <Asa.Ayers@Gmail.com>
date Sun, 25 Jul 2010 15:51:13 -0700
parents bdf3aba93aa9
children e7d287cc3b02
comparison
equal deleted inserted replaced
58:bdf3aba93aa9 59:4ec321eb0dfe
8 local priceTypeTotal = 2 8 local priceTypeTotal = 2
9 9
10 local promptFrame = false 10 local promptFrame = false
11 11
12 local validateMoney = ItemAuditor.validateMoney 12 local validateMoney = ItemAuditor.validateMoney
13 local parseMoney = parseMoney 13 local parseMoney = ItemAuditor.parseMoney
14 14
15 15
16 StaticPopupDialogs["ItemAuditor_NewPrice"] = { 16 StaticPopupDialogs["ItemAuditor_NewPrice"] = {
17 text = "New price %s %s", 17 text = "New price %s %s",
18 button1 = SAVE, 18 button1 = SAVE,
158 UpdateInvestedData() 158 UpdateInvestedData()
159 159
160 return investedTable 160 return investedTable
161 end 161 end
162 162
163 local function getinvestedColsWidth() 163 ItemAuditor:RegisterTab("Invested", 'tab_invested', ShowInvested)
164 local width = 0
165 for i, data in pairs(investedCols) do
166 width = width + data.width
167 end
168 return width
169 end
170
171 local tabName = 'tab_invested'
172 ItemAuditor:RegisterTab("Invested", tabName, getinvestedColsWidth(), ShowInvested)
173 function ItemAuditor:DisplayInvested() 164 function ItemAuditor:DisplayInvested()
174 self:CreateFrame(tabName) 165 self:CreateFrame('tab_invested')
175 end 166 end
176 167
177 function UpdateInvestedData() 168 function UpdateInvestedData()
178 if investedTable then 169 if investedTable then
179 tableData = {} --reset 170 tableData = {} --reset