From 50a598dd05cbd3dd77a8cdea41a647c42f7ad438 Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Wed, 12 Apr 2017 15:01:17 +0900 Subject: [PATCH] Revert another masking container. --- .../Tests/TestCaseTaikoPlayfield.cs | 1 - osu.Game.Modes.Taiko/UI/TaikoPlayfield.cs | 35 +------------------ 2 files changed, 1 insertion(+), 35 deletions(-) diff --git a/osu.Desktop.VisualTests/Tests/TestCaseTaikoPlayfield.cs b/osu.Desktop.VisualTests/Tests/TestCaseTaikoPlayfield.cs index a79790f8f8..4e9ff4980e 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseTaikoPlayfield.cs +++ b/osu.Desktop.VisualTests/Tests/TestCaseTaikoPlayfield.cs @@ -59,7 +59,6 @@ public override void Reset() Origin = Anchor.Centre, RelativeSizeAxes = Axes.X, Height = TaikoPlayfield.DEFAULT_PLAYFIELD_HEIGHT, - Width = 0.8f, Clock = new FramedClock(rateAdjustClock), Children = new[] { diff --git a/osu.Game.Modes.Taiko/UI/TaikoPlayfield.cs b/osu.Game.Modes.Taiko/UI/TaikoPlayfield.cs index a809cf338d..db3a1bc84e 100644 --- a/osu.Game.Modes.Taiko/UI/TaikoPlayfield.cs +++ b/osu.Game.Modes.Taiko/UI/TaikoPlayfield.cs @@ -111,11 +111,9 @@ public TaikoPlayfield() Anchor = Anchor.CentreLeft, Origin = Anchor.Centre, }, - hitObjectContainer = new ExternalMaskingRectangleContainer + hitObjectContainer = new Container { RelativeSizeAxes = Axes.Both, - Masking = true, - MaskingReference = () => this }, judgementContainer = new Container { @@ -271,36 +269,5 @@ protected override void Update() } } } - - private class ExternalMaskingRectangleContainer : Container - { - public Func MaskingReference; - - protected override void ApplyDrawNode(DrawNode node) - { - base.ApplyDrawNode(node); - - Drawable maskingReference = MaskingReference?.Invoke(); - - if (MaskingReference == null) - return; - - var cn = node as ContainerDrawNode; - - cn.MaskingInfo = !Masking - ? (MaskingInfo?)null - : new MaskingInfo - { - ScreenSpaceAABB = maskingReference.ScreenSpaceDrawQuad.AABB, - MaskingRect = maskingReference.DrawRectangle, - ToMaskingSpace = cn.MaskingInfo.Value.ToMaskingSpace, - CornerRadius = cn.MaskingInfo.Value.CornerRadius, - BorderThickness = cn.MaskingInfo.Value.BorderThickness, - BorderColour = cn.MaskingInfo.Value.BorderColour, - BlendRange = cn.MaskingInfo.Value.BlendRange, - AlphaExponent = cn.MaskingInfo.Value.AlphaExponent - }; - } - } } } \ No newline at end of file