mirror of
https://github.com/ppy/osu.git
synced 2024-12-16 00:02:54 +08:00
Add JsonConstructor
attribute to SkinnableTargetWrapper
This commit is contained in:
parent
3b862798e9
commit
db19617b8b
@ -2,6 +2,7 @@
|
|||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using Newtonsoft.Json;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
|
|
||||||
@ -11,6 +12,7 @@ namespace osu.Game.Skinning
|
|||||||
/// A container which is serialised and can encapsulate multiple skinnable elements into a single return type (for consumption via <see cref="ISkin.GetDrawableComponent"/>.
|
/// A container which is serialised and can encapsulate multiple skinnable elements into a single return type (for consumption via <see cref="ISkin.GetDrawableComponent"/>.
|
||||||
/// Will also optionally apply default cross-element layout dependencies when initialised from a non-deserialised source.
|
/// Will also optionally apply default cross-element layout dependencies when initialised from a non-deserialised source.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[Serializable]
|
||||||
public class SkinnableTargetWrapper : Container, ISkinSerialisable
|
public class SkinnableTargetWrapper : Container, ISkinSerialisable
|
||||||
{
|
{
|
||||||
private readonly Action<Container> applyDefaults;
|
private readonly Action<Container> applyDefaults;
|
||||||
@ -25,6 +27,7 @@ namespace osu.Game.Skinning
|
|||||||
this.applyDefaults = applyDefaults;
|
this.applyDefaults = applyDefaults;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[JsonConstructor]
|
||||||
public SkinnableTargetWrapper()
|
public SkinnableTargetWrapper()
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both;
|
RelativeSizeAxes = Axes.Both;
|
||||||
|
Loading…
Reference in New Issue
Block a user