2019-01-24 08:43:03 +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.
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2022-06-19 14:59:37 +00:00
|
|
|
|
using System;
|
2022-06-29 13:50:47 +00:00
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using osu.Game.Scoring;
|
2022-06-21 11:06:38 +00:00
|
|
|
|
using osu.Game.Graphics.UserInterface;
|
|
|
|
|
using osuTK;
|
2017-04-05 19:51:43 +00:00
|
|
|
|
using osu.Framework.Allocation;
|
2022-06-21 11:06:38 +00:00
|
|
|
|
using osu.Framework.Extensions.Color4Extensions;
|
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
|
using osu.Framework.Graphics.Containers;
|
|
|
|
|
using osu.Framework.Graphics.Shapes;
|
2023-05-27 10:29:14 +00:00
|
|
|
|
using osu.Framework.Localisation;
|
|
|
|
|
using osu.Game.Localisation;
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2017-03-03 01:17:39 +00:00
|
|
|
|
namespace osu.Game.Screens.Play
|
2017-02-02 08:33:39 +00:00
|
|
|
|
{
|
2018-06-09 07:28:02 +00:00
|
|
|
|
public partial class FailOverlay : GameplayMenuOverlay
|
2017-02-02 08:33:39 +00:00
|
|
|
|
{
|
2024-02-28 07:24:04 +00:00
|
|
|
|
public Func<Task<ScoreInfo>>? SaveReplay;
|
2022-07-08 09:36:46 +00:00
|
|
|
|
|
2023-05-27 10:29:14 +00:00
|
|
|
|
public override LocalisableString Header => GameplayMenuOverlayStrings.FailedHeader;
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2017-04-13 02:35:36 +00:00
|
|
|
|
[BackgroundDependencyLoader]
|
2024-02-28 06:41:49 +00:00
|
|
|
|
private void load()
|
2017-04-13 02:35:36 +00:00
|
|
|
|
{
|
2022-06-21 11:06:38 +00: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[]
|
|
|
|
|
{
|
2022-07-15 20:39:04 +00:00
|
|
|
|
new SaveFailedScoreButton(SaveReplay)
|
2022-06-21 11:06:38 +00:00
|
|
|
|
{
|
|
|
|
|
Width = 300
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
2017-04-13 02:35:36 +00:00
|
|
|
|
}
|
2017-02-02 08:33:39 +00:00
|
|
|
|
}
|
|
|
|
|
}
|