diff --git a/osu.Game/Database/BeatmapDatabase.cs b/osu.Game/Database/BeatmapDatabase.cs index 553bba6cb8..8aa92fb23d 100644 --- a/osu.Game/Database/BeatmapDatabase.cs +++ b/osu.Game/Database/BeatmapDatabase.cs @@ -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); } } diff --git a/osu.Game/GameModes/Play/BeatmapButton.cs b/osu.Game/GameModes/Play/BeatmapButton.cs index a172565a55..2d99fda0f9 100644 --- a/osu.Game/GameModes/Play/BeatmapButton.cs +++ b/osu.Game/GameModes/Play/BeatmapButton.cs @@ -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,19 +74,28 @@ public BeatmapButton(BeatmapSetInfo set, BeatmapInfo beatmap) 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 } } } }