mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 02:13:21 +08:00
Simplify state changes
This commit is contained in:
parent
632d2e8ba5
commit
0846414c5b
@ -48,8 +48,6 @@ namespace osu.Game.Screens.Select
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
State = Visibility.Visible;
|
||||
AlwaysPresent = true;
|
||||
}
|
||||
|
||||
|
@ -127,7 +127,6 @@ namespace osu.Game.Screens.Select
|
||||
Top = left_area_padding,
|
||||
Right = left_area_padding,
|
||||
},
|
||||
X = -50,
|
||||
});
|
||||
|
||||
if (ShowFooter)
|
||||
@ -232,23 +231,25 @@ namespace osu.Game.Screens.Select
|
||||
{
|
||||
base.OnEntering(last);
|
||||
|
||||
ensurePlayingSelected();
|
||||
|
||||
changeBackground(Beatmap);
|
||||
|
||||
selectionChangeNoBounce = Beatmap?.BeatmapInfo;
|
||||
//if (Beatmap != null && !Beatmap.BeatmapSetInfo.DeletePending)
|
||||
//{
|
||||
// OnBeatmapChanged(Beatmap);
|
||||
// ensurePlayingSelected();
|
||||
//}
|
||||
|
||||
Content.FadeInFromZero(250);
|
||||
|
||||
beatmapInfoWedge.State = Visibility.Visible;
|
||||
|
||||
FilterControl.Activate();
|
||||
}
|
||||
|
||||
protected override void OnResuming(Screen last)
|
||||
{
|
||||
changeBackground(Beatmap);
|
||||
ensurePlayingSelected();
|
||||
if (Beatmap != null && !Beatmap.BeatmapSetInfo.DeletePending)
|
||||
{
|
||||
changeBackground(Beatmap);
|
||||
ensurePlayingSelected();
|
||||
}
|
||||
|
||||
base.OnResuming(last);
|
||||
|
||||
Content.FadeIn(250);
|
||||
@ -301,6 +302,7 @@ namespace osu.Game.Screens.Select
|
||||
backgroundModeBeatmap.FadeTo(1, 250);
|
||||
}
|
||||
|
||||
beatmapInfoWedge.State = Visibility.Visible;
|
||||
beatmapInfoWedge.UpdateBeatmap(beatmap);
|
||||
}
|
||||
|
||||
@ -328,7 +330,7 @@ namespace osu.Game.Screens.Select
|
||||
{
|
||||
selectionChangedDebounce?.Cancel();
|
||||
|
||||
if (beatmap.Equals(Beatmap?.BeatmapInfo))
|
||||
if (beatmap.Equals(selectionChangeNoBounce))
|
||||
return;
|
||||
|
||||
bool preview = beatmap.BeatmapSetInfoID != Beatmap?.BeatmapInfo.BeatmapSetInfoID;
|
||||
|
Loading…
Reference in New Issue
Block a user