mirror of https://github.com/ppy/osu
Add star counter to difficulty select
This commit is contained in:
parent
910a079bda
commit
8d6431b35e
|
@ -77,6 +77,8 @@ public void ImportBeatmap(string path)
|
|||
// 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;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Framework.Graphics.Transformations;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
|
||||
namespace osu.Game.GameModes.Play
|
||||
{
|
||||
|
@ -73,6 +74,11 @@ public BeatmapButton(BeatmapSetInfo set, BeatmapInfo beatmap)
|
|||
new FlowContainer
|
||||
{
|
||||
Padding = new MarginPadding { Left = 10 },
|
||||
Direction = FlowDirection.VerticalOnly,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new FlowContainer
|
||||
{
|
||||
Direction = FlowDirection.HorizontalOnly,
|
||||
Children = new[]
|
||||
{
|
||||
|
@ -83,10 +89,14 @@ public BeatmapButton(BeatmapSetInfo set, BeatmapInfo beatmap)
|
|||
},
|
||||
new SpriteText
|
||||
{
|
||||
Text = string.Format(" mapped by {0}", (beatmap.Metadata ?? set.Metadata).Author),
|
||||
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