1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 04:07:25 +08:00

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 @@ namespace osu.Game.Graphics.UserInterface
TabSelect, TabSelect,
[Description("scrolltotop")] [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 class PopupDialogButton : DialogButton
{ {
public PopupDialogButton() public PopupDialogButton(HoverSampleSet sampleSet = HoverSampleSet.Button)
: base(sampleSet)
{ {
Height = 50; Height = 50;
BackgroundColour = Color4Extensions.FromHex(@"150e14"); BackgroundColour = Color4Extensions.FromHex(@"150e14");

View File

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

View File

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