mirror of
https://github.com/ppy/osu.git
synced 2025-02-21 03:02:54 +08:00
wip
This commit is contained in:
parent
0a840a2613
commit
4ebb28d3e7
@ -76,5 +76,7 @@ namespace osu.Game.Rulesets.Mania.Edit.Blueprints
|
|||||||
}
|
}
|
||||||
|
|
||||||
public override Quad SelectionQuad => ScreenSpaceDrawQuad;
|
public override Quad SelectionQuad => ScreenSpaceDrawQuad;
|
||||||
|
|
||||||
|
public override Vector2 SelectionPoint => DrawableObject.Head.ScreenSpaceDrawQuad.Centre;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -35,7 +35,7 @@ namespace osu.Game.Rulesets.Mania.Edit
|
|||||||
var maniaBlueprint = (ManiaSelectionBlueprint)moveEvent.Blueprint;
|
var maniaBlueprint = (ManiaSelectionBlueprint)moveEvent.Blueprint;
|
||||||
int lastColumn = maniaBlueprint.DrawableObject.HitObject.Column;
|
int lastColumn = maniaBlueprint.DrawableObject.HitObject.Column;
|
||||||
|
|
||||||
adjustOrigins(maniaBlueprint);
|
// adjustOrigins(maniaBlueprint);
|
||||||
performDragMovement(moveEvent);
|
performDragMovement(moveEvent);
|
||||||
performColumnMovement(lastColumn, moveEvent);
|
performColumnMovement(lastColumn, moveEvent);
|
||||||
|
|
||||||
@ -71,7 +71,7 @@ namespace osu.Game.Rulesets.Mania.Edit
|
|||||||
// When scrolling downwards the anchor position is at the bottom of the screen, however the movement event assumes the anchor is at the top of the screen.
|
// When scrolling downwards the anchor position is at the bottom of the screen, however the movement event assumes the anchor is at the top of the screen.
|
||||||
// This causes the delta to assume a positive hitobject position, and which can be corrected for by subtracting the parent height.
|
// This causes the delta to assume a positive hitobject position, and which can be corrected for by subtracting the parent height.
|
||||||
if (scrollingInfo.Direction.Value == ScrollingDirection.Down)
|
if (scrollingInfo.Direction.Value == ScrollingDirection.Down)
|
||||||
delta -= moveEvent.Blueprint.Parent.DrawHeight; // todo: probably wrong
|
delta -= moveEvent.Blueprint.Parent.DrawHeight; // todo: definitely wrong
|
||||||
|
|
||||||
foreach (var selectionBlueprint in SelectedBlueprints)
|
foreach (var selectionBlueprint in SelectedBlueprints)
|
||||||
{
|
{
|
||||||
|
@ -401,15 +401,18 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
|||||||
|
|
||||||
HitObject draggedObject = movementBlueprint.HitObject;
|
HitObject draggedObject = movementBlueprint.HitObject;
|
||||||
|
|
||||||
// The final movement position, relative to screenSpaceMovementStartPosition
|
// The final movement position, relative to movementBlueprintOriginalPosition
|
||||||
Vector2 movePosition = movementBlueprintOriginalPosition.Value + e.ScreenSpaceMousePosition - e.ScreenSpaceMouseDownPosition;
|
Vector2 movePosition = movementBlueprintOriginalPosition.Value + e.ScreenSpaceMousePosition - e.ScreenSpaceMouseDownPosition;
|
||||||
|
|
||||||
(Vector2 snappedPosition, double snappedTime) = snapProvider.GetSnappedPosition(ToLocalSpace(movePosition), draggedObject.StartTime);
|
(Vector2 snappedPosition, _) = snapProvider.GetSnappedPosition(ToLocalSpace(movePosition), draggedObject.StartTime);
|
||||||
|
|
||||||
// Move the hitobjects
|
// Move the hitobjects
|
||||||
if (!selectionHandler.HandleMovement(new MoveSelectionEvent(movementBlueprint, ToScreenSpace(snappedPosition))))
|
if (!selectionHandler.HandleMovement(new MoveSelectionEvent(movementBlueprint, ToScreenSpace(snappedPosition))))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
// Todo: Temp
|
||||||
|
(_, double snappedTime) = snapProvider.GetSnappedPosition(ToLocalSpace(snappedPosition), draggedObject.StartTime);
|
||||||
|
|
||||||
// Apply the start time at the newly snapped-to position
|
// Apply the start time at the newly snapped-to position
|
||||||
double offset = snappedTime - draggedObject.StartTime;
|
double offset = snappedTime - draggedObject.StartTime;
|
||||||
foreach (HitObject obj in selectionHandler.SelectedHitObjects)
|
foreach (HitObject obj in selectionHandler.SelectedHitObjects)
|
||||||
|
@ -23,6 +23,7 @@ namespace osu.Game.Tests.Beatmaps
|
|||||||
HitObjects = baseBeatmap.HitObjects;
|
HitObjects = baseBeatmap.HitObjects;
|
||||||
|
|
||||||
BeatmapInfo.Ruleset = ruleset;
|
BeatmapInfo.Ruleset = ruleset;
|
||||||
|
BeatmapInfo.RulesetID = ruleset.ID ?? 0;
|
||||||
BeatmapInfo.BeatmapSet.Metadata = BeatmapInfo.Metadata;
|
BeatmapInfo.BeatmapSet.Metadata = BeatmapInfo.Metadata;
|
||||||
BeatmapInfo.BeatmapSet.Beatmaps = new List<BeatmapInfo> { BeatmapInfo };
|
BeatmapInfo.BeatmapSet.Beatmaps = new List<BeatmapInfo> { BeatmapInfo };
|
||||||
BeatmapInfo.BeatmapSet.OnlineInfo = new BeatmapSetOnlineInfo
|
BeatmapInfo.BeatmapSet.OnlineInfo = new BeatmapSetOnlineInfo
|
||||||
|
Loading…
Reference in New Issue
Block a user