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

@ -2,6 +2,7 @@ SpinBox < UISpinBox
font: verdana-11px-antialised
color: #aaaaaa
size: 86 20
text-offset: 0 3
text-margin: 3
image-source: /core_styles/styles/images/panel_flat.png
image-border: 1

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