Merge branch 'master' into correct-preview-loop

This commit is contained in:
Unknown
2019-01-31 10:52:52 +01:00
parent 1fa87521f6
commit e2347ae7bf
132 changed files with 3159 additions and 732 deletions

View File

@ -1,6 +1,8 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Screens;
namespace osu.Game.Screens.Select
{
public class EditSongSelect : SongSelect
@ -9,7 +11,7 @@ namespace osu.Game.Screens.Select
protected override bool OnStart()
{
Exit();
this.Exit();
return true;
}
}

View File

@ -3,6 +3,8 @@
using System;
using Humanizer;
using osu.Framework.Graphics;
using osu.Framework.Screens;
using osu.Game.Online.Multiplayer;
using osu.Game.Screens.Multi;
@ -15,6 +17,11 @@ namespace osu.Game.Screens.Select
public string ShortTitle => "song selection";
public override string Title => ShortTitle.Humanize();
public MatchSongSelect()
{
Padding = new MarginPadding { Horizontal = HORIZONTAL_OVERFLOW_PADDING };
}
protected override bool OnStart()
{
var item = new PlaylistItem
@ -28,8 +35,8 @@ namespace osu.Game.Screens.Select
Selected?.Invoke(item);
if (IsCurrentScreen)
Exit();
if (this.IsCurrentScreen())
this.Exit();
return true;
}

View File

@ -25,7 +25,7 @@ namespace osu.Game.Screens.Select
}, Key.Number3);
}
protected override void OnResuming(Screen last)
public override void OnResuming(IScreen last)
{
player = null;
@ -64,7 +64,7 @@ namespace osu.Game.Screens.Select
LoadComponentAsync(player = new PlayerLoader(() => new Player()), l =>
{
if (IsCurrentScreen) Push(player);
if (this.IsCurrentScreen())this.Push(player);
});
return true;

View File

@ -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)
{
@ -410,7 +410,7 @@ namespace osu.Game.Screens.Select
}
}
if (IsCurrentScreen)
if (this.IsCurrentScreen())
ensurePlayingSelected(true);
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();
@ -628,7 +628,7 @@ namespace osu.Game.Screens.Select
public override bool OnPressed(GlobalAction action)
{
if (!IsCurrentScreen) return false;
if (!this.IsCurrentScreen()) return false;
switch (action)
{