mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 07:32:55 +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.
|
||||
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
using osu.Framework.Graphics;
|
||||
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"/>.
|
||||
/// Will also optionally apply default cross-element layout dependencies when initialised from a non-deserialised source.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class SkinnableTargetWrapper : Container, ISkinSerialisable
|
||||
{
|
||||
private readonly Action<Container> applyDefaults;
|
||||
@ -25,6 +27,7 @@ namespace osu.Game.Skinning
|
||||
this.applyDefaults = applyDefaults;
|
||||
}
|
||||
|
||||
[JsonConstructor]
|
||||
public SkinnableTargetWrapper()
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both;
|
||||
|
Loading…
Reference in New Issue
Block a user