mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 09:27:29 +08:00
Only store width/height of serialised drawable if it isn't automatically computed
This commit is contained in:
parent
ec2200d54f
commit
b7acbde719
@ -6,6 +6,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Newtonsoft.Json;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Extensions.EnumExtensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Logging;
|
||||
@ -66,8 +67,13 @@ namespace osu.Game.Skinning
|
||||
Position = component.Position;
|
||||
Rotation = component.Rotation;
|
||||
Scale = component.Scale;
|
||||
Height = component.Height;
|
||||
Width = component.Width;
|
||||
|
||||
if ((component as CompositeDrawable)?.AutoSizeAxes.HasFlagFast(Axes.X) != true)
|
||||
Width = component.Width;
|
||||
|
||||
if ((component as CompositeDrawable)?.AutoSizeAxes.HasFlagFast(Axes.Y) != true)
|
||||
Height = component.Height;
|
||||
|
||||
Anchor = component.Anchor;
|
||||
Origin = component.Origin;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user