1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 14:57:52 +08:00

Add BigBlackBox for skinning testing purposes

This commit is contained in:
Dean Herbert 2022-03-08 19:55:25 +09:00
parent 8d1ee28e67
commit 458136dfe7

View File

@ -0,0 +1,47 @@
// 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.
using JetBrains.Annotations;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics.Sprites;
using osuTK;
using osuTK.Graphics;
namespace osu.Game.Skinning.Components
{
/// <summary>
/// Intended to be a test bed for skinning. May be removed at some point in the future.
/// </summary>
[UsedImplicitly]
public class BigBlackBox : CompositeDrawable, ISkinnableDrawable
{
public bool UsesFixedAnchor { get; set; }
public BigBlackBox()
{
Size = new Vector2(150);
Masking = true;
CornerRadius = 20;
CornerExponent = 5;
InternalChildren = new Drawable[]
{
new Box
{
Colour = Color4.Black,
RelativeSizeAxes = Axes.Both,
},
new OsuSpriteText
{
Text = "Big Black Box",
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
}
};
}
}
}