mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 10:52:53 +08:00
Add progress graph background and update ruleset references.
This commit is contained in:
parent
968d46a10f
commit
886ac1fb40
@ -3,8 +3,7 @@ using osu.Framework.Allocation;
|
||||
using osu.Framework.Testing;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Database;
|
||||
using osu.Game.Modes;
|
||||
using osu.Game.Modes.Scoring;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
using osu.Game.Screens.Ranking;
|
||||
using osu.Game.Users;
|
||||
|
||||
@ -30,7 +29,7 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
|
||||
if (beatmap == null)
|
||||
{
|
||||
var beatmapInfo = db.Query<BeatmapInfo>().FirstOrDefault(b => b.Mode == PlayMode.Osu);
|
||||
var beatmapInfo = db.Query<BeatmapInfo>().FirstOrDefault(b => b.RulesetID == 0);
|
||||
if (beatmapInfo != null)
|
||||
beatmap = db.GetWorkingBeatmap(beatmapInfo);
|
||||
}
|
||||
|
@ -214,10 +214,10 @@ namespace osu.Game.Screens.Ranking
|
||||
switch (mode)
|
||||
{
|
||||
case ResultMode.Summary:
|
||||
currentPage = new ResultsPageScore(score, Beatmap.BeatmapInfo);
|
||||
currentPage = new ResultsPageScore(score, Beatmap);
|
||||
break;
|
||||
case ResultMode.Ranking:
|
||||
currentPage = new ResultsPageRanking(score, Beatmap.BeatmapInfo);
|
||||
currentPage = new ResultsPageRanking(score, Beatmap);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -6,9 +6,9 @@ using osu.Framework.Extensions.Color4Extensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Game.Database;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Modes.Scoring;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
|
||||
@ -17,13 +17,13 @@ namespace osu.Game.Screens.Ranking
|
||||
internal class ResultsPage : Container
|
||||
{
|
||||
protected readonly Score Score;
|
||||
protected readonly BeatmapInfo Beatmap;
|
||||
protected readonly WorkingBeatmap Beatmap;
|
||||
private CircularContainer content;
|
||||
private Box fill;
|
||||
|
||||
protected override Container<Drawable> Content => content;
|
||||
|
||||
public ResultsPage(Score score, BeatmapInfo beatmap)
|
||||
public ResultsPage(Score score, WorkingBeatmap beatmap)
|
||||
{
|
||||
Score = score;
|
||||
Beatmap = beatmap;
|
||||
|
@ -4,9 +4,9 @@
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Game.Database;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Modes.Scoring;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
using osu.Game.Screens.Select.Leaderboards;
|
||||
using OpenTK;
|
||||
|
||||
@ -14,7 +14,7 @@ namespace osu.Game.Screens.Ranking
|
||||
{
|
||||
internal class ResultsPageRanking : ResultsPage
|
||||
{
|
||||
public ResultsPageRanking(Score score, BeatmapInfo beatmap = null) : base(score, beatmap)
|
||||
public ResultsPageRanking(Score score, WorkingBeatmap beatmap = null) : base(score, beatmap)
|
||||
{
|
||||
}
|
||||
|
||||
@ -33,7 +33,7 @@ namespace osu.Game.Screens.Ranking
|
||||
Origin = Anchor.Centre,
|
||||
Anchor = Anchor.Centre,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Beatmap = Beatmap ?? Score.Beatmap,
|
||||
Beatmap = Beatmap.BeatmapInfo ?? Score.Beatmap,
|
||||
Scale = new Vector2(0.7f)
|
||||
}
|
||||
};
|
||||
|
@ -13,12 +13,14 @@ using osu.Game.Database;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Modes.Scoring;
|
||||
using osu.Game.Screens.Select.Leaderboards;
|
||||
using osu.Game.Users;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
using System;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Screens.Play;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
|
||||
namespace osu.Game.Screens.Ranking
|
||||
{
|
||||
@ -26,7 +28,7 @@ namespace osu.Game.Screens.Ranking
|
||||
{
|
||||
private ScoreCounter scoreCounter;
|
||||
|
||||
public ResultsPageScore(Score score, BeatmapInfo beatmap) : base(score, beatmap) { }
|
||||
public ResultsPageScore(Score score, WorkingBeatmap beatmap) : base(score, beatmap) { }
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
@ -69,12 +71,29 @@ namespace osu.Game.Screens.Ranking
|
||||
Size = new Vector2(150, 60),
|
||||
Margin = new MarginPadding(20),
|
||||
},
|
||||
scoreCounter = new SlowScoreCounter(6)
|
||||
new Container
|
||||
{
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
Colour = colours.PinkDarker,
|
||||
TextSize = 50,
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Height = 60,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new SongProgressGraph
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Alpha = 0.5f,
|
||||
Objects = Beatmap.Beatmap.HitObjects,
|
||||
},
|
||||
scoreCounter = new SlowScoreCounter(6)
|
||||
{
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
Colour = colours.PinkDarker,
|
||||
Y = 10,
|
||||
TextSize = 50,
|
||||
},
|
||||
}
|
||||
},
|
||||
new OsuSpriteText
|
||||
{
|
||||
@ -87,7 +106,7 @@ namespace osu.Game.Screens.Ranking
|
||||
Text = "total score",
|
||||
Margin = new MarginPadding { Bottom = 20 },
|
||||
},
|
||||
new BeatmapDetails(Beatmap)
|
||||
new BeatmapDetails(Beatmap.BeatmapInfo)
|
||||
{
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
@ -283,4 +302,4 @@ namespace osu.Game.Screens.Ranking
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user