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