mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 08:20:00 +09:00
Add hover+select sounds to some components that are missing them
This commit is contained in:
@ -23,14 +23,20 @@ namespace osu.Game.Graphics.UserInterface
|
||||
[Resolved]
|
||||
private GameHost host { get; set; }
|
||||
|
||||
private readonly SpriteIcon linkIcon;
|
||||
|
||||
public ExternalLinkButton(string link = null)
|
||||
{
|
||||
Link = link;
|
||||
Size = new Vector2(12);
|
||||
InternalChild = new SpriteIcon
|
||||
InternalChildren = new Drawable[]
|
||||
{
|
||||
Icon = FontAwesome.Solid.ExternalLinkAlt,
|
||||
RelativeSizeAxes = Axes.Both
|
||||
linkIcon = new SpriteIcon
|
||||
{
|
||||
Icon = FontAwesome.Solid.ExternalLinkAlt,
|
||||
RelativeSizeAxes = Axes.Both
|
||||
},
|
||||
new HoverClickSounds(HoverSampleSet.Submit)
|
||||
};
|
||||
}
|
||||
|
||||
@ -42,13 +48,13 @@ namespace osu.Game.Graphics.UserInterface
|
||||
|
||||
protected override bool OnHover(HoverEvent e)
|
||||
{
|
||||
InternalChild.FadeColour(hoverColour, 500, Easing.OutQuint);
|
||||
linkIcon.FadeColour(hoverColour, 500, Easing.OutQuint);
|
||||
return base.OnHover(e);
|
||||
}
|
||||
|
||||
protected override void OnHoverLost(HoverLostEvent e)
|
||||
{
|
||||
InternalChild.FadeColour(Color4.White, 500, Easing.OutQuint);
|
||||
linkIcon.FadeColour(Color4.White, 500, Easing.OutQuint);
|
||||
base.OnHoverLost(e);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user