mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 11:35:35 +08:00
Ensure sliderbar nub stays glowing while dragging an adjustment
This commit is contained in:
parent
be3b88a5c3
commit
35d776078c
@ -153,16 +153,27 @@ namespace osu.Game.Graphics.UserInterface
|
||||
|
||||
protected override bool OnHover(HoverEvent e)
|
||||
{
|
||||
Nub.Glowing = true;
|
||||
updateGlow();
|
||||
return base.OnHover(e);
|
||||
}
|
||||
|
||||
protected override void OnHoverLost(HoverLostEvent e)
|
||||
{
|
||||
Nub.Glowing = false;
|
||||
updateGlow();
|
||||
base.OnHoverLost(e);
|
||||
}
|
||||
|
||||
protected override void OnDragEnd(DragEndEvent e)
|
||||
{
|
||||
updateGlow();
|
||||
base.OnDragEnd(e);
|
||||
}
|
||||
|
||||
private void updateGlow()
|
||||
{
|
||||
Nub.Glowing = IsHovered || IsDragged;
|
||||
}
|
||||
|
||||
protected override void OnUserChange(T value)
|
||||
{
|
||||
base.OnUserChange(value);
|
||||
|
Loading…
Reference in New Issue
Block a user