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)
|
else if (mi.Event == MouseInputEvent.Move && Focused)
|
||||||
Depressed = RenderBounds.Contains(mi.Location.X, mi.Location.Y);
|
Depressed = RenderBounds.Contains(mi.Location);
|
||||||
|
|
||||||
return Depressed;
|
return Depressed;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -178,9 +178,9 @@ namespace OpenRA.Widgets
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
UpPressed = upButtonRect.Contains(mi.Location.X, mi.Location.Y);
|
UpPressed = upButtonRect.Contains(mi.Location);
|
||||||
DownPressed = downButtonRect.Contains(mi.Location.X, mi.Location.Y);
|
DownPressed = downButtonRect.Contains(mi.Location);
|
||||||
ThumbPressed = thumbRect.Contains(mi.Location.X, mi.Location.Y);
|
ThumbPressed = thumbRect.Contains(mi.Location);
|
||||||
if (ThumbPressed)
|
if (ThumbPressed)
|
||||||
lastMouseLocation = mi.Location;
|
lastMouseLocation = mi.Location;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ namespace OpenRA.Widgets
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return thumbRect.Contains(mi.Location.X, mi.Location.Y);
|
return thumbRect.Contains(mi.Location);
|
||||||
}
|
}
|
||||||
|
|
||||||
float OffsetBy(float amount)
|
float OffsetBy(float amount)
|
||||||
|
|||||||
@@ -286,7 +286,7 @@ namespace OpenRA.Widgets
|
|||||||
public bool HandleMouseInputOuter(MouseInput mi)
|
public bool HandleMouseInputOuter(MouseInput mi)
|
||||||
{
|
{
|
||||||
// Are we able to handle this event?
|
// 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;
|
return false;
|
||||||
|
|
||||||
var oldMouseOver = MouseOverWidget;
|
var oldMouseOver = MouseOverWidget;
|
||||||
|
|||||||
Reference in New Issue
Block a user