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

47 lines
1.3 KiB
C#
Raw Normal View History

// 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-11-13 07:42:40 +00:00
using osu.Framework.Allocation;
2018-11-12 08:18:58 +00:00
using osu.Framework.Graphics;
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 abstract class ManiaSelectionBlueprint : OverlaySelectionBlueprint
{
public new DrawableManiaHitObject DrawableObject => (DrawableManiaHitObject)base.DrawableObject;
2018-11-13 07:42:40 +00:00
[Resolved]
private IScrollingInfo scrollingInfo { get; set; }
protected ManiaSelectionBlueprint(DrawableHitObject drawableObject)
: base(drawableObject)
{
2018-11-12 08:18:58 +00:00
RelativeSizeAxes = Axes.None;
}
protected override void Update()
{
base.Update();
Position = Parent.ToLocalSpace(DrawableObject.ToScreenSpace(Vector2.Zero));
}
public override void Show()
{
DrawableObject.AlwaysAlive = true;
base.Show();
}
public override void Hide()
{
DrawableObject.AlwaysAlive = false;
base.Hide();
2018-11-26 02:47:48 +00:00
}
}
}