diff --git a/OpenRA.Game/Widgets/ImageWidget.cs b/OpenRA.Game/Widgets/ImageWidget.cs index 90192f8419..f53f793c08 100644 --- a/OpenRA.Game/Widgets/ImageWidget.cs +++ b/OpenRA.Game/Widgets/ImageWidget.cs @@ -17,6 +17,7 @@ namespace OpenRA.Widgets { public string ImageCollection = ""; public string ImageName = ""; + public bool ClickThrough = true; public Func GetImageName; public Func GetImageCollection; @@ -29,6 +30,7 @@ namespace OpenRA.Widgets protected ImageWidget(ImageWidget other) : base(other) { + ClickThrough = other.ClickThrough; ImageName = other.ImageName; GetImageName = other.GetImageName; ImageCollection = other.ImageCollection; @@ -48,5 +50,10 @@ namespace OpenRA.Widgets WidgetUtils.DrawRGBA(sprite, RenderOrigin); } + + public override bool HandleMouseInput(MouseInput mi) + { + return !ClickThrough && RenderBounds.Contains(mi.Location); + } } }