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:
parent
4f80a3b66d
commit
0b95d07390
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -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 };
|
||||||
|
@ -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,
|
||||||
|
@ -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
|
||||||
{
|
{
|
||||||
|
@ -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;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user