From f41d31e1db2f2a1b2d4e398662cec4bddf8cca97 Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Thu, 5 Apr 2018 19:32:23 +0900 Subject: [PATCH] ScrollableTimeline -> TimelineContainer --- .../Visual/TestCaseEditorComposeTimeline.cs | 8 ++++---- osu.Game/Screens/Edit/Screens/Compose/Compose.cs | 6 +++--- ...crollableTimeline.cs => TimelineContainer.cs} | 16 ++++++++-------- 3 files changed, 15 insertions(+), 15 deletions(-) rename osu.Game/Screens/Edit/Screens/Compose/Timeline/{ScrollableTimeline.cs => TimelineContainer.cs} (90%) diff --git a/osu.Game.Tests/Visual/TestCaseEditorComposeTimeline.cs b/osu.Game.Tests/Visual/TestCaseEditorComposeTimeline.cs index 0e7ba5c900..5323ac44b1 100644 --- a/osu.Game.Tests/Visual/TestCaseEditorComposeTimeline.cs +++ b/osu.Game.Tests/Visual/TestCaseEditorComposeTimeline.cs @@ -16,9 +16,9 @@ namespace osu.Game.Tests.Visual [TestFixture] public class TestCaseEditorComposeTimeline : OsuTestCase { - public override IReadOnlyList RequiredTypes => new[] { typeof(ScrollableTimeline), typeof(ScrollingTimelineContainer), typeof(BeatmapWaveformGraph), typeof(TimelineButton) }; + public override IReadOnlyList RequiredTypes => new[] { typeof(TimelineContainer), typeof(Timeline), typeof(BeatmapWaveformGraph), typeof(TimelineButton) }; - private readonly ScrollableTimeline timeline; + private readonly TimelineContainer timelineContainer; public TestCaseEditorComposeTimeline() { @@ -30,7 +30,7 @@ namespace osu.Game.Tests.Visual Origin = Anchor.TopCentre, State = Visibility.Visible }, - timeline = new ScrollableTimeline + timelineContainer = new TimelineContainer { Anchor = Anchor.Centre, Origin = Anchor.Centre, @@ -43,7 +43,7 @@ namespace osu.Game.Tests.Visual [BackgroundDependencyLoader] private void load(OsuGameBase osuGame) { - timeline.Beatmap.BindTo(osuGame.Beatmap); + timelineContainer.Beatmap.BindTo(osuGame.Beatmap); } } } diff --git a/osu.Game/Screens/Edit/Screens/Compose/Compose.cs b/osu.Game/Screens/Edit/Screens/Compose/Compose.cs index 91adc8324a..d04c4c9c0f 100644 --- a/osu.Game/Screens/Edit/Screens/Compose/Compose.cs +++ b/osu.Game/Screens/Edit/Screens/Compose/Compose.cs @@ -31,7 +31,7 @@ namespace osu.Game.Screens.Edit.Screens.Compose { dependencies.Cache(beatDivisor); - ScrollableTimeline timeline; + TimelineContainer timelineContainer; Children = new Drawable[] { new GridContainer @@ -68,7 +68,7 @@ namespace osu.Game.Screens.Edit.Screens.Compose { RelativeSizeAxes = Axes.Both, Padding = new MarginPadding { Right = 5 }, - Child = timeline = new ScrollableTimeline { RelativeSizeAxes = Axes.Both } + Child = timelineContainer = new TimelineContainer { RelativeSizeAxes = Axes.Both } }, new BeatDivisorControl(beatDivisor) { RelativeSizeAxes = Axes.Both } }, @@ -97,7 +97,7 @@ namespace osu.Game.Screens.Edit.Screens.Compose }, }; - timeline.Beatmap.BindTo(Beatmap); + timelineContainer.Beatmap.BindTo(Beatmap); var ruleset = Beatmap.Value.BeatmapInfo.Ruleset?.CreateInstance(); if (ruleset == null) diff --git a/osu.Game/Screens/Edit/Screens/Compose/Timeline/ScrollableTimeline.cs b/osu.Game/Screens/Edit/Screens/Compose/Timeline/TimelineContainer.cs similarity index 90% rename from osu.Game/Screens/Edit/Screens/Compose/Timeline/ScrollableTimeline.cs rename to osu.Game/Screens/Edit/Screens/Compose/Timeline/TimelineContainer.cs index 31466e960f..95a8937b9b 100644 --- a/osu.Game/Screens/Edit/Screens/Compose/Timeline/ScrollableTimeline.cs +++ b/osu.Game/Screens/Edit/Screens/Compose/Timeline/TimelineContainer.cs @@ -12,13 +12,13 @@ using osu.Game.Graphics.UserInterface; namespace osu.Game.Screens.Edit.Screens.Compose.Timeline { - public class ScrollableTimeline : CompositeDrawable + public class TimelineContainer : CompositeDrawable { public readonly Bindable Beatmap = new Bindable(); - private readonly ScrollingTimelineContainer timelineContainer; + private readonly Timeline timeline; - public ScrollableTimeline() + public TimelineContainer() { Masking = true; CornerRadius = 5; @@ -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 = () => timeline.Zoom++ }, new TimelineButton { @@ -103,13 +103,13 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Timeline RelativeSizeAxes = Axes.Y, Height = 0.5f, Icon = FontAwesome.fa_search_minus, - Action = () => timelineContainer.Zoom-- + Action = () => timeline.Zoom-- }, } } } }, - timelineContainer = new ScrollingTimelineContainer { RelativeSizeAxes = Axes.Both } + timeline = new Timeline { RelativeSizeAxes = Axes.Both } }, }, ColumnDimensions = new[] @@ -125,8 +125,8 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Timeline hitSoundsCheckbox.Current.Value = true; waveformCheckbox.Current.Value = true; - timelineContainer.Beatmap.BindTo(Beatmap); - timelineContainer.WaveformVisible.BindTo(waveformCheckbox.Current); + timeline.Beatmap.BindTo(Beatmap); + timeline.WaveformVisible.BindTo(waveformCheckbox.Current); } } }