continuous painting with brush
This commit is contained in:
@@ -51,18 +51,16 @@ namespace OpenRA.Editor
|
|||||||
Invalidate();
|
Invalidate();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
if (e.Button == MouseButtons.Left && Brush.Second != null)
|
||||||
|
DrawWithBrush();
|
||||||
|
|
||||||
if (Brush.Second != null)
|
if (Brush.Second != null)
|
||||||
Invalidate();
|
Invalidate();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected override void OnMouseDown(MouseEventArgs e)
|
void DrawWithBrush()
|
||||||
{
|
|
||||||
base.OnMouseDown(e);
|
|
||||||
|
|
||||||
if (e.Button == MouseButtons.Right)
|
|
||||||
Brush = Pair.New((ushort)0, null as Bitmap);
|
|
||||||
|
|
||||||
if (e.Button == MouseButtons.Left && Brush.Second != null)
|
|
||||||
{
|
{
|
||||||
// change the bits in the map
|
// change the bits in the map
|
||||||
var tile = TileSet.tiles[Brush.First];
|
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();
|
Invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user