ScrollableTimeline -> TimelineContainer

This commit is contained in:
smoogipoo 2018-04-05 19:32:23 +09:00
parent 9a9ed1d630
commit f41d31e1db
3 changed files with 15 additions and 15 deletions

View File

@ -16,9 +16,9 @@ namespace osu.Game.Tests.Visual
[TestFixture]
public class TestCaseEditorComposeTimeline : OsuTestCase
{
public override IReadOnlyList<Type> RequiredTypes => new[] { typeof(ScrollableTimeline), typeof(ScrollingTimelineContainer), typeof(BeatmapWaveformGraph), typeof(TimelineButton) };
public override IReadOnlyList<Type> 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);
}
}
}

View File

@ -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)

View File

@ -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<WorkingBeatmap> Beatmap = new Bindable<WorkingBeatmap>();
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);
}
}
}