added percentages of market value to tables

This commit is contained in:
Manuel Simon Hirsig
2016-01-18 20:43:43 +01:00
parent ba96d13d7c
commit 094c9d015d
5 changed files with 161 additions and 32 deletions
+15 -1
View File
@@ -1,4 +1,4 @@
AuxVersion = '2.2.11'
AuxVersion = '2.2.12'
AuxAuthors = 'shirsig; Zerf; Zirco (Auctionator); Nimeral (Auctionator backport)'
local lastRightClickAction = GetTime()
@@ -258,6 +258,20 @@ function Aux_Round(v)
return math.floor(v + 0.5)
end
function Aux.price_level_color(pct)
if pct > 135 then
return 1.0,0.0,0.0 -- red
elseif pct > 110 then
return 1.0,0.6,0.1 -- orange
elseif pct > 80 then
return 1.0,1.0,0.0 -- yellow
elseif pct > 50 then
return 0.1,1.0,0.1 -- green
else
return 0.2,0.6,1.0 -- blue
end
end
function Aux_AuctionsButton_OnClick(button)
if arg1 == "LeftButton" then -- because we additionally registered right clicks we only let left ones pass here
Aux.orig.BrowseButton_OnClick(button)