mirror of
https://github.com/edubart/otclient.git
synced 2025-10-15 20:14:54 +02:00
UIMiniWindowContainer small improve (#938)
Change type of checking whether window have on drop possibility. Reason: Previously this parameter was checking by class name, so it blocking creating similar objects to miniwindow or inheritance from miniwindow object without changing sources. So it block creating modules with new UI objects working with miniwindowcontainer.
This commit is contained in:
@@ -3,6 +3,7 @@ UIMiniWindow = extends(UIWindow, "UIMiniWindow")
|
||||
|
||||
function UIMiniWindow.create()
|
||||
local miniwindow = UIMiniWindow.internalCreate()
|
||||
miniwindow.UIMiniWindowContainer = true
|
||||
return miniwindow
|
||||
end
|
||||
|
||||
|
@@ -83,7 +83,7 @@ function UIMiniWindowContainer:fitAll(noRemoveChild)
|
||||
end
|
||||
|
||||
function UIMiniWindowContainer:onDrop(widget, mousePos)
|
||||
if widget:getClassName() == 'UIMiniWindow' then
|
||||
if widget.UIMiniWindowContainer then
|
||||
local oldParent = widget:getParent()
|
||||
if oldParent == self then
|
||||
return true
|
||||
|
Reference in New Issue
Block a user