mirror of
https://github.com/osukey/osukey.git
synced 2025-08-06 16:13:57 +09:00
Revert another masking container.
This commit is contained in:
@ -59,7 +59,6 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Height = TaikoPlayfield.DEFAULT_PLAYFIELD_HEIGHT,
|
Height = TaikoPlayfield.DEFAULT_PLAYFIELD_HEIGHT,
|
||||||
Width = 0.8f,
|
|
||||||
Clock = new FramedClock(rateAdjustClock),
|
Clock = new FramedClock(rateAdjustClock),
|
||||||
Children = new[]
|
Children = new[]
|
||||||
{
|
{
|
||||||
|
@ -111,11 +111,9 @@ namespace osu.Game.Modes.Taiko.UI
|
|||||||
Anchor = Anchor.CentreLeft,
|
Anchor = Anchor.CentreLeft,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
},
|
},
|
||||||
hitObjectContainer = new ExternalMaskingRectangleContainer
|
hitObjectContainer = new Container
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Masking = true,
|
|
||||||
MaskingReference = () => this
|
|
||||||
},
|
},
|
||||||
judgementContainer = new Container<DrawableTaikoJudgement>
|
judgementContainer = new Container<DrawableTaikoJudgement>
|
||||||
{
|
{
|
||||||
@ -271,36 +269,5 @@ namespace osu.Game.Modes.Taiko.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private class ExternalMaskingRectangleContainer : Container
|
|
||||||
{
|
|
||||||
public Func<Drawable> 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
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Reference in New Issue
Block a user