From 0933217389f9b08c4d64815b31fa352cd8a4ce16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Wed, 13 May 2020 18:53:47 +0200 Subject: [PATCH] Simplify mascot scaling --- osu.Game.Rulesets.Taiko/UI/TaikoPlayfield.cs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/osu.Game.Rulesets.Taiko/UI/TaikoPlayfield.cs b/osu.Game.Rulesets.Taiko/UI/TaikoPlayfield.cs index 5940ee8b69..ded1fc0933 100644 --- a/osu.Game.Rulesets.Taiko/UI/TaikoPlayfield.cs +++ b/osu.Game.Rulesets.Taiko/UI/TaikoPlayfield.cs @@ -5,7 +5,6 @@ using System.Linq; using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; -using osu.Framework.Layout; using osu.Game.Beatmaps.ControlPoints; using osu.Game.Graphics; using osu.Game.Rulesets.Objects.Drawables; @@ -43,14 +42,9 @@ namespace osu.Game.Rulesets.Taiko.UI private Container hitTargetOffsetContent; - private readonly LayoutValue playfieldScaleLayout = new LayoutValue(Invalidation.DrawSize); - private float playfieldScale => playfieldScaleLayout.IsValid ? playfieldScaleLayout.Value : playfieldScaleLayout.Value = DrawHeight / DEFAULT_HEIGHT; - public TaikoPlayfield(ControlPointInfo controlPoints) { this.controlPoints = controlPoints; - - AddLayout(playfieldScaleLayout); } [BackgroundDependencyLoader] @@ -159,7 +153,7 @@ namespace osu.Game.Rulesets.Taiko.UI rightArea.Padding = new MarginPadding { Left = leftArea.DrawWidth }; hitTargetOffsetContent.Padding = new MarginPadding { Left = HitTarget.DrawWidth / 2 }; - mascot.Scale = new Vector2(playfieldScale); + mascot.Scale = new Vector2(DrawHeight / DEFAULT_HEIGHT); } public override void Add(DrawableHitObject h)