1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 14:17:26 +08:00

Ensure sliderbar nub stays glowing while dragging an adjustment

This commit is contained in:
Dean Herbert 2021-10-15 11:51:08 +09:00
parent be3b88a5c3
commit 35d776078c

View File

@ -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);