mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 07:06:35 +09:00
Convert everything to use IScreen
This commit is contained in:
@ -88,7 +88,7 @@ namespace osu.Game.Screens.Select
|
||||
const float carousel_width = 640;
|
||||
const float filter_height = 100;
|
||||
|
||||
AddRange(new Drawable[]
|
||||
AddRangeInternal(new Drawable[]
|
||||
{
|
||||
new ParallaxContainer
|
||||
{
|
||||
@ -156,8 +156,8 @@ namespace osu.Game.Screens.Select
|
||||
Background = { Width = 2 },
|
||||
Exit = () =>
|
||||
{
|
||||
if (IsCurrentScreen)
|
||||
Exit();
|
||||
if (this.IsCurrentScreen())
|
||||
this.Exit();
|
||||
},
|
||||
},
|
||||
}
|
||||
@ -182,7 +182,7 @@ namespace osu.Game.Screens.Select
|
||||
|
||||
if (ShowFooter)
|
||||
{
|
||||
Add(FooterPanels = new Container
|
||||
AddInternal(FooterPanels = new Container
|
||||
{
|
||||
Anchor = Anchor.BottomLeft,
|
||||
Origin = Anchor.BottomLeft,
|
||||
@ -193,7 +193,7 @@ namespace osu.Game.Screens.Select
|
||||
Bottom = Footer.HEIGHT,
|
||||
},
|
||||
});
|
||||
Add(Footer = new Footer
|
||||
AddInternal(Footer = new Footer
|
||||
{
|
||||
OnBack = ExitFromBack,
|
||||
});
|
||||
@ -210,7 +210,7 @@ namespace osu.Game.Screens.Select
|
||||
});
|
||||
}
|
||||
|
||||
BeatmapDetails.Leaderboard.ScoreSelected += s => Push(new SoloResults(s));
|
||||
BeatmapDetails.Leaderboard.ScoreSelected += s =>this.Push(new SoloResults(s));
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader(true)]
|
||||
@ -281,13 +281,13 @@ namespace osu.Game.Screens.Select
|
||||
return;
|
||||
}
|
||||
|
||||
Exit();
|
||||
this.Exit();
|
||||
}
|
||||
|
||||
public void Edit(BeatmapInfo beatmap = null)
|
||||
{
|
||||
Beatmap.Value = beatmaps.GetWorkingBeatmap(beatmap ?? beatmapNoDebounce);
|
||||
Push(new Editor());
|
||||
this.Push(new Editor());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -331,7 +331,7 @@ namespace osu.Game.Screens.Select
|
||||
{
|
||||
if (beatmap is DummyWorkingBeatmap) return;
|
||||
|
||||
if (IsCurrentScreen && !Carousel.SelectBeatmap(beatmap?.BeatmapInfo, false))
|
||||
if (this.IsCurrentScreen() && !Carousel.SelectBeatmap(beatmap?.BeatmapInfo, false))
|
||||
// If selecting new beatmap without bypassing filters failed, there's possibly a ruleset mismatch
|
||||
if (beatmap?.BeatmapInfo?.Ruleset != null && beatmap.BeatmapInfo.Ruleset != Ruleset.Value)
|
||||
{
|
||||
@ -411,7 +411,7 @@ namespace osu.Game.Screens.Select
|
||||
}
|
||||
}
|
||||
|
||||
if (IsCurrentScreen) ensurePlayingSelected(preview);
|
||||
if (this.IsCurrentScreen()) ensurePlayingSelected(preview);
|
||||
UpdateBeatmap(Beatmap.Value);
|
||||
}
|
||||
|
||||
@ -431,11 +431,11 @@ namespace osu.Game.Screens.Select
|
||||
Carousel.SelectNextRandom();
|
||||
}
|
||||
|
||||
protected override void OnEntering(Screen last)
|
||||
public override void OnEntering(IScreen last)
|
||||
{
|
||||
base.OnEntering(last);
|
||||
|
||||
Content.FadeInFromZero(250);
|
||||
this.FadeInFromZero(250);
|
||||
FilterControl.Activate();
|
||||
}
|
||||
|
||||
@ -476,7 +476,7 @@ namespace osu.Game.Screens.Select
|
||||
logo.FadeOut(logo_transition / 2, Easing.Out);
|
||||
}
|
||||
|
||||
protected override void OnResuming(Screen last)
|
||||
public override void OnResuming(IScreen last)
|
||||
{
|
||||
BeatmapDetails.Leaderboard.RefreshScores();
|
||||
|
||||
@ -490,26 +490,26 @@ namespace osu.Game.Screens.Select
|
||||
|
||||
base.OnResuming(last);
|
||||
|
||||
Content.FadeIn(250);
|
||||
this.FadeIn(250);
|
||||
|
||||
Content.ScaleTo(1, 250, Easing.OutSine);
|
||||
this.ScaleTo(1, 250, Easing.OutSine);
|
||||
|
||||
FilterControl.Activate();
|
||||
}
|
||||
|
||||
protected override void OnSuspending(Screen next)
|
||||
public override void OnSuspending(IScreen next)
|
||||
{
|
||||
ModSelect.Hide();
|
||||
|
||||
Content.ScaleTo(1.1f, 250, Easing.InSine);
|
||||
this.ScaleTo(1.1f, 250, Easing.InSine);
|
||||
|
||||
Content.FadeOut(250);
|
||||
this.FadeOut(250);
|
||||
|
||||
FilterControl.Deactivate();
|
||||
base.OnSuspending(next);
|
||||
}
|
||||
|
||||
protected override bool OnExiting(Screen next)
|
||||
public override bool OnExiting(IScreen next)
|
||||
{
|
||||
if (ModSelect.State == Visibility.Visible)
|
||||
{
|
||||
@ -521,7 +521,7 @@ namespace osu.Game.Screens.Select
|
||||
|
||||
beatmapInfoWedge.State = Visibility.Hidden;
|
||||
|
||||
Content.FadeOut(100);
|
||||
this.FadeOut(100);
|
||||
|
||||
FilterControl.Deactivate();
|
||||
|
||||
@ -627,7 +627,7 @@ namespace osu.Game.Screens.Select
|
||||
|
||||
public override bool OnPressed(GlobalAction action)
|
||||
{
|
||||
if (!IsCurrentScreen) return false;
|
||||
if (!this.IsCurrentScreen()) return false;
|
||||
|
||||
switch (action)
|
||||
{
|
||||
|
Reference in New Issue
Block a user