mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 02:42:54 +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)
|
: base(slider)
|
||||||
{
|
{
|
||||||
this.position = position;
|
this.position = position;
|
||||||
|
|
||||||
InternalChild = CirclePiece = new HitCirclePiece();
|
InternalChild = CirclePiece = new HitCirclePiece();
|
||||||
|
|
||||||
Select();
|
Select();
|
||||||
|
@ -58,7 +58,7 @@ namespace osu.Game.Tests.Visual.Editor
|
|||||||
},
|
},
|
||||||
new TimelineArea
|
new TimelineArea
|
||||||
{
|
{
|
||||||
Child = new TimelineBlueprintContainer(editorBeatmap),
|
Child = new TimelineBlueprintContainer(),
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
RelativeSizeAxes = Axes.X,
|
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()
|
protected override void LoadComplete()
|
||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
@ -94,6 +91,9 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
|||||||
beatmap.HitObjectRemoved += removeBlueprintFor;
|
beatmap.HitObjectRemoved += removeBlueprintFor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected virtual Container<SelectionBlueprint> CreateSelectionBlueprintContainer() =>
|
||||||
|
new Container<SelectionBlueprint> { RelativeSizeAxes = Axes.Both };
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates a <see cref="SelectionHandler"/> which outlines <see cref="DrawableHitObject"/>s and handles movement of selections.
|
/// Creates a <see cref="SelectionHandler"/> which outlines <see cref="DrawableHitObject"/>s and handles movement of selections.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -23,7 +23,7 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
|||||||
|
|
||||||
private DragEvent lastDragEvent;
|
private DragEvent lastDragEvent;
|
||||||
|
|
||||||
public TimelineBlueprintContainer(EditorBeatmap beatmap)
|
public TimelineBlueprintContainer()
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both;
|
RelativeSizeAxes = Axes.Both;
|
||||||
Anchor = Anchor.Centre;
|
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()
|
protected override void LoadComplete()
|
||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
DragBox.Alpha = 0;
|
DragBox.Alpha = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override Container<SelectionBlueprint> CreateSelectionBlueprintContainer() => new TimelineSelectionBlueprintContainer { RelativeSizeAxes = Axes.Both };
|
||||||
|
|
||||||
protected override void OnDrag(DragEvent e)
|
protected override void OnDrag(DragEvent e)
|
||||||
{
|
{
|
||||||
if (timeline != null)
|
if (timeline != null)
|
||||||
|
@ -32,6 +32,6 @@ namespace osu.Game.Screens.Edit.Compose
|
|||||||
return beatmapSkinProvider.WithChild(rulesetSkinProvider.WithChild(composer));
|
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