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.
master
EgzoT 6 年前 提交者 Ahmed Samy
父节点 e6f273d5e1
当前提交 b58c438015

@ -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

正在加载...
取消
保存