1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-29 06:33:21 +08:00

Don't play hover/select sounds for UpdatableAvatar unless it's interactable

This commit is contained in:
Jamie Taylor 2021-09-09 15:33:47 +09:00
parent b8124f7abf
commit b01cf5c937
No known key found for this signature in database
GPG Key ID: 2ACFA8B6370B8C8C

View File

@ -69,14 +69,20 @@ namespace osu.Game.Users.Drawables
if (user == null && !showGuestOnNull) if (user == null && !showGuestOnNull)
return null; return null;
var avatar = new ClickableAvatar(user) if (!openOnClick)
{
return new DrawableAvatar(user)
{
RelativeSizeAxes = Axes.Both,
};
}
return new ClickableAvatar(user)
{ {
OpenOnClick = openOnClick, OpenOnClick = openOnClick,
ShowUsernameTooltip = showUsernameTooltip, ShowUsernameTooltip = showUsernameTooltip,
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
}; };
return avatar;
} }
} }
} }