only change editor brushes on mouseup
let other uses of the right mouse button bubble up
This commit is contained in:
@@ -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)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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))
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user