Set dragged widgets' coordinates based on the move rather than the mouse pointer's coords.

This commit is contained in:
dfighter1985 2014-09-24 16:31:26 +02:00
parent 574d24e5e3
commit 49d023d273

View file

@ -2633,8 +2633,11 @@ namespace NLGUI
else
if( draggedElement != NULL )
{
draggedElement->setXReal( newX );
draggedElement->setYReal( newY );
sint32 dx = newX - oldX;
sint32 dy = newY - oldY;
draggedElement->setXReal( draggedElement->getXReal() + dx );
draggedElement->setYReal( draggedElement->getYReal() + dy );
draggedElement->invalidateCoords();
}
}