public
Description: WoW Addon - Prospecting and Disenchanting Aide
Homepage: http://www.tekkub.net
Clone URL: git://github.com/tekkub/panda.git
Click here to lend your support to: panda and make a donation at www.pledgie.com !
Make gem cutting panel prices refresh, instead of only writing on first 
show
tekkub (author)
Sat Jun 21 14:30:29 -0700 2008
commit  5f568d0b8c2b38c46ad1b5c1f2ad2787448c7415
tree    8a3d7a14abcecbd9b3339ba28d1b78f0e42a82cb
parent  483bd71b7b75c1a56cc0d07fae7ebbfc0c4bf175
...
29
30
31
32
33
34
35
 
 
36
37
38
...
149
150
151
152
153
154
155
 
 
156
157
158
...
244
245
246
247
248
249
250
 
 
251
252
253
...
337
338
339
 
 
 
 
340
341
342
343
344
 
 
 
 
345
346
...
29
30
31
 
 
 
 
32
33
34
35
36
...
147
148
149
 
 
 
 
150
151
152
153
154
...
240
241
242
 
 
 
 
243
244
245
246
247
...
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
0
@@ -29,10 +29,8 @@ function Panda:CreateCutGreenBluePanel()
0
     icon:SetTexture(texture)
0
 
0
     if not notext then
0
- local text = f:CreateFontString(nil, "ARTWORK", "GameFontNormalSmall")
0
- text:SetPoint("TOP", icon, "BOTTOM")
0
- local price = Panda:GetAHBuyout(id)
0
- text:SetText(GS(price))
0
+ f.text = f:CreateFontString(nil, "ARTWORK", "GameFontNormalSmall")
0
+ f.text:SetPoint("TOP", icon, "BOTTOM")
0
     end
0
 
0
     local count = f:CreateFontString(nil, "ARTWORK", "NumberFontNormalSmall")
0
@@ -149,10 +147,8 @@ function Panda:CreateCutMetaPanel()
0
     icon:SetAllPoints(f)
0
     icon:SetTexture(texture)
0
 
0
- local text = f:CreateFontString(nil, "ARTWORK", "GameFontNormalSmall")
0
- text:SetPoint("TOP", icon, "BOTTOM")
0
- local price = Panda:GetAHBuyout(id)
0
- text:SetText(G(price))
0
+ f.text = f:CreateFontString(nil, "ARTWORK", "GameFontNormalSmall")
0
+ f.text:SetPoint("TOP", icon, "BOTTOM")
0
 
0
     local count = f:CreateFontString(nil, "ARTWORK", "NumberFontNormalSmall")
0
     count:SetPoint("BOTTOMRIGHT", icon, "BOTTOMRIGHT", -2, 2)
0
@@ -244,10 +240,8 @@ function Panda:CreateCutPurplePanel()
0
     icon:SetAllPoints(f)
0
     icon:SetTexture(texture)
0
 
0
- local text = f:CreateFontString(nil, "ARTWORK", "GameFontNormalSmall")
0
- text:SetPoint("TOP", icon, "BOTTOM")
0
- local price = Panda:GetAHBuyout(id)
0
- text:SetText(G(price))
0
+ f.text = f:CreateFontString(nil, "ARTWORK", "GameFontNormalSmall")
0
+ f.text:SetPoint("TOP", icon, "BOTTOM")
0
 
0
     local count = f:CreateFontString(nil, "ARTWORK", "NumberFontNormalSmall")
0
     count:SetPoint("BOTTOMRIGHT", icon, "BOTTOMRIGHT", -2, 2)
0
@@ -337,10 +331,18 @@ function Panda:GemCutBagUpdate()
0
   for id,f in pairs(cutframes) do
0
     local count = GetItemCount(id)
0
     f.count:SetText(count > 0 and count or "")
0
+ if f.text then
0
+ local price = Panda:GetAHBuyout(id)
0
+ f.text:SetText(GS(price))
0
+ end
0
   end
0
 
0
   for id,f in pairs(rawframes) do
0
     local count = GetItemCount(id)
0
     f.count:SetText(count > 0 and count or "")
0
+ if f.text then
0
+ local price = Panda:GetAHBuyout(id)
0
+ f.text:SetText(GS(price))
0
+ end
0
   end
0
 end
...
53
54
55
 
 
56
57
58
...
53
54
55
56
57
58
59
60
0
@@ -53,6 +53,8 @@ end
0
 
0
 function Panda.GS(cash)
0
   if not cash then return end
0
+ if cash > 999999 then return "|cffffd700".. floor(cash/10000) end
0
+
0
   cash = cash/100
0
   local s = floor(cash%100)
0
   local g = floor(cash/100)

Comments

    No one has commented yet.