mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
gui shadowvar cleanups
This commit is contained in:
parent
2009bf1ee3
commit
342bf8f3d3
9 changed files with 40 additions and 46 deletions
|
|
@ -542,10 +542,10 @@ void GuiEditCtrl::onMouseDragged( const GuiEvent &event )
|
|||
// Snap the mouse cursor to grid if active. Do this on the mouse cursor so that we handle
|
||||
// incremental drags correctly.
|
||||
|
||||
Point2I mousePoint = event.mousePoint;
|
||||
snapToGrid( mousePoint );
|
||||
Point2I dragPoint = event.mousePoint;
|
||||
snapToGrid(dragPoint);
|
||||
|
||||
Point2I delta = mousePoint - mLastDragPos;
|
||||
Point2I delta = dragPoint - mLastDragPos;
|
||||
|
||||
// If CTRL is down, apply smart snapping.
|
||||
|
||||
|
|
@ -584,7 +584,7 @@ void GuiEditCtrl::onMouseDragged( const GuiEvent &event )
|
|||
|
||||
// Remember drag point.
|
||||
|
||||
mLastDragPos = mousePoint;
|
||||
mLastDragPos = dragPoint;
|
||||
}
|
||||
else if (mMouseDownMode == MovingSelection && mSelectedControls.size())
|
||||
{
|
||||
|
|
@ -770,7 +770,7 @@ void GuiEditCtrl::onRender(Point2I offset, const RectI &updateRect)
|
|||
( mMouseDownMode == MovingSelection || mMouseDownMode == SizingSelection ) &&
|
||||
( mGridSnap.x || mGridSnap.y ) )
|
||||
{
|
||||
Point2I cext = getContentControl()->getExtent();
|
||||
cext = getContentControl()->getExtent();
|
||||
Point2I coff = getContentControl()->localToGlobalCoord(Point2I(0,0));
|
||||
|
||||
// create point-dots
|
||||
|
|
@ -847,8 +847,8 @@ void GuiEditCtrl::onRender(Point2I offset, const RectI &updateRect)
|
|||
|
||||
if( mSnapTargets[ axis ] )
|
||||
{
|
||||
RectI bounds = mSnapTargets[ axis ]->getGlobalBounds();
|
||||
drawer->drawRect( bounds, ColorI( 128, 128, 128, 128 ) );
|
||||
RectI snapBounds = mSnapTargets[ axis ]->getGlobalBounds();
|
||||
drawer->drawRect(snapBounds, ColorI( 128, 128, 128, 128 ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue