mirror of
https://github.com/ppy/osu.git
synced 2024-12-26 17:52:54 +08:00
34 lines
907 B
C#
34 lines
907 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.Allocation;
|
|
using osu.Framework.Extensions.Color4Extensions;
|
|
using osu.Framework.Graphics;
|
|
using osu.Framework.Graphics.Shapes;
|
|
using osu.Game.Graphics;
|
|
using osuTK;
|
|
|
|
namespace osu.Game.Rulesets.Catch.Edit.Blueprints.Components
|
|
{
|
|
public class VertexPiece : Circle
|
|
{
|
|
[Resolved]
|
|
private OsuColour osuColour { get; set; }
|
|
|
|
public VertexPiece()
|
|
{
|
|
Anchor = Anchor.BottomLeft;
|
|
Origin = Anchor.Centre;
|
|
Size = new Vector2(15);
|
|
}
|
|
|
|
public void UpdateFrom(VertexState state)
|
|
{
|
|
Colour = state.IsSelected ? osuColour.Yellow.Lighten(1) : osuColour.Yellow;
|
|
Alpha = state.IsFixed ? 0.5f : 1;
|
|
}
|
|
}
|
|
}
|