mirror of
https://github.com/edubart/otclient.git
synced 2025-10-15 12:04:55 +02:00
More fixes for 9.6
And add ping bindings :D
This commit is contained in:
@@ -11,21 +11,21 @@ end
|
||||
|
||||
function UIMiniWindowContainer:onDrop(widget, mousePos)
|
||||
if widget:getClassName() == 'UIMiniWindow' then
|
||||
local oldParent = widget:getParent()
|
||||
if oldParent == self then
|
||||
return true
|
||||
end
|
||||
|
||||
if oldParent then
|
||||
oldParent:removeChild(widget)
|
||||
local oldParent = widget:getParent()
|
||||
if oldParent == self then
|
||||
return true
|
||||
end
|
||||
|
||||
if widget.movedWidget then
|
||||
local index = self:getChildIndex(widget.movedWidget)
|
||||
self:insertChild(index + widget.movedIndex, widget)
|
||||
else
|
||||
self:addChild(widget)
|
||||
end
|
||||
if oldParent then
|
||||
oldParent:removeChild(widget)
|
||||
end
|
||||
|
||||
if widget.movedWidget then
|
||||
local index = self:getChildIndex(widget.movedWidget)
|
||||
self:insertChild(index + widget.movedIndex, widget)
|
||||
else
|
||||
self:addChild(widget)
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
@@ -47,7 +47,7 @@ end
|
||||
function UIMiniWindowContainer:scheduleInsert(widget, index)
|
||||
if index - 1 > self:getChildCount() then
|
||||
if self.scheduledWidgets[index] then
|
||||
warning('replacing scheduled widget id ' .. widget:getId())
|
||||
pwarning('replacing scheduled widget id ' .. widget:getId())
|
||||
end
|
||||
self.scheduledWidgets[index] = widget
|
||||
else
|
||||
|
@@ -32,7 +32,6 @@ function UIItem:onDrop(widget, mousePos)
|
||||
if itemPos.x == toPos.x and itemPos.y == toPos.y and itemPos.z == toPos.z then return false end
|
||||
|
||||
if item:getCount() > 1 then
|
||||
g_game.look(item)
|
||||
modules.game_interface.moveStackableItem(item, toPos)
|
||||
else
|
||||
g_game.move(item, toPos, 1)
|
||||
|
@@ -380,6 +380,11 @@ function onOpenNpcTrade(items)
|
||||
addEvent(show) -- player goods has not been parsed yet
|
||||
end
|
||||
|
||||
function closeNpcTrade()
|
||||
g_game.closeNpcTrade()
|
||||
hide()
|
||||
end
|
||||
|
||||
function onCloseNpcTrade()
|
||||
hide()
|
||||
end
|
||||
|
@@ -33,7 +33,7 @@ MainWindow
|
||||
id: npcWindow
|
||||
!text: tr('NPC Trade')
|
||||
size: 550 515
|
||||
@onEscape: g_game.closeNpcTrade()
|
||||
@onEscape: modules.game_npctrade.closeNpcTrade()
|
||||
|
||||
TabButton
|
||||
id: buyTab
|
||||
@@ -264,4 +264,4 @@ MainWindow
|
||||
width: 64
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
@onClick: g_game.closeNpcTrade()
|
||||
@onClick: modules.game_npctrade.closeNpcTrade()
|
||||
|
@@ -150,6 +150,7 @@ function destroy()
|
||||
currentColorBox = nil
|
||||
currentClotheButtonBox = nil
|
||||
colorBoxes = {}
|
||||
addons = nil
|
||||
end
|
||||
end
|
||||
|
||||
|
@@ -12,4 +12,4 @@ MiniWindow
|
||||
MiniWindowContents
|
||||
layout: verticalBox
|
||||
anchors.fill: parent
|
||||
@onMousePress: onVipListMousePress()
|
||||
&onMousePress: modules.game_viplist.onVipListMousePress
|
||||
|
Reference in New Issue
Block a user