Add specific samples for dialog 'Ok' and 'Cancel' buttons

This commit is contained in:
Jamie Taylor 2022-06-15 12:33:21 +09:00
parent d1c236e187
commit 930ec2a197
No known key found for this signature in database
GPG Key ID: 2ACFA8B6370B8C8C
4 changed files with 21 additions and 2 deletions

View File

@ -20,6 +20,12 @@ public enum HoverSampleSet
TabSelect,
[Description("scrolltotop")]
ScrollToTop
ScrollToTop,
[Description("dialog-cancel")]
DialogCancel,
[Description("dialog-ok")]
DialogOk
}
}

View File

@ -8,7 +8,8 @@ namespace osu.Game.Overlays.Dialog
{
public class PopupDialogButton : DialogButton
{
public PopupDialogButton()
public PopupDialogButton(HoverSampleSet sampleSet = HoverSampleSet.Button)
: base(sampleSet)
{
Height = 50;
BackgroundColour = Color4Extensions.FromHex(@"150e14");

View File

@ -3,6 +3,7 @@
using osu.Framework.Allocation;
using osu.Game.Graphics;
using osu.Game.Graphics.UserInterface;
namespace osu.Game.Overlays.Dialog
{
@ -13,5 +14,10 @@ private void load(OsuColour colours)
{
ButtonColour = colours.Blue;
}
public PopupDialogCancelButton()
: base(HoverSampleSet.DialogCancel)
{
}
}
}

View File

@ -3,6 +3,7 @@
using osu.Framework.Allocation;
using osu.Game.Graphics;
using osu.Game.Graphics.UserInterface;
namespace osu.Game.Overlays.Dialog
{
@ -13,5 +14,10 @@ private void load(OsuColour colours)
{
ButtonColour = colours.Pink;
}
public PopupDialogOkButton()
: base(HoverSampleSet.DialogOk)
{
}
}
}