This commit is contained in:
smoogipoo 2020-04-28 15:34:41 +09:00
parent 330521a2ae
commit 3eb7c8755c
3 changed files with 1 additions and 43 deletions

View File

@ -29,8 +29,6 @@ public class TestSceneManiaHitObjectComposer : EditorClockTestScene
protected override Container<Drawable> Content { get; }
private ManiaHitObjectComposer composer;
public TestSceneManiaHitObjectComposer()
{
base.Content.Add(new Container
@ -60,7 +58,7 @@ public void Setup() => Schedule(() =>
{
Children = new Drawable[]
{
composer = new ManiaHitObjectComposer(new ManiaRuleset())
new ManiaHitObjectComposer(new ManiaRuleset())
};
BeatDivisor.Value = 8;

View File

@ -3,8 +3,6 @@
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Input.Events;
using osu.Framework.Timing;
using osu.Game.Rulesets.Edit;
using osu.Game.Rulesets.Mania.Objects.Drawables;
using osu.Game.Rulesets.Objects.Drawables;
@ -15,13 +13,8 @@ namespace osu.Game.Rulesets.Mania.Edit.Blueprints
{
public class ManiaSelectionBlueprint : OverlaySelectionBlueprint
{
public Vector2 ScreenSpaceDragPosition { get; private set; }
public Vector2 DragPosition { get; private set; }
public new DrawableManiaHitObject DrawableObject => (DrawableManiaHitObject)base.DrawableObject;
protected IClock EditorClock { get; private set; }
[Resolved]
private IScrollingInfo scrollingInfo { get; set; }
@ -34,12 +27,6 @@ public ManiaSelectionBlueprint(DrawableHitObject drawableObject)
RelativeSizeAxes = Axes.None;
}
[BackgroundDependencyLoader]
private void load(IAdjustableClock clock)
{
EditorClock = clock;
}
protected override void Update()
{
base.Update();
@ -47,22 +34,6 @@ protected override void Update()
Position = Parent.ToLocalSpace(DrawableObject.ToScreenSpace(Vector2.Zero));
}
protected override bool OnMouseDown(MouseDownEvent e)
{
ScreenSpaceDragPosition = e.ScreenSpaceMousePosition;
DragPosition = DrawableObject.ToLocalSpace(e.ScreenSpaceMousePosition);
return base.OnMouseDown(e);
}
protected override void OnDrag(DragEvent e)
{
base.OnDrag(e);
ScreenSpaceDragPosition = e.ScreenSpaceMousePosition;
DragPosition = DrawableObject.ToLocalSpace(e.ScreenSpaceMousePosition);
}
public override void Show()
{
DrawableObject.AlwaysAlive = true;

View File

@ -4,11 +4,9 @@
using System;
using System.Linq;
using osu.Framework.Allocation;
using osu.Framework.Timing;
using osu.Game.Rulesets.Edit;
using osu.Game.Rulesets.Mania.Edit.Blueprints;
using osu.Game.Rulesets.Mania.Objects;
using osu.Game.Rulesets.UI;
using osu.Game.Rulesets.UI.Scrolling;
using osu.Game.Screens.Edit.Compose.Components;
@ -22,14 +20,6 @@ public class ManiaSelectionHandler : SelectionHandler
[Resolved]
private IManiaHitObjectComposer composer { get; set; }
private IClock editorClock;
[BackgroundDependencyLoader]
private void load(IAdjustableClock clock)
{
editorClock = clock;
}
public override bool HandleMovement(MoveSelectionEvent moveEvent)
{
var maniaBlueprint = (ManiaSelectionBlueprint)moveEvent.Blueprint;
@ -50,7 +40,6 @@ private void performDragMovement(MoveSelectionEvent moveEvent)
var b = (OverlaySelectionBlueprint)selectionBlueprint;
var hitObject = b.DrawableObject;
var objectParent = (HitObjectContainer)hitObject.Parent;
// We receive multiple movement events per frame such that we can't rely on updating the start time
// since the scrolling hitobject container requires at least one update frame to update the position.