1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 14:17:26 +08:00

Merge pull request #9580 from smoogipoo/fix-chat-dim

Fix chat name backgrounds not dimming
This commit is contained in:
Dean Herbert 2020-07-16 15:36:06 +09:00 committed by GitHub
commit fd82d958e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,6 +10,7 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Cursor;
using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.UserInterface;
using osu.Game.Graphics;
using osu.Game.Graphics.Containers;
@ -114,21 +115,26 @@ namespace osu.Game.Overlays.Chat
Colour = Color4.Black.Opacity(0.3f),
Type = EdgeEffectType.Shadow,
},
// Drop shadow effect
Child = new Container
{
AutoSizeAxes = Axes.Both,
Y = 3,
Masking = true,
CornerRadius = 4,
EdgeEffect = new EdgeEffectParameters
Children = new Drawable[]
{
Radius = 1,
Colour = Color4Extensions.FromHex(message.Sender.Colour),
Type = EdgeEffectType.Shadow,
},
Padding = new MarginPadding { Left = 3, Right = 3, Bottom = 1, Top = -3 },
Y = 3,
Child = username,
new Box
{
RelativeSizeAxes = Axes.Both,
Colour = Color4Extensions.FromHex(message.Sender.Colour),
},
new Container
{
AutoSizeAxes = Axes.Both,
Padding = new MarginPadding { Left = 4, Right = 4, Bottom = 1, Top = -2 },
Child = username
}
}
}
};
}