diff --git a/OpenRA.Game/Widgets/Widget.cs b/OpenRA.Game/Widgets/Widget.cs index 39bd0e3415..9154244b39 100644 --- a/OpenRA.Game/Widgets/Widget.cs +++ b/OpenRA.Game/Widgets/Widget.cs @@ -493,6 +493,8 @@ namespace OpenRA.Widgets public class ContainerWidget : Widget { + public readonly bool ClickThrough = true; + public ContainerWidget() { IgnoreMouseOver = true; } public ContainerWidget(ContainerWidget other) : base(other) { IgnoreMouseOver = true; } @@ -501,6 +503,11 @@ namespace OpenRA.Widgets public override Widget Clone() { return new ContainerWidget(this); } public Func OnKeyPress = _ => false; public override bool HandleKeyPress(KeyInput e) { return OnKeyPress(e); } + + public override bool HandleMouseInput(MouseInput mi) + { + return !ClickThrough && EventBounds.Contains(mi.Location); + } } public class WidgetArgs : Dictionary