Clean up some uses of rect.Contains(int2).
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user