2020-02-12 01:47:51 +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 System;
|
|
|
|
|
using osu.Framework.Allocation;
|
|
|
|
|
using osu.Framework.Graphics;
|
2022-11-29 10:46:30 +08:00
|
|
|
|
using osu.Game.Graphics.UserInterfaceV2;
|
2022-01-28 12:53:48 +08:00
|
|
|
|
using osu.Game.Resources.Localisation.Web;
|
2020-02-12 01:47:51 +08:00
|
|
|
|
|
|
|
|
|
namespace osu.Game.Overlays.Comments
|
|
|
|
|
{
|
|
|
|
|
public abstract partial class CancellableCommentEditor : CommentEditor
|
|
|
|
|
{
|
2022-11-29 10:17:44 +08:00
|
|
|
|
public Action? OnCancel;
|
2020-02-12 01:47:51 +08:00
|
|
|
|
|
|
|
|
|
[BackgroundDependencyLoader]
|
|
|
|
|
private void load()
|
|
|
|
|
{
|
2022-11-30 18:25:59 +08:00
|
|
|
|
ButtonsContainer.Add(new RoundedButton
|
2020-02-12 01:47:51 +08:00
|
|
|
|
{
|
2020-02-12 05:57:06 +08:00
|
|
|
|
Anchor = Anchor.CentreRight,
|
|
|
|
|
Origin = Anchor.CentreRight,
|
2022-11-30 18:25:59 +08:00
|
|
|
|
Action = () => OnCancel?.Invoke(),
|
|
|
|
|
Text = CommonStrings.ButtonsCancel,
|
|
|
|
|
Width = 100,
|
|
|
|
|
Height = 30,
|
2020-02-12 01:47:51 +08:00
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|