Mercurial > wow > itemauditor
diff 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 |
line wrap: on
line diff
--- a/Modules/Tooltip.lua Sat Jul 17 07:33:23 2010 -0700 +++ b/Modules/Tooltip.lua Sun Jul 18 16:42:38 2010 -0700 @@ -17,9 +17,20 @@ local show = false if investedTotal > 0 then + local suggestColor + local ap = addon:GetAuctionPrice(link) + if ap == nil then + suggestColor = nil + elseif ap > ceil(investedPerItem/keep) then + suggestColor = "|cFF00FF00" -- green + else + suggestColor = "|cFFFF0000" -- red + end + + tip:AddDoubleLine("\124cffffffffIA: Total Invested", addon:FormatMoney(investedTotal)); tip:AddDoubleLine("\124cffffffffIA: Invested per Item (own: " .. count .. ")", addon:FormatMoney(ceil(investedPerItem))); - tip:AddDoubleLine("\124cffffffffIA: Minimum " .. addon:GetAHFaction() .. " AH Price: ", addon:FormatMoney(ceil(investedPerItem/keep))) + tip:AddDoubleLine("\124cffffffffIA: Minimum " .. addon:GetAHFaction() .. " AH Price: ", addon:FormatMoney(ceil(investedPerItem/keep), suggestColor)) show = true end