Skip to content

Commit

Permalink
Add an opacity layer behind disclaimer.
Browse files Browse the repository at this point in the history
  • Loading branch information
Game4all committed Aug 24, 2021
1 parent ca42b70 commit 62fc82b
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
31 changes: 30 additions & 1 deletion osu.Game.Rulesets.Gamebosu/UI/Screens/DisclaimerSubScreen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@
// See LICENSE at root of repo for more information on licensing.

using osu.Framework.Allocation;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Input.Bindings;
using osu.Framework.Screens;
using osu.Framework.Utils;
using osu.Game.Graphics;
using osu.Game.Graphics.Containers;
using osuTK.Graphics;
using System;

namespace osu.Game.Rulesets.Gamebosu.UI.Screens
Expand All @@ -34,14 +38,39 @@ public class DisclaimerSubScreen : GamebosuSubScreen, IKeyBindingHandler<Gamebos

public DisclaimerSubScreen()
{
Child = textFlow = new OsuTextFlowContainer()
Child = textFlow = new OsuTextFlowContainer
{
RelativeSizeAxes = Axes.Both,
Origin = Anchor.Centre,
Anchor = Anchor.Centre,
TextAnchor = Anchor.Centre,
};

Child = new Container
{
AutoSizeAxes = Axes.Both,
Origin = Anchor.Centre,
Anchor = Anchor.Centre,
Masking = true,
CornerRadius = 16,
Children = new Drawable[]
{
new Box
{
RelativeSizeAxes = Axes.Both,
Colour = Color4.Gray.Opacity(0.4f)
},
textFlow = new OsuTextFlowContainer
{
Margin = new MarginPadding(16),
AutoSizeAxes = Axes.Both,
Origin = Anchor.Centre,
Anchor = Anchor.Centre,
TextAnchor = Anchor.Centre,
}
}
};

ValidForResume = false;
}

Expand Down
2 changes: 1 addition & 1 deletion osu.Game.Rulesets.Gamebosu/UI/Screens/MovingNotice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class MovingNotice : Container
public MovingNotice()
{
Masking = true;
CornerRadius = 15;
CornerRadius = 16;

Children = new Drawable[]
{
Expand Down

0 comments on commit 62fc82b

Please sign in to comment.