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:
parent
910a079bda
commit
8d6431b35e
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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 }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user