mirror of
https://github.com/osukey/osukey.git
synced 2025-08-02 06:07:11 +09:00
fix broken layout
This commit is contained in:
@ -114,7 +114,7 @@ namespace osu.Game.Overlays
|
||||
base.OnHover(e);
|
||||
|
||||
if (!Active.Value)
|
||||
OnActivated();
|
||||
HoverAction();
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -124,20 +124,18 @@ namespace osu.Game.Overlays
|
||||
base.OnHoverLost(e);
|
||||
|
||||
if (!Active.Value)
|
||||
OnDeactivated();
|
||||
UnhoverAction();
|
||||
}
|
||||
|
||||
protected override void OnActivated()
|
||||
{
|
||||
bar.Expand();
|
||||
Text.FadeColour(Color4.White, 120, Easing.InQuad);
|
||||
HoverAction();
|
||||
Text.Font = Text.Font.With(weight: FontWeight.Bold);
|
||||
}
|
||||
|
||||
protected override void OnDeactivated()
|
||||
{
|
||||
bar.Collapse();
|
||||
Text.FadeColour(AccentColour, 120, Easing.InQuad);
|
||||
UnhoverAction();
|
||||
Text.Font = Text.Font.With(weight: FontWeight.Medium);
|
||||
}
|
||||
|
||||
@ -148,6 +146,18 @@ namespace osu.Game.Overlays
|
||||
else
|
||||
OnDeactivated();
|
||||
}
|
||||
|
||||
protected virtual void HoverAction()
|
||||
{
|
||||
bar.Expand();
|
||||
Text.FadeColour(Color4.White, 120, Easing.InQuad);
|
||||
}
|
||||
|
||||
protected virtual void UnhoverAction()
|
||||
{
|
||||
bar.Collapse();
|
||||
Text.FadeColour(AccentColour, 120, Easing.InQuad);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user