Added background color to hide beatmap background

This commit is contained in:
schiavoanto 2024-09-08 15:59:23 +02:00
parent 2bc6547d49
commit cf23c6668c

View File

@ -7,11 +7,13 @@ using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.Events;
using osu.Game.Beatmaps.ControlPoints;
using osu.Game.Graphics;
using osu.Game.Graphics.UserInterface;
using osu.Game.Graphics.UserInterfaceV2;
using osu.Game.Overlays;
using osuTK;
namespace osu.Game.Screens.Edit.Timing
@ -30,6 +32,9 @@ namespace osu.Game.Screens.Edit.Timing
[Resolved]
private Bindable<ControlPointGroup?> selectedGroup { get; set; } = null!;
[Cached]
private OverlayColourProvider overlayColourProvider = new OverlayColourProvider(OverlayColourScheme.Green);
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
@ -43,14 +48,25 @@ namespace osu.Game.Screens.Edit.Timing
RelativeSizeAxes = Axes.Both,
Groups = { BindTarget = Beatmap.ControlPointInfo.Groups, },
},
new Container
{
AutoSizeAxes = Axes.Y,
RelativeSizeAxes = Axes.X,
Anchor = Anchor.BottomCentre,
Origin = Anchor.BottomCentre,
Children = new Drawable[]
{
new Box
{
Height = 50,
RelativeSizeAxes = Axes.X,
Anchor = Anchor.CentreLeft,
Colour = overlayColourProvider.Background2,
},
new FillFlowContainer
{
AutoSizeAxes = Axes.Both,
Anchor = Anchor.BottomLeft,
Origin = Anchor.BottomLeft,
Direction = FillDirection.Horizontal,
Margin = new MarginPadding(margins),
Spacing = new Vector2(5),
Padding = new MarginPadding { Left = margins, Bottom = margins },
Children = new Drawable[]
{
new RoundedButton
@ -58,19 +74,17 @@ namespace osu.Game.Screens.Edit.Timing
Text = "Select closest to current time",
Action = goToCurrentGroup,
Size = new Vector2(220, 30),
Anchor = Anchor.BottomRight,
Origin = Anchor.BottomRight,
Anchor = Anchor.BottomLeft,
Origin = Anchor.BottomLeft,
},
}
},
new FillFlowContainer
{
AutoSizeAxes = Axes.Both,
Anchor = Anchor.BottomRight,
Origin = Anchor.BottomRight,
Direction = FillDirection.Horizontal,
Margin = new MarginPadding(margins),
Anchor = Anchor.BottomRight,
Spacing = new Vector2(5),
Padding = new MarginPadding { Right = margins, Bottom = margins },
Children = new Drawable[]
{
deleteButton = new RoundedButton
@ -91,6 +105,8 @@ namespace osu.Game.Screens.Edit.Timing
},
}
},
}
},
};
}