mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 15:44:04 +09:00
Handle other button clicks in HoverClickSounds
As suggested in review, remove previously introduced HoverMouseUpSounds and instead change effect playing logic in HoverClickSounds by moving it out of OnClick() to OnMouseUp(). Users of the class can either use the existing constructor to play the effect only on left click or use the newly introduced constructor with the MouseButton[] parameter to specify which button clicks should trigger the sound.
This commit is contained in:
@ -11,7 +11,6 @@ using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
using osu.Game.Rulesets.UI;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using osu.Framework.Graphics.Cursor;
|
||||
using osu.Framework.Input.Events;
|
||||
@ -284,7 +283,7 @@ namespace osu.Game.Overlays.Mods
|
||||
Anchor = Anchor.TopCentre,
|
||||
Font = OsuFont.GetFont(size: 18)
|
||||
},
|
||||
new HoverMouseUpSounds(new List<MouseButton> { MouseButton.Left, MouseButton.Right })
|
||||
new HoverClickSounds(new[] { MouseButton.Left, MouseButton.Right })
|
||||
};
|
||||
|
||||
Mod = mod;
|
||||
|
Reference in New Issue
Block a user