items movement fixed, spinbox style changed

master
Henrique Santiago 12 years ago
parent 8cc0aaae23
commit fba5f188d7

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

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

@ -32,6 +32,10 @@ function UIGameMap:onDrop(widget, mousePos)
local item = widget.currentDragThing local item = widget.currentDragThing
local toPos = tile:getPosition() 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 if item:isStackable() and item:getCount() > 1 then
GameInterface.moveStackableItem(item, toPos) GameInterface.moveStackableItem(item, toPos)
else else

@ -25,6 +25,10 @@ function UIItem:onDrop(widget, mousePos)
local item = widget.currentDragThing local item = widget.currentDragThing
local toPos = self.position 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 if item:isStackable() and item:getCount() > 1 then
GameInterface.moveStackableItem(item, toPos) GameInterface.moveStackableItem(item, toPos)
else else

Loading…
Cancel
Save