Few minor fixes from previous commit.
This commit is contained in:
parent
8850528091
commit
935ca87d16
|
@ -23,16 +23,16 @@ function UIItem:onDrop(widget, mousePos)
|
|||
|
||||
if not widget or not widget.currentDragThing then return false end
|
||||
|
||||
local thing = widget.currentDragThing
|
||||
local item = widget.currentDragThing
|
||||
local toPos = self.position
|
||||
|
||||
local thingPos = thing:getPosition()
|
||||
if thingPos.x == toPos.x and thingPos.y == toPos.y and thingPos.z == toPos.z then return false end
|
||||
local itemPos = item:getPosition()
|
||||
if itemPos.x == toPos.x and itemPos.y == toPos.y and itemPos.z == toPos.z then return false end
|
||||
|
||||
if thing:getCount() > 1 then
|
||||
GameInterface.moveStackableItem(thing, toPos)
|
||||
if item:getCount() > 1 then
|
||||
GameInterface.moveStackableItem(item, toPos)
|
||||
else
|
||||
g_game.move(thing, toPos, 1)
|
||||
g_game.move(item, toPos, 1)
|
||||
end
|
||||
|
||||
self:setBorderWidth(0)
|
||||
|
|
|
@ -137,11 +137,11 @@ function Minimap.onButtonClick(id)
|
|||
minimapWidget:setZoom(math.max(minimapWidget:getMaxZoomIn(), minimapWidget:getZoom()-15))
|
||||
elseif id == "zoomOut" then
|
||||
minimapWidget:setZoom(math.min(minimapWidget:getMaxZoomOut(), minimapWidget:getZoom()+15))
|
||||
elseif id == "levelUp" then
|
||||
elseif id == "floorUp" then
|
||||
local pos = minimapWidget:getCameraPosition()
|
||||
pos.z = pos.z - 1
|
||||
minimapWidget:setCameraPosition(pos)
|
||||
elseif id == "levelDown" then
|
||||
elseif id == "floorDown" then
|
||||
local pos = minimapWidget:getCameraPosition()
|
||||
pos.z = pos.z + 1
|
||||
minimapWidget:setCameraPosition(pos)
|
||||
|
|
|
@ -78,7 +78,7 @@ MiniWindow
|
|||
image-color: #ffffff88
|
||||
|
||||
FloorUpControl
|
||||
id: levelUp
|
||||
id: floorUp
|
||||
anchors.left: minimap.right
|
||||
anchors.top: compass.bottom
|
||||
margin-top: 10
|
||||
|
@ -87,9 +87,9 @@ MiniWindow
|
|||
@onClick: Minimap.onButtonClick(self:getId())
|
||||
|
||||
FloorDownControl
|
||||
id: levelDown
|
||||
anchors.left: levelUp.left
|
||||
anchors.top: levelUp.bottom
|
||||
id: floorDown
|
||||
anchors.left: floorUp.left
|
||||
anchors.top: floorUp.bottom
|
||||
margin-top: 4
|
||||
enabled: true
|
||||
@onClick: Minimap.onButtonClick(self:getId())
|
||||
|
@ -98,8 +98,8 @@ MiniWindow
|
|||
id: zoomIn
|
||||
text: +
|
||||
size: 16 16
|
||||
anchors.left: levelUp.right
|
||||
anchors.top: levelUp.top
|
||||
anchors.left: floorUp.right
|
||||
anchors.top: floorUp.top
|
||||
margin-left: 10
|
||||
enabled: true
|
||||
@onClick: Minimap.onButtonClick(self:getId())
|
||||
|
@ -109,8 +109,8 @@ MiniWindow
|
|||
text: -
|
||||
font: terminus-14px-bold
|
||||
size: 16 16
|
||||
anchors.left: levelDown.right
|
||||
anchors.top: levelDown.top
|
||||
anchors.left: floorDown.right
|
||||
anchors.top: floorDown.top
|
||||
margin-left: 10
|
||||
enabled: true
|
||||
@onClick: Minimap.onButtonClick(self:getId())
|
||||
|
|
Loading…
Reference in New Issue