mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 19:22:56 +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()
|
protected override void LoadComplete()
|
||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
|
|
||||||
State = Visibility.Visible;
|
|
||||||
AlwaysPresent = true;
|
AlwaysPresent = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -127,7 +127,6 @@ namespace osu.Game.Screens.Select
|
|||||||
Top = left_area_padding,
|
Top = left_area_padding,
|
||||||
Right = left_area_padding,
|
Right = left_area_padding,
|
||||||
},
|
},
|
||||||
X = -50,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (ShowFooter)
|
if (ShowFooter)
|
||||||
@ -232,23 +231,25 @@ namespace osu.Game.Screens.Select
|
|||||||
{
|
{
|
||||||
base.OnEntering(last);
|
base.OnEntering(last);
|
||||||
|
|
||||||
ensurePlayingSelected();
|
//if (Beatmap != null && !Beatmap.BeatmapSetInfo.DeletePending)
|
||||||
|
//{
|
||||||
changeBackground(Beatmap);
|
// OnBeatmapChanged(Beatmap);
|
||||||
|
// ensurePlayingSelected();
|
||||||
selectionChangeNoBounce = Beatmap?.BeatmapInfo;
|
//}
|
||||||
|
|
||||||
Content.FadeInFromZero(250);
|
Content.FadeInFromZero(250);
|
||||||
|
|
||||||
beatmapInfoWedge.State = Visibility.Visible;
|
|
||||||
|
|
||||||
FilterControl.Activate();
|
FilterControl.Activate();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnResuming(Screen last)
|
protected override void OnResuming(Screen last)
|
||||||
{
|
{
|
||||||
changeBackground(Beatmap);
|
if (Beatmap != null && !Beatmap.BeatmapSetInfo.DeletePending)
|
||||||
ensurePlayingSelected();
|
{
|
||||||
|
changeBackground(Beatmap);
|
||||||
|
ensurePlayingSelected();
|
||||||
|
}
|
||||||
|
|
||||||
base.OnResuming(last);
|
base.OnResuming(last);
|
||||||
|
|
||||||
Content.FadeIn(250);
|
Content.FadeIn(250);
|
||||||
@ -301,6 +302,7 @@ namespace osu.Game.Screens.Select
|
|||||||
backgroundModeBeatmap.FadeTo(1, 250);
|
backgroundModeBeatmap.FadeTo(1, 250);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
beatmapInfoWedge.State = Visibility.Visible;
|
||||||
beatmapInfoWedge.UpdateBeatmap(beatmap);
|
beatmapInfoWedge.UpdateBeatmap(beatmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -328,7 +330,7 @@ namespace osu.Game.Screens.Select
|
|||||||
{
|
{
|
||||||
selectionChangedDebounce?.Cancel();
|
selectionChangedDebounce?.Cancel();
|
||||||
|
|
||||||
if (beatmap.Equals(Beatmap?.BeatmapInfo))
|
if (beatmap.Equals(selectionChangeNoBounce))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
bool preview = beatmap.BeatmapSetInfoID != Beatmap?.BeatmapInfo.BeatmapSetInfoID;
|
bool preview = beatmap.BeatmapSetInfoID != Beatmap?.BeatmapInfo.BeatmapSetInfoID;
|
||||||
|
Loading…
Reference in New Issue
Block a user