Mercurial > wow > itemauditor
comparison Modules/Tooltip.lua @ 34:d21d202f3b3d
Added color coding to the minimum price tooltip. If your minimum price is below the current auction price, it wll be green, otherwise it is red.
author | Asa Ayers <Asa.Ayers@Gmail.com> |
---|---|
date | Sun, 18 Jul 2010 16:42:38 -0700 |
parents | e62d878c716d |
children | 003de902ae64 |
comparison
equal
deleted
inserted
replaced
33:f5d384fe7e4a | 34:d21d202f3b3d |
---|---|
15 | 15 |
16 local keep = 1 - addon:GetAHCut() | 16 local keep = 1 - addon:GetAHCut() |
17 local show = false | 17 local show = false |
18 | 18 |
19 if investedTotal > 0 then | 19 if investedTotal > 0 then |
20 local suggestColor | |
21 local ap = addon:GetAuctionPrice(link) | |
22 if ap == nil then | |
23 suggestColor = nil | |
24 elseif ap > ceil(investedPerItem/keep) then | |
25 suggestColor = "|cFF00FF00" -- green | |
26 else | |
27 suggestColor = "|cFFFF0000" -- red | |
28 end | |
29 | |
30 | |
20 tip:AddDoubleLine("\124cffffffffIA: Total Invested", addon:FormatMoney(investedTotal)); | 31 tip:AddDoubleLine("\124cffffffffIA: Total Invested", addon:FormatMoney(investedTotal)); |
21 tip:AddDoubleLine("\124cffffffffIA: Invested per Item (own: " .. count .. ")", addon:FormatMoney(ceil(investedPerItem))); | 32 tip:AddDoubleLine("\124cffffffffIA: Invested per Item (own: " .. count .. ")", addon:FormatMoney(ceil(investedPerItem))); |
22 tip:AddDoubleLine("\124cffffffffIA: Minimum " .. addon:GetAHFaction() .. " AH Price: ", addon:FormatMoney(ceil(investedPerItem/keep))) | 33 tip:AddDoubleLine("\124cffffffffIA: Minimum " .. addon:GetAHFaction() .. " AH Price: ", addon:FormatMoney(ceil(investedPerItem/keep), suggestColor)) |
23 show = true | 34 show = true |
24 | 35 |
25 end | 36 end |
26 | 37 |
27 if addon:IsQAEnabled() then | 38 if addon:IsQAEnabled() then |