Replace Rectangle widget bounds with a new WidgetBounds struct.
This commit is contained in:
@@ -225,11 +225,10 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
|
||||
// ChildOrigin enumerates the widget tree, so only evaluate it once
|
||||
var co = ChildOrigin;
|
||||
drawBounds.X -= co.X;
|
||||
drawBounds.Y -= co.Y;
|
||||
drawBounds = new Rectangle(drawBounds.X - co.X, drawBounds.Y - co.Y, drawBounds.Width, drawBounds.Height);
|
||||
|
||||
foreach (var child in Children)
|
||||
if (child.Bounds.IntersectsWith(drawBounds))
|
||||
if (child.Bounds.ToRectangle().IntersectsWith(drawBounds))
|
||||
child.DrawOuter();
|
||||
|
||||
Game.Renderer.DisableScissor();
|
||||
|
||||
Reference in New Issue
Block a user