1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-13 10:33:07 +08:00

Fix post-merge issues

This commit is contained in:
smoogipoo 2018-12-22 16:26:27 +09:00
parent c2a00b84c7
commit bb08bf10a0
9 changed files with 20 additions and 89 deletions

View File

@ -14,8 +14,7 @@ using osu.Game.Screens.Multi.Match.Components;
using osu.Game.Screens.Multi.Ranking;
using osu.Game.Screens.Multi.Ranking.Pages;
using osu.Game.Screens.Multi.Ranking.Types;
using osu.Game.Screens.Ranking.Pages;
using osu.Game.Screens.Ranking.Types;
using osu.Game.Screens.Ranking;
using osu.Game.Users;
namespace osu.Game.Tests.Visual
@ -25,7 +24,7 @@ namespace osu.Game.Tests.Visual
public override IReadOnlyList<Type> RequiredTypes => new[]
{
typeof(MultiResults),
typeof(RoomRankingResultType),
typeof(RoomLeaderboardPageInfo),
typeof(RoomRankingResultsPage)
};
@ -60,21 +59,16 @@ namespace osu.Game.Tests.Visual
this.room = room;
}
protected override IEnumerable<IResultType> CreateResultTypes() => new IResultType[]
{
new ScoreResultType(Score, Beatmap),
new RankingResultType(Score, Beatmap),
new TestRoomRankingResultType(Score, Beatmap, room),
};
protected override IEnumerable<IResultPageInfo> CreateResultPages() => new[] { new TestRoomLeaderboardPageInfo(Score, Beatmap, room) };
}
private class TestRoomRankingResultType : RoomRankingResultType
private class TestRoomLeaderboardPageInfo : RoomLeaderboardPageInfo
{
private readonly ScoreInfo score;
private readonly WorkingBeatmap beatmap;
private readonly Room room;
public TestRoomRankingResultType(ScoreInfo score, WorkingBeatmap beatmap, Room room)
public TestRoomLeaderboardPageInfo(ScoreInfo score, WorkingBeatmap beatmap, Room room)
: base(score, beatmap, room)
{
this.score = score;

View File

@ -20,11 +20,11 @@ namespace osu.Game.Screens.Multi.Ranking
this.room = room;
}
protected override IEnumerable<IResultType> CreateResultTypes() => new IResultType[]
protected override IEnumerable<IResultPageInfo> CreateResultPages() => new IResultPageInfo[]
{
new ScoreResultType(Score, Beatmap),
new RankingResultType(Score, Beatmap),
new RoomRankingResultType(Score, Beatmap, room),
new ScoreOverviewPageInfo(Score, Beatmap),
new BeatmapLeaderboardPageInfo(Score, Beatmap),
new RoomLeaderboardPageInfo(Score, Beatmap, room),
};
}
}

View File

@ -16,7 +16,7 @@ using osu.Game.Online.API.Requests.Responses;
using osu.Game.Online.Multiplayer;
using osu.Game.Scoring;
using osu.Game.Screens.Multi.Match.Components;
using osu.Game.Screens.Ranking.Pages;
using osu.Game.Screens.Ranking;
namespace osu.Game.Screens.Multi.Ranking.Pages
{

View File

@ -6,18 +6,17 @@ using osu.Game.Graphics;
using osu.Game.Online.Multiplayer;
using osu.Game.Scoring;
using osu.Game.Screens.Multi.Ranking.Pages;
using osu.Game.Screens.Ranking.Pages;
using osu.Game.Screens.Ranking.Types;
using osu.Game.Screens.Ranking;
namespace osu.Game.Screens.Multi.Ranking.Types
{
public class RoomRankingResultType : IResultType
public class RoomLeaderboardPageInfo : IResultPageInfo
{
private readonly ScoreInfo score;
private readonly WorkingBeatmap beatmap;
private readonly Room room;
public RoomRankingResultType(ScoreInfo score, WorkingBeatmap beatmap, Room room)
public RoomLeaderboardPageInfo(ScoreInfo score, WorkingBeatmap beatmap, Room room)
{
this.score = score;
this.beatmap = beatmap;
@ -26,6 +25,8 @@ namespace osu.Game.Screens.Multi.Ranking.Types
public FontAwesome Icon => FontAwesome.fa_list;
public string Name => "Room Leaderboard";
public virtual ResultsPage CreatePage() => new RoomRankingResultsPage(score, beatmap, room);
}
}

View File

@ -28,6 +28,7 @@ using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Scoring;
using osu.Game.Rulesets.UI;
using osu.Game.Scoring;
using osu.Game.Screens.Ranking;
using osu.Game.Skinning;
using osu.Game.Storyboards.Drawables;
@ -287,7 +288,7 @@ namespace osu.Game.Screens.Play
if (RulesetContainer.Replay == null)
scoreManager.Import(score, true);
Push(new SoloResults(score));
Push(CreateResults(score));
onCompletionEvent = null;
});
@ -431,5 +432,7 @@ namespace osu.Game.Screens.Play
if (storyboardVisible && beatmap.Storyboard.ReplacesBackground)
Background?.FadeTo(0, BACKGROUND_FADE_DURATION, Easing.OutQuint);
}
protected virtual Results CreateResults(ScoreInfo score) => new SoloResults(score);
}
}

View File

@ -12,7 +12,7 @@ using osu.Game.Scoring;
using osuTK;
using osuTK.Graphics;
namespace osu.Game.Screens.Ranking.Pages
namespace osu.Game.Screens.Ranking
{
public abstract class ResultsPage : Container
{

View File

@ -1,15 +0,0 @@
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Game.Graphics;
using osu.Game.Screens.Ranking.Pages;
namespace osu.Game.Screens.Ranking.Types
{
public interface IResultType
{
FontAwesome Icon { get; }
ResultsPage CreatePage();
}
}

View File

@ -1,26 +0,0 @@
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Game.Beatmaps;
using osu.Game.Graphics;
using osu.Game.Scoring;
using osu.Game.Screens.Ranking.Pages;
namespace osu.Game.Screens.Ranking.Types
{
public class RankingResultType : IResultType
{
private readonly ScoreInfo score;
private readonly WorkingBeatmap beatmap;
public RankingResultType(ScoreInfo score, WorkingBeatmap beatmap)
{
this.score = score;
this.beatmap = beatmap;
}
public FontAwesome Icon => FontAwesome.fa_list;
public ResultsPage CreatePage() => new RankingResultsPage(score, beatmap);
}
}

View File

@ -1,26 +0,0 @@
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Game.Beatmaps;
using osu.Game.Graphics;
using osu.Game.Scoring;
using osu.Game.Screens.Ranking.Pages;
namespace osu.Game.Screens.Ranking.Types
{
public class ScoreResultType : IResultType
{
private readonly ScoreInfo score;
private readonly WorkingBeatmap beatmap;
public ScoreResultType(ScoreInfo score, WorkingBeatmap beatmap)
{
this.score = score;
this.beatmap = beatmap;
}
public FontAwesome Icon => FontAwesome.fa_asterisk;
public ResultsPage CreatePage() => new ScoreResultsPage(score, beatmap);
}
}