getRectangle returns x,y,w,h instead of x1,y1,x2,y2

This commit is contained in:
airstruck
2015-11-27 06:40:02 -05:00
parent 29dac8a611
commit 290f6333b7
5 changed files with 64 additions and 59 deletions

View File

@@ -12,9 +12,9 @@ return function (self)
end)
self:onReshape(function ()
local x1, y1, x2, y2 = self:getRectangle(true, true)
local x, y, w, h = self:getRectangle(true, true)
local min = bar.minwidth
x1 = x1 + min
bar.width = self.value * (x2 - x1) + min
x = x + min
bar.width = self.value * w + min
end)
end