Spinbox changes

This commit is contained in:
Henrique Santiago
2012-08-29 03:11:38 -03:00
parent 9c497f72f9
commit fe6f6c2d20
2 changed files with 12 additions and 10 deletions

View File

@@ -93,6 +93,16 @@ function UISpinBox:setValue(value)
self:setText(value)
end
self.value = value
local upButton = self:getChildById('up')
local downButton = self:getChildById('down')
if upButton then
upButton:setEnabled(self.maximum ~= self.minimum and self.value ~= self.maximum)
end
if downButton then
downButton:setEnabled(self.maximum ~= self.minimum and self.value ~= self.minimum)
end
signalcall(self.onValueChange, self, value)
end