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-11-07 07:21:32 +00:00
|
|
|
|
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-07 07:21:32 +00:00
|
|
|
using osu.Game.Rulesets.Edit;
|
2018-11-26 02:34:25 +00:00
|
|
|
using osu.Game.Rulesets.Mania.Objects.Drawables;
|
2018-11-07 07:21:32 +00:00
|
|
|
using osu.Game.Rulesets.Objects.Drawables;
|
2018-11-13 07:42:40 +00:00
|
|
|
using osu.Game.Rulesets.UI.Scrolling;
|
2018-11-21 10:59:22 +00:00
|
|
|
using osuTK;
|
2018-11-07 07:21:32 +00:00
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Mania.Edit.Blueprints
|
|
|
|
{
|
2020-05-25 09:26:21 +00:00
|
|
|
public abstract class ManiaSelectionBlueprint : OverlaySelectionBlueprint
|
2018-11-07 07:21:32 +00:00
|
|
|
{
|
2019-10-21 08:04:56 +00:00
|
|
|
public new DrawableManiaHitObject DrawableObject => (DrawableManiaHitObject)base.DrawableObject;
|
2018-11-26 02:34:25 +00:00
|
|
|
|
2018-11-13 07:42:40 +00:00
|
|
|
[Resolved]
|
|
|
|
private IScrollingInfo scrollingInfo { get; set; }
|
|
|
|
|
2020-05-25 09:26:21 +00:00
|
|
|
protected ManiaSelectionBlueprint(DrawableHitObject drawableObject)
|
2019-10-21 08:04:56 +00:00
|
|
|
: base(drawableObject)
|
2018-11-07 07:21:32 +00:00
|
|
|
{
|
2018-11-12 08:18:58 +00:00
|
|
|
RelativeSizeAxes = Axes.None;
|
2018-11-07 07:21:32 +00:00
|
|
|
}
|
|
|
|
|
2018-11-13 06:45:06 +00:00
|
|
|
protected override void Update()
|
|
|
|
{
|
|
|
|
base.Update();
|
|
|
|
|
2019-10-21 08:04:56 +00:00
|
|
|
Position = Parent.ToLocalSpace(DrawableObject.ToScreenSpace(Vector2.Zero));
|
2018-11-13 06:45:06 +00:00
|
|
|
}
|
2018-11-26 02:34:25 +00:00
|
|
|
|
|
|
|
public override void Show()
|
|
|
|
{
|
2019-10-21 08:04:56 +00:00
|
|
|
DrawableObject.AlwaysAlive = true;
|
2018-11-26 02:34:25 +00:00
|
|
|
base.Show();
|
|
|
|
}
|
|
|
|
|
|
|
|
public override void Hide()
|
|
|
|
{
|
2019-10-21 08:04:56 +00:00
|
|
|
DrawableObject.AlwaysAlive = false;
|
2018-11-26 02:34:25 +00:00
|
|
|
base.Hide();
|
2018-11-26 02:47:48 +00:00
|
|
|
}
|
2018-11-07 07:21:32 +00:00
|
|
|
}
|
|
|
|
}
|