mirror of
https://github.com/ppy/osu
synced 2025-03-31 23:58:37 +00:00
Merge pull request #175 from Tom94/fix-broken-option-checkbox
Fix option checkbox losing its glow incorrectly in certain cases.
This commit is contained in:
commit
da00c65e50
@ -92,13 +92,13 @@ namespace osu.Game.Overlays.Options
|
||||
|
||||
protected override bool OnHover(InputState state)
|
||||
{
|
||||
light.TriggerHover(state);
|
||||
light.Glowing = true;
|
||||
return base.OnHover(state);
|
||||
}
|
||||
|
||||
protected override void OnHoverLost(InputState state)
|
||||
{
|
||||
light.TriggerHoverLost(state);
|
||||
light.Glowing = false;
|
||||
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);
|
||||
FadeGlowTo(1, 500, EasingTypes.OutQuint);
|
||||
|
||||
return base.OnHover(state);
|
||||
}
|
||||
|
||||
protected override void OnHoverLost(InputState state)
|
||||
{
|
||||
FadeGlowTo(0, 500);
|
||||
FadeColour(defaultColour, 500);
|
||||
base.OnHoverLost(state);
|
||||
set
|
||||
{
|
||||
if (value)
|
||||
{
|
||||
FadeColour(hoverColour, 500, EasingTypes.OutQuint);
|
||||
FadeGlowTo(1, 500, EasingTypes.OutQuint);
|
||||
}
|
||||
else
|
||||
{
|
||||
FadeGlowTo(0, 500);
|
||||
FadeColour(defaultColour, 500);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private CheckBoxState state;
|
||||
|
Loading…
Reference in New Issue
Block a user