1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-21 08:32:54 +08:00
osu-lazer/osu.Game/Screens/Play/FailOverlay.cs

64 lines
2.1 KiB
C#
Raw Normal View History

// 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.
2018-04-13 17:19:50 +08:00
2022-06-19 22:59:37 +08:00
using System;
using System.Threading.Tasks;
using osu.Game.Scoring;
using osu.Game.Graphics.UserInterface;
using osuTK;
2018-04-13 17:19:50 +08:00
using osu.Framework.Allocation;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
2023-05-27 18:29:14 +08:00
using osu.Framework.Localisation;
using osu.Game.Localisation;
2018-04-13 17:19:50 +08:00
namespace osu.Game.Screens.Play
{
2022-11-24 13:32:20 +08:00
public partial class FailOverlay : GameplayMenuOverlay
2018-04-13 17:19:50 +08:00
{
2024-02-28 15:24:04 +08:00
public Func<Task<ScoreInfo>>? SaveReplay;
2022-07-08 17:36:46 +08:00
2023-05-27 18:29:14 +08:00
public override LocalisableString Header => GameplayMenuOverlayStrings.FailedHeader;
2018-04-13 17:19:50 +08:00
[BackgroundDependencyLoader]
private void load()
2018-04-13 17:19:50 +08:00
{
// from #10339 maybe this is a better visual effect
Add(new Container
{
Anchor = Anchor.BottomLeft,
Origin = Anchor.BottomLeft,
RelativeSizeAxes = Axes.X,
Height = TwoLayerButton.SIZE_EXTENDED.Y,
Children = new Drawable[]
{
new Box
{
RelativeSizeAxes = Axes.Both,
Colour = Color4Extensions.FromHex("#333")
},
new FillFlowContainer
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
AutoSizeAxes = Axes.X,
RelativeSizeAxes = Axes.Y,
Spacing = new Vector2(5),
Padding = new MarginPadding(10),
Direction = FillDirection.Horizontal,
Children = new Drawable[]
{
new SaveFailedScoreButton(SaveReplay)
{
Width = 300
},
}
}
}
});
2018-04-13 17:19:50 +08:00
}
}
}