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 @@ public class OsuClickableContainer : ClickableContainer, IHasTooltip
protected virtual HoverClickSounds CreateHoverClickSounds(HoverSampleSet sampleSet) => new HoverClickSounds(sampleSet);
public OsuClickableContainer(HoverSampleSet sampleSet = HoverSampleSet.Normal)
public OsuClickableContainer(HoverSampleSet sampleSet = HoverSampleSet.Default)
{
this.sampleSet = sampleSet;
}

View File

@ -28,7 +28,7 @@ public class HoverClickSounds : HoverSounds
/// 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.
/// </param>
public HoverClickSounds(HoverSampleSet sampleSet = HoverSampleSet.Normal, MouseButton[] buttons = null)
public HoverClickSounds(HoverSampleSet sampleSet = HoverSampleSet.Default, MouseButton[] buttons = null)
: base(sampleSet)
{
this.buttons = buttons ?? new[] { MouseButton.Left };

View File

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

View File

@ -44,6 +44,7 @@ protected Color4 HoverColour
private readonly Box hover;
public OsuAnimatedButton()
: base(HoverSampleSet.Button)
{
base.Content.Add(content = new Container
{

View File

@ -49,7 +49,7 @@ public Color4 BackgroundColour
protected Box Background;
protected SpriteText SpriteText;
public OsuButton(HoverSampleSet? hoverSounds = HoverSampleSet.Default)
public OsuButton(HoverSampleSet? hoverSounds = HoverSampleSet.Button)
{
Height = 40;