diff --git a/osu.Game/Beatmaps/Beatmap.cs b/osu.Game/Beatmaps/Beatmap.cs index 438a5a2b89..c2b6b5932f 100644 --- a/osu.Game/Beatmaps/Beatmap.cs +++ b/osu.Game/Beatmaps/Beatmap.cs @@ -17,4 +17,4 @@ namespace osu.Game.Beatmaps public List ControlPoints { get; set; } public List ComboColors { get; set; } } -} \ No newline at end of file +} diff --git a/osu.Game/Database/BeatmapDatabase.cs b/osu.Game/Database/BeatmapDatabase.cs index 73809c6fc2..3ada4888eb 100644 --- a/osu.Game/Database/BeatmapDatabase.cs +++ b/osu.Game/Database/BeatmapDatabase.cs @@ -125,4 +125,4 @@ namespace osu.Game.Database connection.Update(record); } } -} \ No newline at end of file +} diff --git a/osu.Game/Database/BeatmapMetadata.cs b/osu.Game/Database/BeatmapMetadata.cs index 531779922a..0b4d692abc 100644 --- a/osu.Game/Database/BeatmapMetadata.cs +++ b/osu.Game/Database/BeatmapMetadata.cs @@ -8,7 +8,7 @@ namespace osu.Game.Database { public class BeatmapMetadata { - [PrimaryKey] + [PrimaryKey, AutoIncrement] public int ID { get; set; } public int BeatmapSetID { get; set; } diff --git a/osu.Game/GameModes/Play/PlaySongSelect.cs b/osu.Game/GameModes/Play/PlaySongSelect.cs index df120ba8ba..d63ea5b7d5 100644 --- a/osu.Game/GameModes/Play/PlaySongSelect.cs +++ b/osu.Game/GameModes/Play/PlaySongSelect.cs @@ -4,21 +4,33 @@ using System; using System.Collections.Generic; using osu.Framework.Configuration; +using osu.Framework.Graphics.Containers; +using osu.Framework.Graphics.Sprites; using osu.Game.GameModes.Backgrounds; using osu.Framework; namespace osu.Game.GameModes.Play { - class PlaySongSelect : GameModeWhiteBox + class PlaySongSelect : OsuGameMode { private Bindable playMode; + // TODO: use currently selected track as bg protected override BackgroundMode CreateBackground() => new BackgroundModeCustom(@"Backgrounds/bg4"); - protected override IEnumerable PossibleChildren => new[] { - typeof(ModSelect), - typeof(Player) - }; + private FlowContainer setList; + + private void addBeatmapSets() + { + var sets = (Game as OsuGame).Beatmaps.GetBeatmapSets(); + foreach (var beatmapSet in sets) + { + setList.Add(new SpriteText + { + Text = beatmapSet.Metadata.Title + }); + } + } public override void Load(BaseGame game) { @@ -28,6 +40,14 @@ namespace osu.Game.GameModes.Play playMode = osu.PlayMode; playMode.ValueChanged += PlayMode_ValueChanged; + + Add(setList = new FlowContainer + { + Direction = FlowDirection.VerticalOnly, + Padding = new OpenTK.Vector2(0, osu.Toolbar.Height) + }); + + addBeatmapSets(); } protected override void Dispose(bool isDisposing)