2019-01-24 16:43:03 +08:00
|
|
|
|
// 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.
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
2017-02-04 16:50:58 +08:00
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
|
using osu.Framework.Graphics.Containers;
|
2023-01-26 20:41:14 +08:00
|
|
|
|
using osuTK;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
2017-02-04 16:50:58 +08:00
|
|
|
|
namespace osu.Game.Graphics.UserInterface
|
|
|
|
|
{
|
2023-02-03 00:23:09 +08:00
|
|
|
|
public partial class RoundedNub : Nub
|
2017-02-04 16:50:58 +08:00
|
|
|
|
{
|
2021-10-04 00:44:23 +08:00
|
|
|
|
public const float HEIGHT = 15;
|
|
|
|
|
|
|
|
|
|
public const float EXPANDED_SIZE = 50;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
2023-02-03 00:23:09 +08:00
|
|
|
|
public RoundedNub()
|
2017-02-04 16:50:58 +08:00
|
|
|
|
{
|
2021-10-15 11:13:42 +08:00
|
|
|
|
Size = new Vector2(EXPANDED_SIZE, HEIGHT);
|
2017-02-04 16:50:58 +08:00
|
|
|
|
}
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
2023-01-26 20:53:17 +08:00
|
|
|
|
protected override Container CreateNubContainer() =>
|
|
|
|
|
new CircularContainer
|
2017-02-04 16:50:58 +08:00
|
|
|
|
{
|
2023-01-26 20:41:14 +08:00
|
|
|
|
BorderColour = Colour4.White,
|
|
|
|
|
BorderThickness = BORDER_WIDTH,
|
|
|
|
|
Masking = true,
|
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
|
|
|
|
Anchor = Anchor.TopCentre,
|
|
|
|
|
Origin = Anchor.TopCentre,
|
2017-02-04 16:50:58 +08:00
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|