Set dragged widgets' coordinates based on the move rather than the mouse pointer's coords.
--HG-- branch : dfighter-tools
This commit is contained in:
parent
62744db86d
commit
f9dbef7df7
1 changed files with 5 additions and 2 deletions
|
@ -2633,8 +2633,11 @@ namespace NLGUI
|
||||||
else
|
else
|
||||||
if( draggedElement != NULL )
|
if( draggedElement != NULL )
|
||||||
{
|
{
|
||||||
draggedElement->setXReal( newX );
|
sint32 dx = newX - oldX;
|
||||||
draggedElement->setYReal( newY );
|
sint32 dy = newY - oldY;
|
||||||
|
|
||||||
|
draggedElement->setXReal( draggedElement->getXReal() + dx );
|
||||||
|
draggedElement->setYReal( draggedElement->getYReal() + dy );
|
||||||
draggedElement->invalidateCoords();
|
draggedElement->invalidateCoords();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue