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

Add background to main waveform row

This commit is contained in:
Dean Herbert 2022-05-31 18:09:26 +09:00
parent 79a17fc86a
commit c0804803fd

View File

@ -63,7 +63,7 @@ namespace osu.Game.Screens.Edit.Timing
for (int i = 0; i < total_waveforms; i++)
{
AddInternal(new WaveformRow
AddInternal(new WaveformRow(i == total_waveforms / 2)
{
RelativeSizeAxes = Axes.Both,
RelativePositionAxes = Axes.Both,
@ -177,17 +177,29 @@ namespace osu.Game.Screens.Edit.Timing
internal class WaveformRow : CompositeDrawable
{
private readonly bool isMainRow;
private OsuSpriteText beatIndexText = null!;
private WaveformGraph waveformGraph = null!;
[Resolved]
private OverlayColourProvider colourProvider { get; set; } = null!;
public WaveformRow(bool isMainRow)
{
this.isMainRow = isMainRow;
}
[BackgroundDependencyLoader]
private void load(IBindable<WorkingBeatmap> beatmap)
{
InternalChildren = new Drawable[]
{
new Box
{
Colour = colourProvider.Background3,
Alpha = isMainRow ? 1 : 0,
RelativeSizeAxes = Axes.Both,
},
waveformGraph = new WaveformGraph
{
RelativeSizeAxes = Axes.Both,