1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:57:39 +08:00

Expose zoom publicly again, re-enable zoom buttons

This commit is contained in:
smoogipoo 2018-04-05 19:05:19 +09:00
parent 35e116cb12
commit 8da3c2c52a
2 changed files with 8 additions and 2 deletions

View File

@ -94,7 +94,7 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Timeline
RelativeSizeAxes = Axes.Y,
Height = 0.5f,
Icon = FontAwesome.fa_search_plus,
// Action = () => timelineContainer.Zoom++
Action = () => timelineContainer.Zoom++
},
new TimelineButton
{
@ -103,7 +103,7 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Timeline
RelativeSizeAxes = Axes.Y,
Height = 0.5f,
Icon = FontAwesome.fa_search_minus,
// Action = () => timelineContainer.Zoom--
Action = () => timelineContainer.Zoom--
},
}
}

View File

@ -44,6 +44,12 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Timeline
WaveformVisible.ValueChanged += visible => waveform.FadeTo(visible ? 1 : 0, 200, Easing.OutQuint);
}
public int Zoom
{
get => zoomTarget;
set => setZoomTarget(value, ToSpaceOfOtherDrawable(new Vector2(DrawWidth / 2, 0), waveformContainer).X);
}
protected override void Update()
{
base.Update();