1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-15 11:02:57 +08:00

Merge pull request #18504 from peppy/editor-waveform-main-row-background

Add background to main waveform row
This commit is contained in:
Bartłomiej Dach 2022-05-31 21:25:18 +02:00 committed by GitHub
commit 655a8fb4a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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,