mirror of
https://github.com/osukey/osukey.git
synced 2025-05-21 21:47:31 +09:00
Change default zoom of timing screen timeline to most zoomed out
This commit is contained in:
parent
e760ed8e01
commit
5b200a8ca4
@ -14,9 +14,9 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
|||||||
{
|
{
|
||||||
public class TimelineArea : Container
|
public class TimelineArea : Container
|
||||||
{
|
{
|
||||||
private readonly Timeline timeline = new Timeline { RelativeSizeAxes = Axes.Both };
|
public readonly Timeline Timeline = new Timeline { RelativeSizeAxes = Axes.Both };
|
||||||
|
|
||||||
protected override Container<Drawable> Content => timeline;
|
protected override Container<Drawable> Content => Timeline;
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load()
|
private void load()
|
||||||
@ -107,7 +107,7 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
timeline
|
Timeline
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
ColumnDimensions = new[]
|
ColumnDimensions = new[]
|
||||||
@ -121,9 +121,9 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
|||||||
|
|
||||||
waveformCheckbox.Current.Value = true;
|
waveformCheckbox.Current.Value = true;
|
||||||
|
|
||||||
timeline.WaveformVisible.BindTo(waveformCheckbox.Current);
|
Timeline.WaveformVisible.BindTo(waveformCheckbox.Current);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void changeZoom(float change) => timeline.Zoom += change;
|
private void changeZoom(float change) => Timeline.Zoom += change;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -115,10 +115,18 @@ namespace osu.Game.Screens.Edit
|
|||||||
new TimelineTickDisplay(),
|
new TimelineTickDisplay(),
|
||||||
CreateTimelineContent(),
|
CreateTimelineContent(),
|
||||||
}
|
}
|
||||||
}, timelineContainer.Add);
|
}, t =>
|
||||||
|
{
|
||||||
|
timelineContainer.Add(t);
|
||||||
|
OnTimelineLoaded(t);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected virtual void OnTimelineLoaded(TimelineArea timelineArea)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
protected abstract Drawable CreateMainContent();
|
protected abstract Drawable CreateMainContent();
|
||||||
|
|
||||||
protected virtual Drawable CreateTimelineContent() => new Container();
|
protected virtual Drawable CreateTimelineContent() => new Container();
|
||||||
|
@ -12,6 +12,7 @@ using osu.Game.Beatmaps.ControlPoints;
|
|||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.Containers;
|
using osu.Game.Graphics.Containers;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
|
using osu.Game.Screens.Edit.Compose.Components.Timeline;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Edit.Timing
|
namespace osu.Game.Screens.Edit.Timing
|
||||||
@ -58,6 +59,12 @@ namespace osu.Game.Screens.Edit.Timing
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void OnTimelineLoaded(TimelineArea timelineArea)
|
||||||
|
{
|
||||||
|
base.OnTimelineLoaded(timelineArea);
|
||||||
|
timelineArea.Timeline.Zoom = timelineArea.Timeline.MinZoom;
|
||||||
|
}
|
||||||
|
|
||||||
public class ControlPointList : CompositeDrawable
|
public class ControlPointList : CompositeDrawable
|
||||||
{
|
{
|
||||||
private OsuButton deleteButton;
|
private OsuButton deleteButton;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user