diff --git a/osu.Game/Extensions/DrawableExtensions.cs b/osu.Game/Extensions/DrawableExtensions.cs index febad0d739..d8c627ea8e 100644 --- a/osu.Game/Extensions/DrawableExtensions.cs +++ b/osu.Game/Extensions/DrawableExtensions.cs @@ -60,6 +60,7 @@ public static void ApplySkinnableInfo(this Drawable component, SkinnableInfo inf component.Scale = info.Scale; component.Anchor = info.Anchor; component.Origin = info.Origin; + component.IsUsingClosestAnchor().Value = !info.IsNotUsingClosestAnchor; if (component is Container container) { diff --git a/osu.Game/Screens/Play/HUD/SkinnableInfo.cs b/osu.Game/Screens/Play/HUD/SkinnableInfo.cs index e08044b14c..3e829f6d38 100644 --- a/osu.Game/Screens/Play/HUD/SkinnableInfo.cs +++ b/osu.Game/Screens/Play/HUD/SkinnableInfo.cs @@ -32,6 +32,13 @@ public class SkinnableInfo : IJsonSerializable public Anchor Origin { get; set; } + /// + /// if this 's is + /// automatically determined by proximity, if the user has overridden it. + /// + /// Stored this way because default(bool) is and we want the default behaviour to be "closest". + public bool IsNotUsingClosestAnchor { get; set; } + public List Children { get; } = new List(); [JsonConstructor] @@ -52,6 +59,7 @@ public SkinnableInfo(Drawable component) Scale = component.Scale; Anchor = component.Anchor; Origin = component.Origin; + IsNotUsingClosestAnchor = !component.IsUsingClosestAnchor().Value; if (component is Container container) {