mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 12:33:01 +08:00
Add AllowUpdates flag to SongTicker
This commit is contained in:
parent
81948744d0
commit
bd33687f53
@ -237,6 +237,8 @@ namespace osu.Game.Screens.Menu
|
|||||||
buttons.State = ButtonSystemState.EnteringMode;
|
buttons.State = ButtonSystemState.EnteringMode;
|
||||||
|
|
||||||
songTicker.Hide();
|
songTicker.Hide();
|
||||||
|
songTicker.AllowUpdates = false;
|
||||||
|
|
||||||
this.FadeOut(FADE_OUT_DURATION, Easing.InSine);
|
this.FadeOut(FADE_OUT_DURATION, Easing.InSine);
|
||||||
buttonsContainer.MoveTo(new Vector2(-800, 0), FADE_OUT_DURATION, Easing.InSine);
|
buttonsContainer.MoveTo(new Vector2(-800, 0), FADE_OUT_DURATION, Easing.InSine);
|
||||||
|
|
||||||
@ -246,7 +248,8 @@ namespace osu.Game.Screens.Menu
|
|||||||
public override void OnResuming(IScreen last)
|
public override void OnResuming(IScreen last)
|
||||||
{
|
{
|
||||||
base.OnResuming(last);
|
base.OnResuming(last);
|
||||||
songTicker.Hide();
|
|
||||||
|
songTicker.AllowUpdates = true;
|
||||||
|
|
||||||
(Background as BackgroundScreenDefault)?.Next();
|
(Background as BackgroundScreenDefault)?.Next();
|
||||||
|
|
||||||
|
@ -17,6 +17,8 @@ namespace osu.Game.Screens.Menu
|
|||||||
{
|
{
|
||||||
private const int fade_duration = 800;
|
private const int fade_duration = 800;
|
||||||
|
|
||||||
|
public bool AllowUpdates { get; set; } = true;
|
||||||
|
|
||||||
[Resolved]
|
[Resolved]
|
||||||
private Bindable<WorkingBeatmap> beatmap { get; set; }
|
private Bindable<WorkingBeatmap> beatmap { get; set; }
|
||||||
|
|
||||||
@ -56,6 +58,9 @@ namespace osu.Game.Screens.Menu
|
|||||||
|
|
||||||
private void onBeatmapChanged(ValueChangedEvent<WorkingBeatmap> working)
|
private void onBeatmapChanged(ValueChangedEvent<WorkingBeatmap> working)
|
||||||
{
|
{
|
||||||
|
if (!AllowUpdates)
|
||||||
|
return;
|
||||||
|
|
||||||
var metadata = working.NewValue.Metadata;
|
var metadata = working.NewValue.Metadata;
|
||||||
|
|
||||||
title.Text = new LocalisedString((metadata.TitleUnicode, metadata.Title));
|
title.Text = new LocalisedString((metadata.TitleUnicode, metadata.Title));
|
||||||
|
Loading…
Reference in New Issue
Block a user