rename item count to countOrSubType, rework and improve things animation/drawing

This commit is contained in:
Eduardo Bart
2012-02-02 14:37:52 -02:00
parent edeee80631
commit ef96215421
24 changed files with 315 additions and 337 deletions

View File

@@ -30,14 +30,14 @@ function UIItem:onDrop(widget, mousePos)
if not widget or not widget.currentDragThing then return true end
local pos = self.position
local data = widget.currentDragThing:getCount()
if widget.currentDragThing:isStackable() and data > 1 then
local count = widget.currentDragThing:getCount()
if widget.currentDragThing:isStackable() and count > 1 then
widget.parsed = true
local moveWindow = displayUI('/game/movewindow.otui')
local spinbox = moveWindow:getChildById('spinbox')
spinbox:setMaximum(data)
spinbox:setMaximum(count)
spinbox:setMinimum(1)
spinbox:setCurrentIndex(data)
spinbox:setCurrentIndex(count)
local okButton = moveWindow:getChildById('buttonOk')
okButton.onClick = function() Game.move(widget.currentDragThing, pos, spinbox:getCurrentIndex()) okButton:getParent():destroy() widget.currentDragThing = nil end