1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-26 15:53:29 +08:00

scale down graph from bleeding through border

This commit is contained in:
Nitrous 2022-07-27 14:35:18 +08:00
parent d8e605d8aa
commit a12676c25d
No known key found for this signature in database
GPG Key ID: 85EC4A6AE8F69D64

View File

@ -44,10 +44,16 @@ namespace osu.Game.Skinning
InternalChildren = new Drawable[] InternalChildren = new Drawable[]
{ {
pie = new CircularProgress new Container
{ {
Size = new Vector2(0.95f),
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Alpha = 0.5f, Child = pie = new CircularProgress
{
RelativeSizeAxes = Axes.Both,
},
}, },
new CircularContainer new CircularContainer
{ {
@ -91,14 +97,14 @@ namespace osu.Game.Skinning
{ {
pie.Scale = new Vector2(-1, 1); pie.Scale = new Vector2(-1, 1);
pie.Anchor = Anchor.TopRight; pie.Anchor = Anchor.TopRight;
pie.Colour = Colour4.LimeGreen; pie.Colour = new Colour4(199, 255, 47, 153);
pie.Current.Value = 1 - Math.Clamp((gameplayTime - firstEventTime) / (firstHitTime - firstEventTime), 0, 1); pie.Current.Value = 1 - Math.Clamp((gameplayTime - firstEventTime) / (firstHitTime - firstEventTime), 0, 1);
} }
else else
{ {
pie.Scale = new Vector2(1); pie.Scale = new Vector2(1);
pie.Anchor = Anchor.TopLeft; pie.Anchor = Anchor.TopLeft;
pie.Colour = Colour4.White; pie.Colour = new Colour4(255, 255, 255, 153);
pie.Current.Value = Math.Clamp((gameplayTime - firstHitTime) / (lastHitTime - firstHitTime), 0, 1); pie.Current.Value = Math.Clamp((gameplayTime - firstHitTime) / (lastHitTime - firstHitTime), 0, 1);
} }
} }