1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 19:27:24 +08:00

Add background to disclaimers

This commit is contained in:
Bartłomiej Dach 2024-03-15 11:31:45 +01:00
parent 87682008fd
commit 51568ba06a
No known key found for this signature in database

View File

@ -24,40 +24,56 @@ namespace osu.Game.Screens.Play
} }
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load(OsuColour colours) private void load(OsuColour colours, OverlayColourProvider colourProvider)
{ {
Width = SettingsToolboxGroup.CONTAINER_WIDTH; RelativeSizeAxes = Axes.X;
AutoSizeAxes = Axes.Y; AutoSizeAxes = Axes.Y;
Masking = true;
CornerRadius = 5;
InternalChildren = new Drawable[] InternalChildren = new Drawable[]
{ {
new Circle new Box
{ {
Width = 7, RelativeSizeAxes = Axes.Both,
Height = 15, Colour = colourProvider.Background4,
Margin = new MarginPadding { Top = 2 },
Colour = colours.Orange1,
}, },
new FillFlowContainer new Container
{ {
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y, AutoSizeAxes = Axes.Y,
Padding = new MarginPadding { Left = 12 }, Padding = new MarginPadding(10),
Direction = FillDirection.Vertical, Children = new Drawable[]
Spacing = new Vector2(0, 2),
Children = new[]
{ {
new TextFlowContainer(t => t.Font = OsuFont.GetFont(weight: FontWeight.Bold, size: 17)) new Circle
{ {
RelativeSizeAxes = Axes.X, Width = 7,
AutoSizeAxes = Axes.Y, Height = 15,
Text = title, Margin = new MarginPadding { Top = 2 },
Colour = colours.Orange1,
}, },
new TextFlowContainer(t => t.Font = OsuFont.GetFont(size: 16)) new FillFlowContainer
{ {
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y, AutoSizeAxes = Axes.Y,
Text = content, Padding = new MarginPadding { Left = 12 },
Direction = FillDirection.Vertical,
Spacing = new Vector2(0, 2),
Children = new[]
{
new TextFlowContainer(t => t.Font = OsuFont.GetFont(weight: FontWeight.Bold, size: 17))
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Text = title,
},
new TextFlowContainer(t => t.Font = OsuFont.GetFont(size: 16))
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Text = content,
}
}
} }
} }
} }