1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-16 02:03:51 +08:00
osu-lazer/osu.Game/Overlays/Dashboard/Home/HomePanel.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

56 lines
1.6 KiB
C#
Raw Normal View History

2020-08-07 16:33:02 +08:00
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Shapes;
using osuTK;
using osuTK.Graphics;
namespace osu.Game.Overlays.Dashboard.Home
{
public partial class HomePanel : Container
{
protected override Container<Drawable> Content => content;
private readonly Container content;
private readonly Box background;
public HomePanel()
{
RelativeSizeAxes = Axes.X;
AutoSizeAxes = Axes.Y;
Masking = true;
EdgeEffect = new EdgeEffectParameters
{
Colour = Color4.Black.Opacity(0.25f),
Type = EdgeEffectType.Shadow,
Radius = 3,
Offset = new Vector2(0, 1)
};
AddRangeInternal(new Drawable[]
{
background = new Box
{
RelativeSizeAxes = Axes.Both
},
content = new Container
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y
}
});
}
[BackgroundDependencyLoader]
2020-08-07 17:59:45 +08:00
private void load(OverlayColourProvider colourProvider)
2020-08-07 16:33:02 +08:00
{
2020-08-07 17:59:45 +08:00
background.Colour = colourProvider.Background4;
2020-08-07 16:33:02 +08:00
}
}
}