2019-06-10 17:17:44 +00: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.Extensions.Color4Extensions;
|
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
|
using osu.Framework.Graphics.Containers;
|
|
|
|
|
using osu.Framework.Graphics.Shapes;
|
|
|
|
|
using osu.Game.Graphics;
|
|
|
|
|
using osu.Game.Graphics.Containers;
|
|
|
|
|
using osu.Game.Graphics.Sprites;
|
|
|
|
|
using osuTK.Graphics;
|
|
|
|
|
|
|
|
|
|
namespace osu.Game.Overlays.BeatmapSet
|
|
|
|
|
{
|
|
|
|
|
public class BeatmapNotAvailable : Container
|
|
|
|
|
{
|
|
|
|
|
private LinkFlowContainer linkContainer;
|
|
|
|
|
|
|
|
|
|
public override void Show()
|
|
|
|
|
{
|
|
|
|
|
AutoSizeAxes = Axes.Both;
|
2019-06-10 18:13:37 +00:00
|
|
|
|
Margin = new MarginPadding { Top = 10 };
|
2019-06-10 17:17:44 +00:00
|
|
|
|
|
|
|
|
|
Children = new Drawable[]
|
|
|
|
|
{
|
|
|
|
|
new Box
|
|
|
|
|
{
|
|
|
|
|
Colour = Color4.Black.Opacity(0.6f),
|
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
|
|
|
|
},
|
|
|
|
|
new FillFlowContainer
|
|
|
|
|
{
|
|
|
|
|
AutoSizeAxes = Axes.Both,
|
|
|
|
|
Direction = FillDirection.Vertical,
|
2019-06-10 18:13:37 +00:00
|
|
|
|
Margin = new MarginPadding { Top = 10, Left = 5, Right = 20 },
|
2019-06-10 17:17:44 +00:00
|
|
|
|
|
|
|
|
|
Children = new Drawable[]
|
|
|
|
|
{
|
|
|
|
|
new OsuSpriteText
|
|
|
|
|
{
|
2019-06-10 18:13:37 +00:00
|
|
|
|
Margin = new MarginPadding { Bottom = 10, Horizontal = 5 },
|
2019-06-10 17:17:44 +00:00
|
|
|
|
Font = OsuFont.GetFont(size: 20, weight: FontWeight.Medium),
|
|
|
|
|
Text = "This beatmap is currently not available for download.",
|
|
|
|
|
Colour = Color4.Orange,
|
|
|
|
|
},
|
|
|
|
|
linkContainer = new LinkFlowContainer(text => text.Font = OsuFont.GetFont(size: 14))
|
|
|
|
|
{
|
|
|
|
|
Direction = FillDirection.Full,
|
|
|
|
|
RelativeSizeAxes = Axes.X,
|
|
|
|
|
AutoSizeAxes = Axes.Y,
|
|
|
|
|
Margin = new MarginPadding { Bottom = 10, Horizontal = 5 },
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
base.Show();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string Link
|
|
|
|
|
{
|
|
|
|
|
set => linkContainer.AddLink("Check here for more information.", value);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|