mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Make playlist beatmap and ruleset into bindables
This commit is contained in:
@ -2,6 +2,7 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Humanizer;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Bindables;
|
||||
@ -38,8 +39,8 @@ namespace osu.Game.Screens.Select
|
||||
{
|
||||
var item = new PlaylistItem
|
||||
{
|
||||
Beatmap = Beatmap.Value.BeatmapInfo,
|
||||
Ruleset = Ruleset.Value,
|
||||
Beatmap = { Value = Beatmap.Value.BeatmapInfo },
|
||||
Ruleset = { Value = Ruleset.Value },
|
||||
RulesetID = Ruleset.Value.ID ?? 0
|
||||
};
|
||||
|
||||
@ -60,8 +61,8 @@ namespace osu.Game.Screens.Select
|
||||
|
||||
if (CurrentItem.Value != null)
|
||||
{
|
||||
Ruleset.Value = CurrentItem.Value.Ruleset;
|
||||
Beatmap.Value = beatmaps.GetWorkingBeatmap(CurrentItem.Value.Beatmap);
|
||||
Ruleset.Value = CurrentItem.Value.Ruleset.Value;
|
||||
Beatmap.Value = beatmaps.GetWorkingBeatmap(CurrentItem.Value.Beatmap.Value);
|
||||
Mods.Value = CurrentItem.Value.RequiredMods?.ToArray() ?? Array.Empty<Mod>();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user