mirror of
https://github.com/ppy/osu.git
synced 2025-01-21 08:12:56 +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.Framework.Testing;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Database;
|
using osu.Game.Database;
|
||||||
using osu.Game.Modes;
|
using osu.Game.Rulesets.Scoring;
|
||||||
using osu.Game.Modes.Scoring;
|
|
||||||
using osu.Game.Screens.Ranking;
|
using osu.Game.Screens.Ranking;
|
||||||
using osu.Game.Users;
|
using osu.Game.Users;
|
||||||
|
|
||||||
@ -30,7 +29,7 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
|
|
||||||
if (beatmap == null)
|
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)
|
if (beatmapInfo != null)
|
||||||
beatmap = db.GetWorkingBeatmap(beatmapInfo);
|
beatmap = db.GetWorkingBeatmap(beatmapInfo);
|
||||||
}
|
}
|
||||||
|
@ -214,10 +214,10 @@ namespace osu.Game.Screens.Ranking
|
|||||||
switch (mode)
|
switch (mode)
|
||||||
{
|
{
|
||||||
case ResultMode.Summary:
|
case ResultMode.Summary:
|
||||||
currentPage = new ResultsPageScore(score, Beatmap.BeatmapInfo);
|
currentPage = new ResultsPageScore(score, Beatmap);
|
||||||
break;
|
break;
|
||||||
case ResultMode.Ranking:
|
case ResultMode.Ranking:
|
||||||
currentPage = new ResultsPageRanking(score, Beatmap.BeatmapInfo);
|
currentPage = new ResultsPageRanking(score, Beatmap);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,9 +6,9 @@ using osu.Framework.Extensions.Color4Extensions;
|
|||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Game.Database;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Modes.Scoring;
|
using osu.Game.Rulesets.Scoring;
|
||||||
using OpenTK;
|
using OpenTK;
|
||||||
using OpenTK.Graphics;
|
using OpenTK.Graphics;
|
||||||
|
|
||||||
@ -17,13 +17,13 @@ namespace osu.Game.Screens.Ranking
|
|||||||
internal class ResultsPage : Container
|
internal class ResultsPage : Container
|
||||||
{
|
{
|
||||||
protected readonly Score Score;
|
protected readonly Score Score;
|
||||||
protected readonly BeatmapInfo Beatmap;
|
protected readonly WorkingBeatmap Beatmap;
|
||||||
private CircularContainer content;
|
private CircularContainer content;
|
||||||
private Box fill;
|
private Box fill;
|
||||||
|
|
||||||
protected override Container<Drawable> Content => content;
|
protected override Container<Drawable> Content => content;
|
||||||
|
|
||||||
public ResultsPage(Score score, BeatmapInfo beatmap)
|
public ResultsPage(Score score, WorkingBeatmap beatmap)
|
||||||
{
|
{
|
||||||
Score = score;
|
Score = score;
|
||||||
Beatmap = beatmap;
|
Beatmap = beatmap;
|
||||||
|
@ -4,9 +4,9 @@
|
|||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Game.Database;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Modes.Scoring;
|
using osu.Game.Rulesets.Scoring;
|
||||||
using osu.Game.Screens.Select.Leaderboards;
|
using osu.Game.Screens.Select.Leaderboards;
|
||||||
using OpenTK;
|
using OpenTK;
|
||||||
|
|
||||||
@ -14,7 +14,7 @@ namespace osu.Game.Screens.Ranking
|
|||||||
{
|
{
|
||||||
internal class ResultsPageRanking : ResultsPage
|
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,
|
Origin = Anchor.Centre,
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Beatmap = Beatmap ?? Score.Beatmap,
|
Beatmap = Beatmap.BeatmapInfo ?? Score.Beatmap,
|
||||||
Scale = new Vector2(0.7f)
|
Scale = new Vector2(0.7f)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -13,12 +13,14 @@ using osu.Game.Database;
|
|||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
using osu.Game.Modes.Scoring;
|
|
||||||
using osu.Game.Screens.Select.Leaderboards;
|
using osu.Game.Screens.Select.Leaderboards;
|
||||||
using osu.Game.Users;
|
using osu.Game.Users;
|
||||||
using OpenTK;
|
using OpenTK;
|
||||||
using OpenTK.Graphics;
|
using OpenTK.Graphics;
|
||||||
using System;
|
using System;
|
||||||
|
using osu.Game.Beatmaps;
|
||||||
|
using osu.Game.Screens.Play;
|
||||||
|
using osu.Game.Rulesets.Scoring;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Ranking
|
namespace osu.Game.Screens.Ranking
|
||||||
{
|
{
|
||||||
@ -26,7 +28,7 @@ namespace osu.Game.Screens.Ranking
|
|||||||
{
|
{
|
||||||
private ScoreCounter scoreCounter;
|
private ScoreCounter scoreCounter;
|
||||||
|
|
||||||
public ResultsPageScore(Score score, BeatmapInfo beatmap) : base(score, beatmap) { }
|
public ResultsPageScore(Score score, WorkingBeatmap beatmap) : base(score, beatmap) { }
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours)
|
private void load(OsuColour colours)
|
||||||
@ -69,12 +71,29 @@ namespace osu.Game.Screens.Ranking
|
|||||||
Size = new Vector2(150, 60),
|
Size = new Vector2(150, 60),
|
||||||
Margin = new MarginPadding(20),
|
Margin = new MarginPadding(20),
|
||||||
},
|
},
|
||||||
scoreCounter = new SlowScoreCounter(6)
|
new Container
|
||||||
{
|
{
|
||||||
Anchor = Anchor.TopCentre,
|
Anchor = Anchor.TopCentre,
|
||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.TopCentre,
|
||||||
Colour = colours.PinkDarker,
|
RelativeSizeAxes = Axes.X,
|
||||||
TextSize = 50,
|
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
|
new OsuSpriteText
|
||||||
{
|
{
|
||||||
@ -87,7 +106,7 @@ namespace osu.Game.Screens.Ranking
|
|||||||
Text = "total score",
|
Text = "total score",
|
||||||
Margin = new MarginPadding { Bottom = 20 },
|
Margin = new MarginPadding { Bottom = 20 },
|
||||||
},
|
},
|
||||||
new BeatmapDetails(Beatmap)
|
new BeatmapDetails(Beatmap.BeatmapInfo)
|
||||||
{
|
{
|
||||||
Anchor = Anchor.TopCentre,
|
Anchor = Anchor.TopCentre,
|
||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.TopCentre,
|
||||||
@ -283,4 +302,4 @@ namespace osu.Game.Screens.Ranking
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user