mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-27 09:36:15 +00:00
Set dragged widgets' coordinates based on the move rather than the mouse pointer's coords.
This commit is contained in:
parent
b92159a98a
commit
40ccff720d
1 changed files with 5 additions and 2 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue