From c94df672e5f30c4d87738ca37a019685773c4df2 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 11 May 2021 13:39:32 +0900 Subject: [PATCH] Also serialise `Origin` out --- osu.Game/Extensions/DrawableExtensions.cs | 1 + osu.Game/Screens/Play/HUD/SkinnableInfo.cs | 3 +++ 2 files changed, 4 insertions(+) diff --git a/osu.Game/Extensions/DrawableExtensions.cs b/osu.Game/Extensions/DrawableExtensions.cs index 6837a802f2..0ec96a876e 100644 --- a/osu.Game/Extensions/DrawableExtensions.cs +++ b/osu.Game/Extensions/DrawableExtensions.cs @@ -55,6 +55,7 @@ public static void ApplySerialisedInformation(this Drawable component, Skinnable component.Rotation = info.Rotation; component.Scale = info.Scale; component.Anchor = info.Anchor; + component.Origin = info.Origin; if (component is Container container) { diff --git a/osu.Game/Screens/Play/HUD/SkinnableInfo.cs b/osu.Game/Screens/Play/HUD/SkinnableInfo.cs index 988d73fed6..2de3f1b729 100644 --- a/osu.Game/Screens/Play/HUD/SkinnableInfo.cs +++ b/osu.Game/Screens/Play/HUD/SkinnableInfo.cs @@ -29,6 +29,8 @@ public class SkinnableInfo : IJsonSerializable public Anchor Anchor { get; set; } + public Anchor Origin { get; set; } + public List Children { get; } = new List(); public SkinnableInfo() @@ -43,6 +45,7 @@ public SkinnableInfo(Drawable component) Rotation = component.Rotation; Scale = component.Scale; Anchor = component.Anchor; + Origin = component.Origin; if (component is Container container) {