mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Apply remaining changes required to restore previous functionality
This commit is contained in:
@ -1,11 +1,14 @@
|
||||
// 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.
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Primitives;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Framework.Input.Events;
|
||||
using osu.Game.Rulesets.Objects;
|
||||
using osu.Game.Rulesets.Objects.Types;
|
||||
using osu.Game.Screens.Edit.Components.Timelines.Summary.Parts;
|
||||
@ -26,7 +29,7 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
||||
|
||||
this.beatmap = beatmap;
|
||||
|
||||
AddInternal(content = new TimelinePart());
|
||||
AddInternal(content = new TimelinePart { RelativeSizeAxes = Axes.Both });
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
@ -44,6 +47,12 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
||||
};
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
DragBox.Alpha = 0;
|
||||
}
|
||||
|
||||
private void remove(HitObject h)
|
||||
{
|
||||
foreach (var d in content.OfType<TimelineHitObjectRepresentation>().Where(c => c.HitObject == h))
|
||||
@ -57,6 +66,25 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
||||
content.Add(new TimelineHitObjectRepresentation(h) { Y = -yOffset * TimelineHitObjectRepresentation.THICKNESS });
|
||||
}
|
||||
|
||||
protected override bool OnMouseDown(MouseDownEvent e)
|
||||
{
|
||||
base.OnMouseDown(e);
|
||||
|
||||
return false; // tempoerary until we correctly handle selections.
|
||||
}
|
||||
|
||||
protected override DragBox CreateDragBox(Action<RectangleF> performSelect) => new NoDragDragBox(performSelect);
|
||||
|
||||
internal class NoDragDragBox : DragBox
|
||||
{
|
||||
public NoDragDragBox(Action<RectangleF> performSelect)
|
||||
: base(performSelect)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool UpdateDrag(MouseButtonEvent e) => false;
|
||||
}
|
||||
|
||||
private class TimelineHitObjectRepresentation : CompositeDrawable
|
||||
{
|
||||
public const float THICKNESS = 3;
|
||||
|
Reference in New Issue
Block a user