You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
759 B
33 lines
759 B
12 years ago
|
UIMiniWindowContainer = extends(UIWidget)
|
||
|
|
||
|
function UIMiniWindowContainer.create()
|
||
|
local container = UIMiniWindowContainer.internalCreate()
|
||
|
container:setFocusable(false)
|
||
|
container:setPhantom(true)
|
||
|
return container
|
||
|
end
|
||
|
|
||
12 years ago
|
function UIMiniWindowContainer:onDrop(widget, mousePos)
|
||
12 years ago
|
if widget:getClassName() == 'UIMiniWindow' then
|
||
12 years ago
|
local oldParent = widget:getParent()
|
||
|
if oldParent == self then
|
||
|
return true
|
||
|
end
|
||
|
|
||
|
oldParent:removeChild(widget)
|
||
|
|
||
|
if widget.movedWidget then
|
||
|
local index = self:getChildIndex(widget.movedWidget)
|
||
|
self:insertChild(index + widget.movedIndex, widget)
|
||
|
else
|
||
|
self:addChild(widget)
|
||
|
end
|
||
|
|
||
12 years ago
|
return true
|
||
|
end
|
||
12 years ago
|
end
|
||
|
|
||
12 years ago
|
function UIMiniWindowContainer:getClassName()
|
||
|
return 'UIMiniWindowContainer'
|
||
|
end
|