mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Fix timing adjustment repeat buttons firing one change per repeat invocation
This commit is contained in:
@ -23,6 +23,9 @@ namespace osu.Game.Screens.Edit.Timing
|
||||
|
||||
private Sample sample;
|
||||
|
||||
public Action RepeatBegan;
|
||||
public Action RepeatEnded;
|
||||
|
||||
/// <summary>
|
||||
/// An additive modifier for the frequency of the sample played on next actuation.
|
||||
/// This can be adjusted during the button's <see cref="Drawable.OnClick"/> event to affect the repeat sample playback of that click.
|
||||
@ -44,6 +47,7 @@ namespace osu.Game.Screens.Edit.Timing
|
||||
|
||||
protected override bool OnMouseDown(MouseDownEvent e)
|
||||
{
|
||||
RepeatBegan?.Invoke();
|
||||
beginRepeat();
|
||||
return true;
|
||||
}
|
||||
@ -51,6 +55,7 @@ namespace osu.Game.Screens.Edit.Timing
|
||||
protected override void OnMouseUp(MouseUpEvent e)
|
||||
{
|
||||
adjustDelegate?.Cancel();
|
||||
RepeatEnded?.Invoke();
|
||||
base.OnMouseUp(e);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user