Adjust transforms

This commit is contained in:
smoogipoo 2019-04-03 15:41:22 +09:00
parent ab4be3b75f
commit 7f425059ae
2 changed files with 6 additions and 9 deletions

View File

@ -261,7 +261,7 @@ protected override void OnHoverLost(HoverLostEvent e)
private class ClickableTopScoreUsername : ClickableUserContainer
{
private const float username_fade_duration = 500;
private const float username_fade_duration = 150;
private readonly FillFlowContainer hoverContainer;

View File

@ -145,22 +145,19 @@ public ClickableScoreUsername()
});
}
protected override void OnUserChanged(User user)
{
text.Text = textBold.Text = user.Username;
}
protected override void OnUserChanged(User user) => text.Text = textBold.Text = user.Username;
protected override bool OnHover(HoverEvent e)
{
textBold.FadeIn(fade_duration, Easing.OutQuint);
text.FadeOut(fade_duration, Easing.OutQuint);
textBold.Show();
text.Hide();
return base.OnHover(e);
}
protected override void OnHoverLost(HoverLostEvent e)
{
textBold.FadeOut(fade_duration, Easing.OutQuint);
text.FadeIn(fade_duration, Easing.OutQuint);
textBold.Hide();
text.Show();
base.OnHoverLost(e);
}
}