From a44e956ed93699f2f7a0bfbb1f7bb48b0c5ef4b3 Mon Sep 17 00:00:00 2001 From: Ivaylo Draganov Date: Fri, 27 Sep 2024 17:35:09 +0300 Subject: [PATCH] Simplify mouse input handling check in `BakgroundWidget` Make it the same as in `ContainerWidget`. --- OpenRA.Mods.Common/Widgets/BackgroundWidget.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/OpenRA.Mods.Common/Widgets/BackgroundWidget.cs b/OpenRA.Mods.Common/Widgets/BackgroundWidget.cs index 5d2614df67..3b785a00ff 100644 --- a/OpenRA.Mods.Common/Widgets/BackgroundWidget.cs +++ b/OpenRA.Mods.Common/Widgets/BackgroundWidget.cs @@ -27,10 +27,7 @@ namespace OpenRA.Mods.Common.Widgets public override bool HandleMouseInput(MouseInput mi) { - if (ClickThrough || !RenderBounds.Contains(mi.Location)) - return false; - - return true; + return !ClickThrough && EventBounds.Contains(mi.Location); } protected BackgroundWidget(BackgroundWidget other)