Merge branch 'development' into EngineAPI-Refactor

This commit is contained in:
Areloch 2018-12-09 14:48:50 -06:00 committed by GitHub
commit 6cf0c9e360
1933 changed files with 102328 additions and 70545 deletions

View file

@ -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 ) );
}
}
}