1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 21:02:55 +08:00

Demote medal "overlay" to animation

I need the actual overlay to be doing way more things (receiving the
actual websocket events, queueing the medals for display, handling
activation mode), so the pre-existing API design of the overlay just
will not fly.
This commit is contained in:
Bartłomiej Dach 2024-02-20 12:03:12 +01:00
parent 48bf9680e1
commit 4911f5208b
No known key found for this signature in database
3 changed files with 6 additions and 6 deletions

View File

@ -14,7 +14,7 @@ namespace osu.Game.Tests.Visual.Gameplay
{ {
AddStep(@"display", () => AddStep(@"display", () =>
{ {
LoadComponentAsync(new MedalOverlay(new Medal LoadComponentAsync(new MedalAnimation(new Medal
{ {
Name = @"Animations", Name = @"Animations",
InternalName = @"all-intro-doubletime", InternalName = @"all-intro-doubletime",

View File

@ -27,7 +27,7 @@ using osu.Framework.Utils;
namespace osu.Game.Overlays namespace osu.Game.Overlays
{ {
public partial class MedalOverlay : FocusedOverlayContainer public partial class MedalAnimation : VisibilityContainer
{ {
public const float DISC_SIZE = 400; public const float DISC_SIZE = 400;
@ -45,7 +45,7 @@ namespace osu.Game.Overlays
private readonly Container content; private readonly Container content;
public MedalOverlay(Medal medal) public MedalAnimation(Medal medal)
{ {
this.medal = medal; this.medal = medal;
RelativeSizeAxes = Axes.Both; RelativeSizeAxes = Axes.Both;

View File

@ -38,7 +38,7 @@ namespace osu.Game.Overlays.MedalSplash
public DrawableMedal(Medal medal) public DrawableMedal(Medal medal)
{ {
this.medal = medal; this.medal = medal;
Position = new Vector2(0f, MedalOverlay.DISC_SIZE / 2); Position = new Vector2(0f, MedalAnimation.DISC_SIZE / 2);
FillFlowContainer infoFlow; FillFlowContainer infoFlow;
Children = new Drawable[] Children = new Drawable[]
@ -174,7 +174,7 @@ namespace osu.Game.Overlays.MedalSplash
.ScaleTo(1); .ScaleTo(1);
this.ScaleTo(scale_when_unlocked, duration, Easing.OutExpo); this.ScaleTo(scale_when_unlocked, duration, Easing.OutExpo);
this.MoveToY(MedalOverlay.DISC_SIZE / 2 - 30, duration, Easing.OutExpo); this.MoveToY(MedalAnimation.DISC_SIZE / 2 - 30, duration, Easing.OutExpo);
unlocked.FadeInFromZero(duration); unlocked.FadeInFromZero(duration);
break; break;
@ -184,7 +184,7 @@ namespace osu.Game.Overlays.MedalSplash
.ScaleTo(1); .ScaleTo(1);
this.ScaleTo(scale_when_full, duration, Easing.OutExpo); this.ScaleTo(scale_when_full, duration, Easing.OutExpo);
this.MoveToY(MedalOverlay.DISC_SIZE / 2 - 60, duration, Easing.OutExpo); this.MoveToY(MedalAnimation.DISC_SIZE / 2 - 60, duration, Easing.OutExpo);
unlocked.Show(); unlocked.Show();
name.FadeInFromZero(duration + 100); name.FadeInFromZero(duration + 100);
description.FadeInFromZero(duration * 2); description.FadeInFromZero(duration * 2);