Skip to content

Commit

Permalink
Merge pull request #6383 from bdach/slider-commit-event
Browse files Browse the repository at this point in the history
Expose slider bar commit method as virtual
  • Loading branch information
peppy authored Oct 7, 2024
2 parents 3091897 + c59c181 commit 220b74b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions osu.Framework/Graphics/UserInterface/SliderBar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ protected override bool OnClick(ClickEvent e)
if (handleClick)
{
handleMouseInput(e);
commit();
Commit();
}

return true;
Expand All @@ -170,7 +170,7 @@ protected override bool OnDragStart(DragStartEvent e)
return true;
}

protected override void OnDragEnd(DragEndEvent e) => commit();
protected override void OnDragEnd(DragEndEvent e) => Commit();

protected override bool OnKeyDown(KeyDownEvent e)
{
Expand Down Expand Up @@ -203,12 +203,12 @@ protected override bool OnKeyDown(KeyDownEvent e)
protected override void OnKeyUp(KeyUpEvent e)
{
if (e.Key == Key.Left || e.Key == Key.Right)
commit();
Commit();
}

private bool uncommittedChanges;

private bool commit()
protected virtual bool Commit()
{
if (!uncommittedChanges)
return false;
Expand Down

0 comments on commit 220b74b

Please sign in to comment.