Fixes to scrollbar

This commit is contained in:
Henrique Santiago 2012-09-01 20:16:17 -03:00
parent 23097980a3
commit c9688551f3
3 changed files with 4 additions and 4 deletions

View File

@ -244,7 +244,7 @@ function CharacterList.hide()
end
function CharacterList.showAgain()
if characterList:hasChildren() then
if characterList and characterList:hasChildren() then
CharacterList.show()
end
end

View File

@ -168,7 +168,7 @@ function UIScrollBar:setValue(value)
self.value = value
updateSlider(self)
if self.setupDone then
signalcall(self.onValueChange, self, value, delta)
signalcall(self.onValueChange, self, math.round(value), delta)
end
end
@ -203,6 +203,6 @@ end
function UIScrollBar:getMaximum() return self.maximum end
function UIScrollBar:getMinimum() return self.minimum end
function UIScrollBar:getValue() return self.value end
function UIScrollBar:getValue() return math.round(self.value) end
function UIScrollBar:getStep() return self.step end
function UIScrollBar:getOrientation() return self.orientation end

View File

@ -487,7 +487,7 @@ function moveStackableItem(item, toPos)
scrollbar.onValueChange = function(self, value)
spinbox.onValueChange = nil
spinbox:setValue(math.round(value))
spinbox:setValue(value)
spinbox.onValueChange = spinBoxValueChange
end