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