continuous painting with brush
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user