This commit is contained in:
Simon Hirsig
2017-11-02 20:12:50 +01:00
parent 2721bcf663
commit d9780610f4
4 changed files with 25 additions and 24 deletions
+17
View File
@@ -550,4 +550,21 @@ do
editbox:SetFocus()
editbox:ClearFocus()
end
end
function M.percentage_historical(pct, bid)
local text = (pct > 10000 and '>10000' or pct) .. '%'
if bid then
return color.gray(text)
elseif pct < 50 then
return color.blue(text)
elseif pct < 80 then
return color.green(text)
elseif pct < 110 then
return color.yellow(text)
elseif pct < 135 then
return color.orange(text)
else
return color.red(text)
end
end