1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 16:43:00 +08:00

return a string instead

This commit is contained in:
Nathan Alo 2021-03-29 17:29:05 +08:00
parent 21398e25b5
commit 9a02f3868c
3 changed files with 5 additions and 5 deletions

View File

@ -120,7 +120,7 @@ namespace osu.Game.Rulesets.Mania.Edit
}
}
public override IEnumerable<string> ConvertSelectionToString()
=> EditorBeatmap.SelectedHitObjects.Cast<ManiaHitObject>().Select(h => $"{h.StartTime}|{h.Column}");
public override string ConvertSelectionToString()
=> string.Join(',', EditorBeatmap.SelectedHitObjects.Cast<ManiaHitObject>().OrderBy(h => h.StartTime).Select(h => $"{h.StartTime}|{h.Column}"));
}
}

View File

@ -82,8 +82,8 @@ namespace osu.Game.Rulesets.Osu.Edit
protected override ComposeBlueprintContainer CreateBlueprintContainer()
=> new OsuBlueprintContainer(this);
public override IEnumerable<string> ConvertSelectionToString()
=> selectedHitObjects.Cast<OsuHitObject>().Select(h => (h.IndexInCurrentCombo + 1).ToString());
public override string ConvertSelectionToString()
=> string.Join(',', selectedHitObjects.Cast<OsuHitObject>().OrderBy(h => h.StartTime).Select(h => (h.IndexInCurrentCombo + 1).ToString()));
private DistanceSnapGrid distanceSnapGrid;
private Container distanceSnapGridContainer;

View File

@ -438,7 +438,7 @@ namespace osu.Game.Rulesets.Edit
/// </summary>
public abstract bool CursorInPlacementArea { get; }
public virtual IEnumerable<string> ConvertSelectionToString() => Array.Empty<string>();
public virtual string ConvertSelectionToString() => string.Empty;
#region IPositionSnapProvider