1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 16:47:24 +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, RelativeSizeAxes = Axes.Y,
Height = 0.5f, Height = 0.5f,
Icon = FontAwesome.fa_search_plus, Icon = FontAwesome.fa_search_plus,
// Action = () => timelineContainer.Zoom++ Action = () => timelineContainer.Zoom++
}, },
new TimelineButton new TimelineButton
{ {
@ -103,7 +103,7 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Timeline
RelativeSizeAxes = Axes.Y, RelativeSizeAxes = Axes.Y,
Height = 0.5f, Height = 0.5f,
Icon = FontAwesome.fa_search_minus, 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); 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() protected override void Update()
{ {
base.Update(); base.Update();