mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 01:52:55 +08:00
General refactoring
This commit is contained in:
parent
6fc6a376ee
commit
811ddb02a4
@ -17,6 +17,7 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders
|
||||
: base(slider)
|
||||
{
|
||||
this.position = position;
|
||||
|
||||
InternalChild = CirclePiece = new HitCirclePiece();
|
||||
|
||||
Select();
|
||||
|
@ -58,7 +58,7 @@ namespace osu.Game.Tests.Visual.Editor
|
||||
},
|
||||
new TimelineArea
|
||||
{
|
||||
Child = new TimelineBlueprintContainer(editorBeatmap),
|
||||
Child = new TimelineBlueprintContainer(),
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
RelativeSizeAxes = Axes.X,
|
||||
|
@ -83,9 +83,6 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
};
|
||||
}
|
||||
|
||||
protected virtual Container<SelectionBlueprint> CreateSelectionBlueprintContainer() =>
|
||||
new Container<SelectionBlueprint> { RelativeSizeAxes = Axes.Both };
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
@ -94,6 +91,9 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
beatmap.HitObjectRemoved += removeBlueprintFor;
|
||||
}
|
||||
|
||||
protected virtual Container<SelectionBlueprint> CreateSelectionBlueprintContainer() =>
|
||||
new Container<SelectionBlueprint> { RelativeSizeAxes = Axes.Both };
|
||||
|
||||
/// <summary>
|
||||
/// Creates a <see cref="SelectionHandler"/> which outlines <see cref="DrawableHitObject"/>s and handles movement of selections.
|
||||
/// </summary>
|
||||
|
@ -23,7 +23,7 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
||||
|
||||
private DragEvent lastDragEvent;
|
||||
|
||||
public TimelineBlueprintContainer(EditorBeatmap beatmap)
|
||||
public TimelineBlueprintContainer()
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both;
|
||||
Anchor = Anchor.Centre;
|
||||
@ -39,14 +39,14 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
||||
});
|
||||
}
|
||||
|
||||
protected override Container<SelectionBlueprint> CreateSelectionBlueprintContainer() => new TimelineSelectionBlueprintContainer { RelativeSizeAxes = Axes.Both };
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
DragBox.Alpha = 0;
|
||||
}
|
||||
|
||||
protected override Container<SelectionBlueprint> CreateSelectionBlueprintContainer() => new TimelineSelectionBlueprintContainer { RelativeSizeAxes = Axes.Both };
|
||||
|
||||
protected override void OnDrag(DragEvent e)
|
||||
{
|
||||
if (timeline != null)
|
||||
|
@ -32,6 +32,6 @@ namespace osu.Game.Screens.Edit.Compose
|
||||
return beatmapSkinProvider.WithChild(rulesetSkinProvider.WithChild(composer));
|
||||
}
|
||||
|
||||
protected override Drawable CreateTimelineContent() => composer == null ? base.CreateTimelineContent() : new TimelineBlueprintContainer(EditorBeatmap);
|
||||
protected override Drawable CreateTimelineContent() => composer == null ? base.CreateTimelineContent() : new TimelineBlueprintContainer();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user