1
0
mirror of https://github.com/ppy/osu.git synced 2026-06-05 04:33:39 +08:00

General refactoring

This commit is contained in:
smoogipoo
2020-01-24 17:50:36 +09:00
Unverified
parent 6fc6a376ee
commit 811ddb02a4
5 changed files with 9 additions and 8 deletions
@@ -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();
}
}