mirror of
https://github.com/osukey/osukey.git
synced 2025-06-05 12:57:39 +09:00
Use default button
This commit is contained in:
parent
642e0ac718
commit
5ea824534b
@ -4,9 +4,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
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.Graphics.UserInterfaceV2;
|
||||||
using osu.Game.Resources.Localisation.Web;
|
using osu.Game.Resources.Localisation.Web;
|
||||||
|
|
||||||
@ -19,30 +16,15 @@ namespace osu.Game.Overlays.Comments
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load()
|
private void load()
|
||||||
{
|
{
|
||||||
ButtonsContainer.Add(new CancelButton
|
ButtonsContainer.Add(new RoundedButton
|
||||||
{
|
{
|
||||||
Anchor = Anchor.CentreRight,
|
Anchor = Anchor.CentreRight,
|
||||||
Origin = 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()
|
public EditorCommitButton()
|
||||||
{
|
{
|
||||||
Width = 90;
|
Width = 100;
|
||||||
Height = 25;
|
Height = 30;
|
||||||
Add(spinner = new LoadingSpinner
|
Add(spinner = new LoadingSpinner
|
||||||
{
|
{
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
@ -213,15 +213,6 @@ namespace osu.Game.Overlays.Comments
|
|||||||
Enabled.Value = !IsLoading && !e.NewValue;
|
Enabled.Value = !IsLoading && !e.NewValue;
|
||||||
}, true);
|
}, 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