mirror of
https://github.com/ppy/osu.git
synced 2025-01-18 08:32:54 +08:00
Use BindableListConverter to deserialize control points
This commit is contained in:
parent
5ef4ac3f7a
commit
6c8f4addb8
@ -3,7 +3,9 @@
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Newtonsoft.Json;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Game.IO.Serialization.Converters;
|
||||
|
||||
namespace osu.Game.Beatmaps.ControlPoints
|
||||
{
|
||||
@ -17,8 +19,11 @@ namespace osu.Game.Beatmaps.ControlPoints
|
||||
/// </summary>
|
||||
public double Time { get; }
|
||||
|
||||
[JsonIgnore]
|
||||
public IBindableList<ControlPoint> ControlPoints => controlPoints;
|
||||
|
||||
[JsonConverter(typeof(BindableListConverter<ControlPoint>))]
|
||||
[JsonProperty]
|
||||
private readonly BindableList<ControlPoint> controlPoints = new BindableList<ControlPoint>();
|
||||
|
||||
public ControlPointGroup(double time)
|
||||
|
@ -22,9 +22,10 @@ namespace osu.Game.Beatmaps.ControlPoints
|
||||
/// <summary>
|
||||
/// All control points grouped by time.
|
||||
/// </summary>
|
||||
[JsonProperty]
|
||||
[JsonIgnore]
|
||||
public IBindableList<ControlPointGroup> Groups => groups;
|
||||
|
||||
[JsonProperty]
|
||||
private readonly BindableList<ControlPointGroup> groups = new BindableList<ControlPointGroup>();
|
||||
|
||||
/// <summary>
|
||||
|
Loading…
Reference in New Issue
Block a user