mirror of
https://github.com/ppy/osu.git
synced 2026-05-18 13:20:32 +08:00
Reduce abstractions of rounded button
This commit is contained in:
@@ -6,7 +6,7 @@ using osu.Game.Graphics.UserInterfaceV2;
|
||||
|
||||
namespace osu.Game.Graphics.UserInterface
|
||||
{
|
||||
public partial class DangerousRoundedButton : RoundedButton
|
||||
public sealed partial class DangerousRoundedButton : RoundedButton
|
||||
{
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
|
||||
@@ -191,8 +191,18 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
||||
Spacing = new Vector2(5),
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new CancelButton { Action = () => finalise(false) },
|
||||
new ClearButton { Action = clear },
|
||||
new RoundedButton
|
||||
{
|
||||
Text = CommonStrings.ButtonsCancel,
|
||||
Size = new Vector2(80, 20),
|
||||
Action = () => finalise(false)
|
||||
},
|
||||
new DangerousRoundedButton
|
||||
{
|
||||
Text = CommonStrings.ButtonsClear,
|
||||
Size = new Vector2(80, 20),
|
||||
Action = clear
|
||||
},
|
||||
},
|
||||
},
|
||||
new HoverClickSounds()
|
||||
@@ -538,23 +548,5 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
||||
{
|
||||
isDefault.Value = KeyBindings.Select(b => b.KeyCombination).SequenceEqual(Defaults);
|
||||
}
|
||||
|
||||
private partial class CancelButton : RoundedButton
|
||||
{
|
||||
public CancelButton()
|
||||
{
|
||||
Text = CommonStrings.ButtonsCancel;
|
||||
Size = new Vector2(80, 20);
|
||||
}
|
||||
}
|
||||
|
||||
public partial class ClearButton : DangerousRoundedButton
|
||||
{
|
||||
public ClearButton()
|
||||
{
|
||||
Text = CommonStrings.ButtonsClear;
|
||||
Size = new Vector2(80, 20);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ using osu.Game.Graphics.UserInterfaceV2;
|
||||
|
||||
namespace osu.Game.Rulesets.Edit
|
||||
{
|
||||
public partial class ExpandableButton : RoundedButton, IExpandable
|
||||
public sealed partial class ExpandableButton : RoundedButton, IExpandable
|
||||
{
|
||||
private float actualHeight;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user