mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 07:22:54 +08:00
Change some component samples to go better with overlay pop-in samples
This commit is contained in:
parent
3d7ba0e18c
commit
d10d7b6ea4
@ -46,8 +46,8 @@ namespace osu.Game.Graphics.UserInterface
|
||||
private readonly Container content;
|
||||
private readonly Box hover;
|
||||
|
||||
public OsuAnimatedButton()
|
||||
: base(HoverSampleSet.Button)
|
||||
public OsuAnimatedButton(HoverSampleSet sampleSet = HoverSampleSet.Button)
|
||||
: base(sampleSet)
|
||||
{
|
||||
base.Content.Add(content = new Container
|
||||
{
|
||||
|
@ -14,6 +14,8 @@ namespace osu.Game.Graphics.UserInterface
|
||||
private Sample? sampleOff;
|
||||
private Sample? sampleOn;
|
||||
|
||||
protected virtual bool PlayClickSampleOnly => false;
|
||||
|
||||
/// <summary>
|
||||
/// Whether this button is currently toggled to an active state.
|
||||
/// </summary>
|
||||
@ -68,6 +70,9 @@ namespace osu.Game.Graphics.UserInterface
|
||||
{
|
||||
sampleClick?.Play();
|
||||
|
||||
if (PlayClickSampleOnly)
|
||||
return;
|
||||
|
||||
if (Active.Value)
|
||||
sampleOn?.Play();
|
||||
else
|
||||
|
@ -18,6 +18,8 @@ namespace osu.Game.Overlays.Mods
|
||||
{
|
||||
public partial class AddPresetButton : ShearedToggleButton, IHasPopover
|
||||
{
|
||||
protected override bool PlayClickSampleOnly => true;
|
||||
|
||||
[Resolved]
|
||||
private OsuColour colours { get; set; } = null!;
|
||||
|
||||
|
@ -262,6 +262,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
private readonly OsuSpriteText divisorText;
|
||||
|
||||
public DivisorDisplay()
|
||||
: base(HoverSampleSet.Default)
|
||||
{
|
||||
Anchor = Anchor.Centre;
|
||||
Origin = Anchor.Centre;
|
||||
|
Loading…
Reference in New Issue
Block a user