some window moving

This commit is contained in:
Eduardo Bart
2012-02-06 22:41:53 -02:00
parent 08a88e3842
commit 46df3c7dbe
43 changed files with 165 additions and 51 deletions

View File

@@ -12,7 +12,7 @@ function UIItem:onDragEnter(mousePos)
return true
end
function UIItem:onDragLeave(widget, mousePos)
function UIItem:onDragLeave(droppedWidget, mousePos)
if self:isVirtual() then return false end
if not self.parsed then
@@ -53,8 +53,9 @@ end
function UIItem:onHoverChange(hovered)
if self:isVirtual() then return end
if g_ui.getDraggingWidget() and self ~= g_ui.getDraggingWidget() then
if hovered then
local dragginWidget = g_ui.getDraggingWidget()
if dragginWidget and self ~= dragginWidget then
if dragginWidget:getClassName() == 'UIItem' and not dragginWidget:isVirtual() and hovered then
self:setBorderWidth(1)
else
self:setBorderWidth(0)