1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 17:43:05 +08:00

Change 'default' hover/click samples into 'button' samples and make 'soft' the new 'default'

This commit is contained in:
Jamie Taylor 2021-06-11 20:42:10 +09:00
parent 4f80a3b66d
commit 0b95d07390
No known key found for this signature in database
GPG Key ID: 2ACFA8B6370B8C8C
5 changed files with 7 additions and 6 deletions

View File

@ -19,7 +19,7 @@ namespace osu.Game.Graphics.Containers
protected virtual HoverClickSounds CreateHoverClickSounds(HoverSampleSet sampleSet) => new HoverClickSounds(sampleSet); protected virtual HoverClickSounds CreateHoverClickSounds(HoverSampleSet sampleSet) => new HoverClickSounds(sampleSet);
public OsuClickableContainer(HoverSampleSet sampleSet = HoverSampleSet.Normal) public OsuClickableContainer(HoverSampleSet sampleSet = HoverSampleSet.Default)
{ {
this.sampleSet = sampleSet; this.sampleSet = sampleSet;
} }

View File

@ -28,7 +28,7 @@ namespace osu.Game.Graphics.UserInterface
/// Array of button codes which should trigger the click sound. /// Array of button codes which should trigger the click sound.
/// If this optional parameter is omitted or set to <code>null</code>, the click sound will only be played on left click. /// If this optional parameter is omitted or set to <code>null</code>, the click sound will only be played on left click.
/// </param> /// </param>
public HoverClickSounds(HoverSampleSet sampleSet = HoverSampleSet.Normal, MouseButton[] buttons = null) public HoverClickSounds(HoverSampleSet sampleSet = HoverSampleSet.Default, MouseButton[] buttons = null)
: base(sampleSet) : base(sampleSet)
{ {
this.buttons = buttons ?? new[] { MouseButton.Left }; this.buttons = buttons ?? new[] { MouseButton.Left };

View File

@ -22,7 +22,7 @@ namespace osu.Game.Graphics.UserInterface
protected readonly HoverSampleSet SampleSet; protected readonly HoverSampleSet SampleSet;
public HoverSounds(HoverSampleSet sampleSet = HoverSampleSet.Normal) public HoverSounds(HoverSampleSet sampleSet = HoverSampleSet.Default)
{ {
SampleSet = sampleSet; SampleSet = sampleSet;
RelativeSizeAxes = Axes.Both; RelativeSizeAxes = Axes.Both;
@ -46,8 +46,8 @@ namespace osu.Game.Graphics.UserInterface
[Description("default")] [Description("default")]
Default, Default,
[Description("soft")] [Description("button")]
Normal, Button,
[Description("softer")] [Description("softer")]
Soft, Soft,

View File

@ -44,6 +44,7 @@ namespace osu.Game.Graphics.UserInterface
private readonly Box hover; private readonly Box hover;
public OsuAnimatedButton() public OsuAnimatedButton()
: base(HoverSampleSet.Button)
{ {
base.Content.Add(content = new Container base.Content.Add(content = new Container
{ {

View File

@ -49,7 +49,7 @@ namespace osu.Game.Graphics.UserInterface
protected Box Background; protected Box Background;
protected SpriteText SpriteText; protected SpriteText SpriteText;
public OsuButton(HoverSampleSet? hoverSounds = HoverSampleSet.Default) public OsuButton(HoverSampleSet? hoverSounds = HoverSampleSet.Button)
{ {
Height = 40; Height = 40;