mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 21:47:25 +08:00
Fix option checkbox losing its glow incorrectly in certain cases.
This commit is contained in:
parent
696d21f762
commit
e049f8582a
@ -92,13 +92,13 @@ namespace osu.Game.Overlays.Options
|
|||||||
|
|
||||||
protected override bool OnHover(InputState state)
|
protected override bool OnHover(InputState state)
|
||||||
{
|
{
|
||||||
light.TriggerHover(state);
|
light.Glowing = true;
|
||||||
return base.OnHover(state);
|
return base.OnHover(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnHoverLost(InputState state)
|
protected override void OnHoverLost(InputState state)
|
||||||
{
|
{
|
||||||
light.TriggerHoverLost(state);
|
light.Glowing = false;
|
||||||
base.OnHoverLost(state);
|
base.OnHoverLost(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -159,19 +159,21 @@ namespace osu.Game.Overlays.Options
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool OnHover(InputState state)
|
public bool Glowing
|
||||||
{
|
{
|
||||||
FadeColour(hoverColour, 500, EasingTypes.OutQuint);
|
set
|
||||||
FadeGlowTo(1, 500, EasingTypes.OutQuint);
|
{
|
||||||
|
if (value)
|
||||||
return base.OnHover(state);
|
{
|
||||||
}
|
FadeColour(hoverColour, 500, EasingTypes.OutQuint);
|
||||||
|
FadeGlowTo(1, 500, EasingTypes.OutQuint);
|
||||||
protected override void OnHoverLost(InputState state)
|
}
|
||||||
{
|
else
|
||||||
FadeGlowTo(0, 500);
|
{
|
||||||
FadeColour(defaultColour, 500);
|
FadeGlowTo(0, 500);
|
||||||
base.OnHoverLost(state);
|
FadeColour(defaultColour, 500);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private CheckBoxState state;
|
private CheckBoxState state;
|
||||||
|
Loading…
Reference in New Issue
Block a user