items movement fixed, spinbox style changed

This commit is contained in:
Henrique Santiago
2012-04-06 19:31:45 -03:00
parent 8cc0aaae23
commit fba5f188d7
4 changed files with 10 additions and 1 deletions

View File

@@ -1,6 +1,6 @@
CountWindow < MainWindow
id: countWindow
text: Move Staackable Item
text: Move Stackable Item
size: 196 112
@onEscape: self:destroy()

View File

@@ -32,6 +32,10 @@ function UIGameMap:onDrop(widget, mousePos)
local item = widget.currentDragThing
local toPos = tile:getPosition()
local itemPos = item:getPosition()
if itemPos.x == toPos.x and itemPos.y == toPos.y and itemPos.z == toPos.z then return false end
if item:isStackable() and item:getCount() > 1 then
GameInterface.moveStackableItem(item, toPos)
else

View File

@@ -25,6 +25,10 @@ function UIItem:onDrop(widget, mousePos)
local item = widget.currentDragThing
local toPos = self.position
local itemPos = item:getPosition()
if itemPos.x == self.position.x and itemPos.y == self.position.y and itemPos.z == self.position.z then return false end
if item:isStackable() and item:getCount() > 1 then
GameInterface.moveStackableItem(item, toPos)
else