mirror of
https://github.com/ppy/osu.git
synced 2025-02-14 08:22:59 +08:00
Reset top score avatar before updating it
This commit is contained in:
parent
1204c56d2d
commit
fafec00667
@ -116,6 +116,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
|
|||||||
{
|
{
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
|
avatar.Reset();
|
||||||
avatar.User = value.User;
|
avatar.User = value.User;
|
||||||
flag.Country = value.User.Country;
|
flag.Country = value.User.Country;
|
||||||
date.Text = $@"achieved {value.Date.Humanize()}";
|
date.Text = $@"achieved {value.Date.Humanize()}";
|
||||||
|
@ -52,6 +52,20 @@ namespace osu.Game.Users.Drawables
|
|||||||
User = user;
|
User = user;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Fades and expires the <see cref="ModelBackedDrawable{T}.DisplayedDrawable"/>, and sets the
|
||||||
|
/// <see cref="ModelBackedDrawable{T}.Model"/> to null.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Can be used when the <see cref="ModelBackedDrawable{T}.DisplayedDrawable"/> needs to be removed instantly.
|
||||||
|
/// </remarks>
|
||||||
|
public void Reset()
|
||||||
|
{
|
||||||
|
DisplayedDrawable?.FadeOut().Expire();
|
||||||
|
|
||||||
|
User = null;
|
||||||
|
}
|
||||||
|
|
||||||
protected override Drawable CreateDrawable(User user)
|
protected override Drawable CreateDrawable(User user)
|
||||||
{
|
{
|
||||||
if (user == null && !ShowGuestOnNull)
|
if (user == null && !ShowGuestOnNull)
|
||||||
|
Loading…
Reference in New Issue
Block a user