mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 15:12:57 +08:00
Remove instances of "waveform"
This commit is contained in:
parent
9b060b1bdf
commit
f07928446d
@ -61,14 +61,14 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Timeline
|
|||||||
private class TransformZoom : Transform<float, ZoomableScrollContainer>
|
private class TransformZoom : Transform<float, ZoomableScrollContainer>
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The focus point in the waveform, in absolute coordinates local to the waveform.
|
/// The focus point in absolute coordinates local to the content.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private readonly float focusPoint;
|
private readonly float focusPoint;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The size of the waveform.
|
/// The size of the content.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private readonly float waveformSize;
|
private readonly float contentSize;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The scroll offset at the start of the transform.
|
/// The scroll offset at the start of the transform.
|
||||||
@ -78,13 +78,13 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Timeline
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Transforms <see cref="TimeTimelinem"/> to a new value.
|
/// Transforms <see cref="TimeTimelinem"/> to a new value.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="focusPoint">The focus point in the waveform, in absolute coordinates local to the waveform.</param>
|
/// <param name="focusPoint">The focus point in absolute coordinates local to the content.</param>
|
||||||
/// <param name="waveformSize">The size of the waveform.</param>
|
/// <param name="contentSize">The size of the content.</param>
|
||||||
/// <param name="scrollOffset">The scroll offset at the start of the transform.</param>
|
/// <param name="scrollOffset">The scroll offset at the start of the transform.</param>
|
||||||
public TransformZoom(float focusPoint, float waveformSize, float scrollOffset)
|
public TransformZoom(float focusPoint, float contentSize, float scrollOffset)
|
||||||
{
|
{
|
||||||
this.focusPoint = focusPoint;
|
this.focusPoint = focusPoint;
|
||||||
this.waveformSize = waveformSize;
|
this.contentSize = contentSize;
|
||||||
this.scrollOffset = scrollOffset;
|
this.scrollOffset = scrollOffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -104,7 +104,7 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Timeline
|
|||||||
|
|
||||||
float focusOffset = focusPoint - scrollOffset;
|
float focusOffset = focusPoint - scrollOffset;
|
||||||
float expectedWidth = d.DrawWidth * newZoom;
|
float expectedWidth = d.DrawWidth * newZoom;
|
||||||
float targetOffset = expectedWidth * (focusPoint / waveformSize) - focusOffset;
|
float targetOffset = expectedWidth * (focusPoint / contentSize) - focusOffset;
|
||||||
|
|
||||||
d.currentZoom = newZoom;
|
d.currentZoom = newZoom;
|
||||||
d.ScrollTo(targetOffset, false);
|
d.ScrollTo(targetOffset, false);
|
||||||
|
Loading…
Reference in New Issue
Block a user