mirror of
https://github.com/ppy/osu.git
synced 2025-03-15 15:27:20 +08:00
Use default button
This commit is contained in:
parent
642e0ac718
commit
5ea824534b
@ -4,9 +4,6 @@
|
||||
using System;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Graphics.UserInterfaceV2;
|
||||
using osu.Game.Resources.Localisation.Web;
|
||||
|
||||
@ -19,30 +16,15 @@ namespace osu.Game.Overlays.Comments
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
ButtonsContainer.Add(new CancelButton
|
||||
ButtonsContainer.Add(new RoundedButton
|
||||
{
|
||||
Anchor = Anchor.CentreRight,
|
||||
Origin = Anchor.CentreRight,
|
||||
Action = () => OnCancel?.Invoke()
|
||||
Action = () => OnCancel?.Invoke(),
|
||||
Text = CommonStrings.ButtonsCancel,
|
||||
Width = 100,
|
||||
Height = 30,
|
||||
});
|
||||
}
|
||||
|
||||
private sealed partial class CancelButton : RoundedButton
|
||||
{
|
||||
public CancelButton()
|
||||
{
|
||||
Width = 90;
|
||||
Height = 25;
|
||||
}
|
||||
|
||||
protected override SpriteText CreateText() => new OsuSpriteText
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Font = OsuFont.GetFont(size: 12, weight: FontWeight.Bold),
|
||||
Margin = new MarginPadding { Horizontal = 20 },
|
||||
Text = CommonStrings.ButtonsCancel
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -194,8 +194,8 @@ namespace osu.Game.Overlays.Comments
|
||||
|
||||
public EditorCommitButton()
|
||||
{
|
||||
Width = 90;
|
||||
Height = 25;
|
||||
Width = 100;
|
||||
Height = 30;
|
||||
Add(spinner = new LoadingSpinner
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
@ -213,15 +213,6 @@ namespace osu.Game.Overlays.Comments
|
||||
Enabled.Value = !IsLoading && !e.NewValue;
|
||||
}, true);
|
||||
}
|
||||
|
||||
protected override SpriteText CreateText() => text = new OsuSpriteText
|
||||
{
|
||||
AlwaysPresent = true,
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Font = OsuFont.GetFont(size: 12, weight: FontWeight.Bold),
|
||||
Margin = new MarginPadding { Horizontal = 20 },
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user