diff --git a/OpenRA.Game/Widgets/ButtonWidget.cs b/OpenRA.Game/Widgets/ButtonWidget.cs index ef51fa3f66..861edfdd66 100644 --- a/OpenRA.Game/Widgets/ButtonWidget.cs +++ b/OpenRA.Game/Widgets/ButtonWidget.cs @@ -110,7 +110,7 @@ namespace OpenRA.Widgets } } else if (mi.Event == MouseInputEvent.Move && Focused) - Depressed = RenderBounds.Contains(mi.Location.X, mi.Location.Y); + Depressed = RenderBounds.Contains(mi.Location); return Depressed; } diff --git a/OpenRA.Game/Widgets/ScrollPanelWidget.cs b/OpenRA.Game/Widgets/ScrollPanelWidget.cs index 46376ac333..788cbe4c27 100644 --- a/OpenRA.Game/Widgets/ScrollPanelWidget.cs +++ b/OpenRA.Game/Widgets/ScrollPanelWidget.cs @@ -178,9 +178,9 @@ namespace OpenRA.Widgets } else { - UpPressed = upButtonRect.Contains(mi.Location.X, mi.Location.Y); - DownPressed = downButtonRect.Contains(mi.Location.X, mi.Location.Y); - ThumbPressed = thumbRect.Contains(mi.Location.X, mi.Location.Y); + UpPressed = upButtonRect.Contains(mi.Location); + DownPressed = downButtonRect.Contains(mi.Location); + ThumbPressed = thumbRect.Contains(mi.Location); if (ThumbPressed) lastMouseLocation = mi.Location; } diff --git a/OpenRA.Game/Widgets/SliderWidget.cs b/OpenRA.Game/Widgets/SliderWidget.cs index 06763d34fa..3e1e2cf60b 100755 --- a/OpenRA.Game/Widgets/SliderWidget.cs +++ b/OpenRA.Game/Widgets/SliderWidget.cs @@ -150,7 +150,7 @@ namespace OpenRA.Widgets break; } - return thumbRect.Contains(mi.Location.X, mi.Location.Y); + return thumbRect.Contains(mi.Location); } float OffsetBy(float amount) diff --git a/OpenRA.Game/Widgets/Widget.cs b/OpenRA.Game/Widgets/Widget.cs index f36b56d847..3c9d458604 100644 --- a/OpenRA.Game/Widgets/Widget.cs +++ b/OpenRA.Game/Widgets/Widget.cs @@ -286,7 +286,7 @@ namespace OpenRA.Widgets public bool HandleMouseInputOuter(MouseInput mi) { // Are we able to handle this event? - if (!(Focused || (IsVisible() && GetEventBounds().Contains(mi.Location.X, mi.Location.Y)))) + if (!(Focused || (IsVisible() && GetEventBounds().Contains(mi.Location)))) return false; var oldMouseOver = MouseOverWidget;