mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-29 10:49:53 +02:00
fix wall brush displaying incorrectly when drawing boxes
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user