osu/osu.Game.Rulesets.Mania/Edit/Blueprints/ManiaSelectionBlueprint.cs

59 lines
1.5 KiB
C#
Raw Normal View History

// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
2018-11-13 07:42:40 +00:00
using osu.Framework.Allocation;
2018-11-12 08:18:58 +00:00
using osu.Framework.Graphics;
2018-11-13 07:42:40 +00:00
using osu.Framework.Timing;
using osu.Game.Rulesets.Edit;
using osu.Game.Rulesets.Mania.Objects.Drawables;
using osu.Game.Rulesets.Objects.Drawables;
2018-11-13 07:42:40 +00:00
using osu.Game.Rulesets.UI.Scrolling;
using osuTK;
namespace osu.Game.Rulesets.Mania.Edit.Blueprints
{
public class ManiaSelectionBlueprint : SelectionBlueprint
{
protected new DrawableManiaHitObject HitObject => (DrawableManiaHitObject)base.HitObject;
2018-11-13 07:42:40 +00:00
protected IClock EditorClock { get; private set; }
[Resolved]
private IScrollingInfo scrollingInfo { get; set; }
2018-11-15 12:37:22 +00:00
[Resolved]
private IManiaHitObjectComposer composer { get; set; }
public ManiaSelectionBlueprint(DrawableHitObject hitObject)
: base(hitObject)
{
2018-11-12 08:18:58 +00:00
RelativeSizeAxes = Axes.None;
}
2018-11-13 07:42:40 +00:00
[BackgroundDependencyLoader]
private void load(IAdjustableClock clock)
{
EditorClock = clock;
}
protected override void Update()
{
base.Update();
Position = Parent.ToLocalSpace(HitObject.ToScreenSpace(Vector2.Zero));
}
}
public override void Show()
{
HitObject.AlwaysAlive = true;
base.Show();
}
public override void Hide()
{
HitObject.AlwaysAlive = false;
base.Hide();
}
}