mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 16:27:26 +08:00
Some animation adjustments
This commit is contained in:
parent
7716a555ec
commit
d59cae33d3
@ -70,6 +70,7 @@ namespace osu.Game.Screens.Menu
|
||||
private ExitConfirmOverlay exitConfirmOverlay;
|
||||
|
||||
private ParallaxContainer buttonsContainer;
|
||||
private SongTicker songTicker;
|
||||
|
||||
[BackgroundDependencyLoader(true)]
|
||||
private void load(DirectOverlay direct, SettingsOverlay settings, OsuConfigManager config, SessionStatics statics)
|
||||
@ -77,7 +78,7 @@ namespace osu.Game.Screens.Menu
|
||||
holdDelay = config.GetBindable<float>(OsuSetting.UIHoldActivationDelay);
|
||||
loginDisplayed = statics.GetBindable<bool>(Static.LoginOverlayDisplayed);
|
||||
|
||||
AddInternal(new SongTicker
|
||||
AddInternal(songTicker = new SongTicker
|
||||
{
|
||||
Anchor = Anchor.TopRight,
|
||||
Origin = Anchor.TopRight,
|
||||
@ -235,6 +236,7 @@ namespace osu.Game.Screens.Menu
|
||||
|
||||
buttons.State = ButtonSystemState.EnteringMode;
|
||||
|
||||
songTicker.Hide();
|
||||
this.FadeOut(FADE_OUT_DURATION, Easing.InSine);
|
||||
buttonsContainer.MoveTo(new Vector2(-800, 0), FADE_OUT_DURATION, Easing.InSine);
|
||||
|
||||
@ -244,6 +246,7 @@ namespace osu.Game.Screens.Menu
|
||||
public override void OnResuming(IScreen last)
|
||||
{
|
||||
base.OnResuming(last);
|
||||
songTicker.Hide();
|
||||
|
||||
(Background as BackgroundScreenDefault)?.Next();
|
||||
|
||||
@ -272,6 +275,7 @@ namespace osu.Game.Screens.Menu
|
||||
|
||||
buttons.State = ButtonSystemState.Exit;
|
||||
this.FadeOut(3000);
|
||||
songTicker.Hide();
|
||||
return base.OnExiting(next);
|
||||
}
|
||||
|
||||
|
@ -14,7 +14,7 @@ namespace osu.Game.Screens.Menu
|
||||
{
|
||||
public class SongTicker : Container
|
||||
{
|
||||
private const int duration = 500;
|
||||
private const int fade_duration = 800;
|
||||
|
||||
[Resolved]
|
||||
private Bindable<WorkingBeatmap> beatmap { get; set; }
|
||||
@ -60,7 +60,7 @@ namespace osu.Game.Screens.Menu
|
||||
title.Text = working.NewValue?.Metadata?.Title;
|
||||
artist.Text = working.NewValue?.Metadata?.Artist;
|
||||
|
||||
this.FadeIn(duration, Easing.OutQuint).Delay(4000).Then().FadeOut(duration, Easing.OutQuint);
|
||||
this.FadeIn(fade_duration, Easing.OutQuint).Delay(4000).Then().FadeOut(fade_duration, Easing.OutQuint);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user