mirror of
https://github.com/SK-la/osu-framework.git
synced 2026-03-15 03:20:30 +00:00
30 lines
813 B
C#
30 lines
813 B
C#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
#nullable disable
|
|
|
|
using osu.Framework.Graphics.Primitives;
|
|
using osu.Framework.Graphics.Shapes;
|
|
using System;
|
|
|
|
namespace osu.Framework.Graphics.Visualisation
|
|
{
|
|
internal partial class FlashyBox : Box
|
|
{
|
|
private Drawable target;
|
|
private readonly Func<Drawable, Quad> getScreenSpaceQuad;
|
|
|
|
public FlashyBox(Func<Drawable, Quad> getScreenSpaceQuad)
|
|
{
|
|
this.getScreenSpaceQuad = getScreenSpaceQuad;
|
|
}
|
|
|
|
public Drawable Target
|
|
{
|
|
set => target = value;
|
|
}
|
|
|
|
public override Quad ScreenSpaceDrawQuad => target == null ? new Quad() : getScreenSpaceQuad(target);
|
|
}
|
|
}
|