2019-01-24 08:43:03 +00: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-07-20 11:02:02 +00:00
|
|
|
|
|
2022-06-17 07:37:17 +00:00
|
|
|
|
#nullable disable
|
|
|
|
|
|
2018-07-27 09:26:37 +00:00
|
|
|
|
using osu.Game.Graphics.UserInterface;
|
2018-11-20 07:51:59 +00:00
|
|
|
|
using osuTK;
|
2018-07-20 11:02:02 +00:00
|
|
|
|
|
2018-08-15 07:47:20 +00:00
|
|
|
|
namespace osu.Game.Screens.Edit.Components
|
2018-07-20 11:02:02 +00:00
|
|
|
|
{
|
2018-08-15 07:47:20 +00:00
|
|
|
|
public class CircularButton : OsuButton
|
2018-07-20 11:02:02 +00:00
|
|
|
|
{
|
2018-07-31 07:44:20 +00:00
|
|
|
|
private const float width = 125;
|
|
|
|
|
private const float height = 30;
|
2018-07-20 11:02:02 +00:00
|
|
|
|
|
2018-08-15 07:47:20 +00:00
|
|
|
|
public CircularButton()
|
2018-07-20 11:02:02 +00:00
|
|
|
|
{
|
2018-07-31 07:44:20 +00:00
|
|
|
|
Size = new Vector2(width, height);
|
2018-07-20 11:02:02 +00:00
|
|
|
|
}
|
|
|
|
|
|
2018-08-01 08:47:32 +00:00
|
|
|
|
protected override void Update()
|
2018-07-20 11:02:02 +00:00
|
|
|
|
{
|
2018-08-01 08:47:32 +00:00
|
|
|
|
base.Update();
|
|
|
|
|
Content.CornerRadius = DrawHeight / 2f;
|
2019-11-22 10:49:20 +00:00
|
|
|
|
Content.CornerExponent = 2;
|
2018-07-20 11:02:02 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|