1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-20 00:52:55 +08:00
osu-lazer/osu.Game/Rulesets/Edit/Layers/Selection/OriginHandle.cs
2018-01-05 20:21:19 +09:00

51 lines
1.4 KiB
C#

// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics;
using OpenTK;
namespace osu.Game.Rulesets.Edit.Layers.Selection
{
/// <summary>
/// Represents the origin of a <see cref="HandleContainer"/>.
/// </summary>
public class OriginHandle : CompositeDrawable
{
private const float marker_size = 10;
private const float line_width = 2;
public OriginHandle()
{
Size = new Vector2(marker_size);
InternalChildren = new[]
{
new Box
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
RelativeSizeAxes = Axes.X,
Height = line_width
},
new Box
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
RelativeSizeAxes = Axes.Y,
Width = line_width
},
};
}
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
Colour = colours.Yellow;
}
}
}