mirror of
https://github.com/ppy/osu
synced 2024-12-14 19:06:07 +00:00
Rename methods and add xmldoc
This commit is contained in:
parent
64c499d9d6
commit
c5cae4e3ee
@ -36,7 +36,7 @@ namespace osu.Game.Screens.Edit.Components.Timelines.Summary.Parts
|
||||
// as an optimisation, don't add a visualisation if there are already groups with the same types in close proximity.
|
||||
// for newly added control points (ie. lazer editor first where group is added empty) we always skip for simplicity.
|
||||
// that is fine, because cases where this is causing a performance issue are mostly where external tools were used to create an insane number of points.
|
||||
if (Children.Any(g => Math.Abs(g.Group.Time - group.Time) < 1000 && g.IsRedundant(group)))
|
||||
if (Children.Any(g => Math.Abs(g.Group.Time - group.Time) < 1000 && g.IsVisuallyRedundant(group)))
|
||||
continue;
|
||||
|
||||
Add(new GroupVisualisation(group));
|
||||
|
@ -27,6 +27,6 @@ namespace osu.Game.Screens.Edit.Components.Timelines.Summary.Parts
|
||||
Colour = Point.GetRepresentingColour(colours);
|
||||
}
|
||||
|
||||
public bool IsRedundant(ControlPoint other) => other.GetType() == Point.GetType();
|
||||
public bool IsVisuallyRedundant(ControlPoint other) => other.GetType() == Point.GetType();
|
||||
}
|
||||
}
|
||||
|
@ -70,6 +70,6 @@ namespace osu.Game.Screens.Edit.Components.Timelines.Summary.Parts
|
||||
}
|
||||
|
||||
// kiai sections display duration, so are required to be visualised.
|
||||
public bool IsRedundant(ControlPoint other) => (other as EffectControlPoint)?.KiaiMode == effect.KiaiMode;
|
||||
public bool IsVisuallyRedundant(ControlPoint other) => (other as EffectControlPoint)?.KiaiMode == effect.KiaiMode;
|
||||
}
|
||||
}
|
||||
|
@ -61,9 +61,7 @@ namespace osu.Game.Screens.Edit.Components.Timelines.Summary.Parts
|
||||
/// <summary>
|
||||
/// For display purposes, check whether the proposed group is made redundant by this visualisation group.
|
||||
/// </summary>
|
||||
/// <param name="other"></param>
|
||||
/// <returns></returns>
|
||||
public bool IsRedundant(ControlPointGroup other) =>
|
||||
other.ControlPoints.Any(c => InternalChildren.OfType<IControlPointVisualisationRedundant>().Any(c2 => c2.IsRedundant(c)));
|
||||
public bool IsVisuallyRedundant(ControlPointGroup other) =>
|
||||
other.ControlPoints.Any(c => InternalChildren.OfType<IControlPointVisualisationRedundant>().Any(c2 => c2.IsVisuallyRedundant(c)));
|
||||
}
|
||||
}
|
||||
|
@ -7,6 +7,9 @@ namespace osu.Game.Screens.Edit.Components.Timelines.Summary.Parts
|
||||
{
|
||||
public interface IControlPointVisualisationRedundant
|
||||
{
|
||||
bool IsRedundant(ControlPoint other);
|
||||
/// <summary>
|
||||
/// For display purposes, check whether the proposed point is made redundant by this visualisation.
|
||||
/// </summary>
|
||||
bool IsVisuallyRedundant(ControlPoint other);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user