continuous painting with brush

This commit is contained in:
Chris Forbes
2010-05-09 13:47:35 +12:00
parent 5be3da3d12
commit 12b6980402

View File

@@ -51,18 +51,16 @@ namespace OpenRA.Editor
Invalidate();
}
else
{
if (e.Button == MouseButtons.Left && Brush.Second != null)
DrawWithBrush();
if (Brush.Second != null)
Invalidate();
}
}
protected override void OnMouseDown(MouseEventArgs e)
{
base.OnMouseDown(e);
if (e.Button == MouseButtons.Right)
Brush = Pair.New((ushort)0, null as Bitmap);
if (e.Button == MouseButtons.Left && Brush.Second != null)
void DrawWithBrush()
{
// change the bits in the map
var tile = TileSet.tiles[Brush.First];
@@ -89,6 +87,16 @@ namespace OpenRA.Editor
}
}
protected override void OnMouseDown(MouseEventArgs e)
{
base.OnMouseDown(e);
if (e.Button == MouseButtons.Right)
Brush = Pair.New((ushort)0, null as Bitmap);
if (e.Button == MouseButtons.Left && Brush.Second != null)
DrawWithBrush();
Invalidate();
}