mirror of
https://github.com/ppy/osu.git
synced 2025-03-23 08:27:23 +08:00
Reduce size of paths
This commit is contained in:
parent
eb0f0aefba
commit
89c68c78d1
@ -25,6 +25,7 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
Vector2 getCenteredVector(Vector2 top, Vector2 bottom) => new Vector2(top.X, top.Y + (bottom.Y - top.Y) / 2);
|
||||
|
||||
var q1 = Source.ScreenSpaceDrawQuad;
|
||||
@ -56,7 +57,15 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
|
||||
var p3 = new Vector2(p2.X, c2.Y);
|
||||
var p4 = new Vector2(c2.X, p3.Y);
|
||||
|
||||
Vertices = new[] { p1, p2, p3, p4 }.Select(ToLocalSpace).ToList();
|
||||
var points = new[] { p1, p2, p3, p4 };
|
||||
|
||||
float minX = points.Min(p => p.X);
|
||||
float minY = points.Min(p => p.Y);
|
||||
|
||||
var topLeft = new Vector2(minX, minY);
|
||||
|
||||
Position = Parent.ToLocalSpace(topLeft);
|
||||
Vertices = points.Select(p => Parent.ToLocalSpace(p) - Parent.ToLocalSpace(topLeft)).ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user