tibia-client/modules/game/widgets/uiminiwindowcontainer.lua

33 lines
759 B
Lua
Raw Normal View History

2012-02-07 01:41:53 +01:00
UIMiniWindowContainer = extends(UIWidget)
function UIMiniWindowContainer.create()
local container = UIMiniWindowContainer.internalCreate()
container:setFocusable(false)
container:setPhantom(true)
return container
end
function UIMiniWindowContainer:onDrop(widget, mousePos)
2012-03-28 21:09:45 +02:00
if widget:getClassName() == 'UIMiniWindow' then
2012-06-11 07:38:08 +02:00
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
2012-03-28 21:09:45 +02:00
return true
end
end
2012-02-07 01:41:53 +01:00
function UIMiniWindowContainer:getClassName()
return 'UIMiniWindowContainer'
end