bind clock, fixes to waiting list

This commit is contained in:
Henrique Santiago
2012-06-08 17:58:24 -03:00
parent 587db0d89f
commit 4f9ca15ef0
4 changed files with 70 additions and 14 deletions

View File

@@ -0,0 +1,8 @@
function math.round(num, idp)
local mult = 10^(idp or 0)
if num >= 0 then
return math.floor(num * mult + 0.5) / mult
else
return math.ceil(num * mult - 0.5) / mult
end
end

View File

@@ -19,8 +19,12 @@ function UIProgressBar:getPercent()
return self.percent
end
function UIProgressBar:getPercentPixels()
return 100 / self:getWidth()
end
function UIProgressBar:updateBackground()
local width = math.max((self.percent * self:getWidth())/100, 1)
local width = math.round(math.max((self.percent * self:getWidth())/100, 1))
local height = self:getHeight()
self:setBackgroundSize({width=width, height=height})
end