only change editor brushes on mouseup

let other uses of the right mouse button bubble up
This commit is contained in:
teees
2015-11-03 12:45:14 +01:00
parent eb6df6fe62
commit 2465344a20
3 changed files with 21 additions and 6 deletions

View File

@@ -88,11 +88,16 @@ namespace OpenRA.Mods.Common.Widgets
return false; return false;
if (mi.Button == MouseButton.Right) if (mi.Button == MouseButton.Right)
{
if (mi.Event == MouseInputEvent.Up)
{ {
editorWidget.ClearBrush(); editorWidget.ClearBrush();
return true; return true;
} }
return false;
}
var cell = worldRenderer.Viewport.ViewToWorld(mi.Location); var cell = worldRenderer.Viewport.ViewToWorld(mi.Location);
if (mi.Button == MouseButton.Left && mi.Event == MouseInputEvent.Down) if (mi.Button == MouseButton.Left && mi.Event == MouseInputEvent.Down)
{ {

View File

@@ -63,11 +63,16 @@ namespace OpenRA.Mods.Common.Widgets
return false; return false;
if (mi.Button == MouseButton.Right) if (mi.Button == MouseButton.Right)
{
if (mi.Event == MouseInputEvent.Up)
{ {
editorWidget.ClearBrush(); editorWidget.ClearBrush();
return true; return true;
} }
return false;
}
var cell = worldRenderer.Viewport.ViewToWorld(mi.Location); var cell = worldRenderer.Viewport.ViewToWorld(mi.Location);
if (mi.Button == MouseButton.Left && AllowResourceAt(cell)) if (mi.Button == MouseButton.Left && AllowResourceAt(cell))

View File

@@ -63,11 +63,16 @@ namespace OpenRA.Mods.Common.Widgets
return false; return false;
if (mi.Button == MouseButton.Right) if (mi.Button == MouseButton.Right)
{
if (mi.Event == MouseInputEvent.Up)
{ {
editorWidget.ClearBrush(); editorWidget.ClearBrush();
return true; return true;
} }
return false;
}
if (mi.Button == MouseButton.Left) if (mi.Button == MouseButton.Left)
{ {
if (mi.Event == MouseInputEvent.Down) if (mi.Event == MouseInputEvent.Down)