1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 12:57:36 +08:00

Add star counter to difficulty select

This commit is contained in:
Drew DeVault 2016-10-20 15:33:46 -04:00
parent 910a079bda
commit 8d6431b35e
2 changed files with 22 additions and 10 deletions

View File

@ -77,6 +77,8 @@ namespace osu.Game.Database
// TODO: Diff beatmap metadata with set metadata and leave it here if necessary
beatmap.BeatmapInfo.Metadata = null;
beatmapSet.Beatmaps.Add(beatmap.BeatmapInfo);
connection.Insert(beatmap.BeatmapInfo.BaseDifficulty);
beatmap.BeatmapInfo.BaseDifficultyID = beatmap.BeatmapInfo.BaseDifficulty.ID;
connection.Insert(beatmap.BeatmapInfo);
}
}

View File

@ -17,6 +17,7 @@ using OpenTK.Graphics;
using OpenTK;
using osu.Game.Graphics;
using osu.Framework.Graphics.Transformations;
using osu.Game.Graphics.UserInterface;
namespace osu.Game.GameModes.Play
{
@ -73,19 +74,28 @@ namespace osu.Game.GameModes.Play
new FlowContainer
{
Padding = new MarginPadding { Left = 10 },
Direction = FlowDirection.HorizontalOnly,
Children = new[]
Direction = FlowDirection.VerticalOnly,
Children = new Drawable[]
{
new SpriteText
new FlowContainer
{
Text = beatmap.Version,
TextSize = 20,
},
new SpriteText
{
Text = string.Format(" mapped by {0}", (beatmap.Metadata ?? set.Metadata).Author),
TextSize = 16,
Direction = FlowDirection.HorizontalOnly,
Children = new[]
{
new SpriteText
{
Text = beatmap.Version,
TextSize = 20,
},
new SpriteText
{
Text = string.Format(" mapped by {0}",
(beatmap.Metadata ?? set.Metadata).Author),
TextSize = 16,
},
}
},
new StarCounter { Count = beatmap.BaseDifficulty?.OverallDifficulty ?? 5, StarSize = 8 }
}
}
}