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:
parent
e6f273d5e1
commit
b58c438015
|
@ -3,6 +3,7 @@ UIMiniWindow = extends(UIWindow, "UIMiniWindow")
|
||||||
|
|
||||||
function UIMiniWindow.create()
|
function UIMiniWindow.create()
|
||||||
local miniwindow = UIMiniWindow.internalCreate()
|
local miniwindow = UIMiniWindow.internalCreate()
|
||||||
|
miniwindow.UIMiniWindowContainer = true
|
||||||
return miniwindow
|
return miniwindow
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -83,7 +83,7 @@ function UIMiniWindowContainer:fitAll(noRemoveChild)
|
||||||
end
|
end
|
||||||
|
|
||||||
function UIMiniWindowContainer:onDrop(widget, mousePos)
|
function UIMiniWindowContainer:onDrop(widget, mousePos)
|
||||||
if widget:getClassName() == 'UIMiniWindow' then
|
if widget.UIMiniWindowContainer then
|
||||||
local oldParent = widget:getParent()
|
local oldParent = widget:getParent()
|
||||||
if oldParent == self then
|
if oldParent == self then
|
||||||
return true
|
return true
|
||||||
|
|
Loading…
Reference in New Issue