fix wall brush displaying incorrectly when drawing boxes

This commit is contained in:
jacob1
2015-10-10 00:53:21 -04:00
parent bff6dedd48
commit d4e3196070

View File

@@ -2060,6 +2060,18 @@ void GameView::OnDraw()
{
finalCurrentMouse = rectSnapCoords(c->PointTranslate(initialDrawPoint), finalCurrentMouse);
}
if (wallBrush)
{
if (finalCurrentMouse.X > initialDrawPoint.X)
finalCurrentMouse.X += CELL-1;
else
initialDrawPoint.X += CELL-1;
if (finalCurrentMouse.Y > initialDrawPoint.Y)
finalCurrentMouse.Y += CELL-1;
else
initialDrawPoint.Y += CELL-1;
}
activeBrush->RenderRect(ren, c->PointTranslate(initialDrawPoint), finalCurrentMouse);
}
else if (drawMode == DrawLine && isMouseDown)