Made int2 struct immutable
This commit is contained in:
@@ -30,14 +30,13 @@ namespace OpenRA.Widgets
|
||||
if (pos.X + widget.ItemSpacing + w.Bounds.Width > widget.Bounds.Width - widget.ScrollbarWidth)
|
||||
{
|
||||
/* start a new row */
|
||||
pos.X = widget.ItemSpacing;
|
||||
pos.Y = widget.ContentHeight;
|
||||
pos = new int2(widget.ItemSpacing, widget.ContentHeight);
|
||||
}
|
||||
|
||||
w.Bounds.X += pos.X;
|
||||
w.Bounds.Y += pos.Y;
|
||||
|
||||
pos.X += w.Bounds.Width + widget.ItemSpacing;
|
||||
pos = pos.WithX(pos.X + w.Bounds.Width + widget.ItemSpacing);
|
||||
|
||||
widget.ContentHeight = Math.Max(widget.ContentHeight, pos.Y + widget.ItemSpacing + w.Bounds.Height);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user