mirror of
https://github.com/osukey/osukey.git
synced 2025-08-08 00:53:56 +09:00
Clean-ups and renames
This commit is contained in:
@ -15,10 +15,10 @@ namespace osu.Game.Screens.Play
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override IEnumerable<IResultType> CreateResultTypes() => new IResultType[]
|
protected override IEnumerable<IResultPageInfo> CreateResultTypes() => new IResultPageInfo[]
|
||||||
{
|
{
|
||||||
new ScoreResultType(Score, Beatmap),
|
new ScoreOverviewPageInfo(Score, Beatmap),
|
||||||
new RankingResultType(Score, Beatmap)
|
new BeatmapLeaderboardPageInfo(Score, Beatmap)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,14 +2,15 @@
|
|||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Screens.Ranking.Pages;
|
|
||||||
|
|
||||||
namespace osu.Game.Screens.Ranking.Types
|
namespace osu.Game.Screens.Ranking
|
||||||
{
|
{
|
||||||
public interface IResultType
|
public interface IResultPageInfo
|
||||||
{
|
{
|
||||||
FontAwesome Icon { get; }
|
FontAwesome Icon { get; }
|
||||||
|
|
||||||
|
string Name { get; }
|
||||||
|
|
||||||
ResultsPage CreatePage();
|
ResultsPage CreatePage();
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -10,18 +10,17 @@ using osu.Game.Graphics;
|
|||||||
using osuTK;
|
using osuTK;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
using osu.Game.Screens.Ranking.Types;
|
|
||||||
|
|
||||||
namespace osu.Game.Screens.Ranking
|
namespace osu.Game.Screens.Ranking
|
||||||
{
|
{
|
||||||
public class ResultModeButton : TabItem<IResultType>
|
public class ResultModeButton : TabItem<IResultPageInfo>
|
||||||
{
|
{
|
||||||
private readonly FontAwesome icon;
|
private readonly FontAwesome icon;
|
||||||
private Color4 activeColour;
|
private Color4 activeColour;
|
||||||
private Color4 inactiveColour;
|
private Color4 inactiveColour;
|
||||||
private CircularContainer colouredPart;
|
private CircularContainer colouredPart;
|
||||||
|
|
||||||
public ResultModeButton(IResultType mode)
|
public ResultModeButton(IResultPageInfo mode)
|
||||||
: base(mode)
|
: base(mode)
|
||||||
{
|
{
|
||||||
icon = mode.Icon;
|
icon = mode.Icon;
|
||||||
|
@ -3,12 +3,11 @@
|
|||||||
|
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.UserInterface;
|
using osu.Framework.Graphics.UserInterface;
|
||||||
using osu.Game.Screens.Ranking.Types;
|
|
||||||
using osuTK;
|
using osuTK;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Ranking
|
namespace osu.Game.Screens.Ranking
|
||||||
{
|
{
|
||||||
public class ResultModeTabControl : TabControl<IResultType>
|
public class ResultModeTabControl : TabControl<IResultPageInfo>
|
||||||
{
|
{
|
||||||
public ResultModeTabControl()
|
public ResultModeTabControl()
|
||||||
{
|
{
|
||||||
@ -20,9 +19,9 @@ namespace osu.Game.Screens.Ranking
|
|||||||
TabContainer.Padding = new MarginPadding(5);
|
TabContainer.Padding = new MarginPadding(5);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override Dropdown<IResultType> CreateDropdown() => null;
|
protected override Dropdown<IResultPageInfo> CreateDropdown() => null;
|
||||||
|
|
||||||
protected override TabItem<IResultType> CreateTabItem(IResultType value) => new ResultModeButton(value)
|
protected override TabItem<IResultPageInfo> CreateTabItem(IResultPageInfo value) => new ResultModeButton(value)
|
||||||
{
|
{
|
||||||
Anchor = TabContainer.Anchor,
|
Anchor = TabContainer.Anchor,
|
||||||
Origin = TabContainer.Origin
|
Origin = TabContainer.Origin
|
||||||
|
@ -19,7 +19,6 @@ using osu.Game.Graphics.UserInterface;
|
|||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
using osu.Game.Scoring;
|
using osu.Game.Scoring;
|
||||||
using osu.Game.Screens.Ranking.Types;
|
|
||||||
|
|
||||||
namespace osu.Game.Screens.Ranking
|
namespace osu.Game.Screens.Ranking
|
||||||
{
|
{
|
||||||
@ -281,6 +280,6 @@ namespace osu.Game.Screens.Ranking
|
|||||||
}, true);
|
}, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected abstract IEnumerable<IResultType> CreateResultTypes();
|
protected abstract IEnumerable<IResultPageInfo> CreateResultTypes();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,9 +12,9 @@ using osu.Game.Scoring;
|
|||||||
using osuTK;
|
using osuTK;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Ranking.Pages
|
namespace osu.Game.Screens.Ranking
|
||||||
{
|
{
|
||||||
public class ResultsPage : Container
|
public abstract class ResultsPage : Container
|
||||||
{
|
{
|
||||||
protected readonly ScoreInfo Score;
|
protected readonly ScoreInfo Score;
|
||||||
protected readonly WorkingBeatmap Beatmap;
|
protected readonly WorkingBeatmap Beatmap;
|
||||||
@ -23,7 +23,7 @@ namespace osu.Game.Screens.Ranking.Pages
|
|||||||
|
|
||||||
protected override Container<Drawable> Content => content;
|
protected override Container<Drawable> Content => content;
|
||||||
|
|
||||||
public ResultsPage(ScoreInfo score, WorkingBeatmap beatmap)
|
protected ResultsPage(ScoreInfo score, WorkingBeatmap beatmap)
|
||||||
{
|
{
|
||||||
Score = score;
|
Score = score;
|
||||||
Beatmap = beatmap;
|
Beatmap = beatmap;
|
@ -8,12 +8,12 @@ using osu.Game.Screens.Ranking.Pages;
|
|||||||
|
|
||||||
namespace osu.Game.Screens.Ranking.Types
|
namespace osu.Game.Screens.Ranking.Types
|
||||||
{
|
{
|
||||||
public class RankingResultType : IResultType
|
public class BeatmapLeaderboardPageInfo : IResultPageInfo
|
||||||
{
|
{
|
||||||
private readonly ScoreInfo score;
|
private readonly ScoreInfo score;
|
||||||
private readonly WorkingBeatmap beatmap;
|
private readonly WorkingBeatmap beatmap;
|
||||||
|
|
||||||
public RankingResultType(ScoreInfo score, WorkingBeatmap beatmap)
|
public BeatmapLeaderboardPageInfo(ScoreInfo score, WorkingBeatmap beatmap)
|
||||||
{
|
{
|
||||||
this.score = score;
|
this.score = score;
|
||||||
this.beatmap = beatmap;
|
this.beatmap = beatmap;
|
||||||
@ -21,6 +21,8 @@ namespace osu.Game.Screens.Ranking.Types
|
|||||||
|
|
||||||
public FontAwesome Icon => FontAwesome.fa_list;
|
public FontAwesome Icon => FontAwesome.fa_list;
|
||||||
|
|
||||||
|
public string Name => @"Beatmap Leaderboard";
|
||||||
|
|
||||||
public ResultsPage CreatePage() => new RankingResultsPage(score, beatmap);
|
public ResultsPage CreatePage() => new RankingResultsPage(score, beatmap);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -8,18 +8,20 @@ using osu.Game.Screens.Ranking.Pages;
|
|||||||
|
|
||||||
namespace osu.Game.Screens.Ranking.Types
|
namespace osu.Game.Screens.Ranking.Types
|
||||||
{
|
{
|
||||||
public class ScoreResultType : IResultType
|
public class ScoreOverviewPageInfo : IResultPageInfo
|
||||||
{
|
{
|
||||||
private readonly ScoreInfo score;
|
private readonly ScoreInfo score;
|
||||||
private readonly WorkingBeatmap beatmap;
|
private readonly WorkingBeatmap beatmap;
|
||||||
|
|
||||||
public ScoreResultType(ScoreInfo score, WorkingBeatmap beatmap)
|
public ScoreOverviewPageInfo(ScoreInfo score, WorkingBeatmap beatmap)
|
||||||
{
|
{
|
||||||
this.score = score;
|
this.score = score;
|
||||||
this.beatmap = beatmap;
|
this.beatmap = beatmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
public FontAwesome Icon => FontAwesome.fa_asterisk;
|
public FontAwesome Icon => FontAwesome.fa_asterisk;
|
||||||
|
|
||||||
|
public string Name => "Overview";
|
||||||
|
|
||||||
public ResultsPage CreatePage() => new ScoreResultsPage(score, beatmap);
|
public ResultsPage CreatePage() => new ScoreResultsPage(score, beatmap);
|
||||||
}
|
}
|
Reference in New Issue
Block a user