1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 22:07:25 +08:00

Rename {Drawable -> Clickable}Avatar

This commit is contained in:
Bartłomiej Dach 2020-12-26 13:54:10 +01:00
parent 3e06f592a1
commit 0b42b4b955
4 changed files with 9 additions and 8 deletions

View File

@ -78,7 +78,7 @@ namespace osu.Game.Online.Leaderboards
statisticsLabels = GetStatistics(score).Select(s => new ScoreComponentLabel(s)).ToList(); statisticsLabels = GetStatistics(score).Select(s => new ScoreComponentLabel(s)).ToList();
DrawableAvatar innerAvatar; ClickableAvatar innerAvatar;
Children = new Drawable[] Children = new Drawable[]
{ {
@ -115,7 +115,7 @@ namespace osu.Game.Online.Leaderboards
Children = new[] Children = new[]
{ {
avatar = new DelayedLoadWrapper( avatar = new DelayedLoadWrapper(
innerAvatar = new DrawableAvatar(user) innerAvatar = new ClickableAvatar(user)
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
CornerRadius = corner_radius, CornerRadius = corner_radius,

View File

@ -25,7 +25,7 @@ namespace osu.Game.Overlays.Chat.Tabs
if (value.Type != ChannelType.PM) if (value.Type != ChannelType.PM)
throw new ArgumentException("Argument value needs to have the targettype user!"); throw new ArgumentException("Argument value needs to have the targettype user!");
DrawableAvatar avatar; ClickableAvatar avatar;
AddRange(new Drawable[] AddRange(new Drawable[]
{ {
@ -48,7 +48,7 @@ namespace osu.Game.Overlays.Chat.Tabs
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,
Masking = true, Masking = true,
Child = new DelayedLoadWrapper(avatar = new DrawableAvatar(value.Users.First()) Child = new DelayedLoadWrapper(avatar = new ClickableAvatar(value.Users.First())
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
OpenOnClick = { Value = false }, OpenOnClick = { Value = false },

View File

@ -14,7 +14,7 @@ using osu.Game.Graphics.Containers;
namespace osu.Game.Users.Drawables namespace osu.Game.Users.Drawables
{ {
[LongRunningLoad] [LongRunningLoad]
public class DrawableAvatar : Container public class ClickableAvatar : Container
{ {
/// <summary> /// <summary>
/// Whether to open the user's profile when clicked. /// Whether to open the user's profile when clicked.
@ -27,10 +27,11 @@ namespace osu.Game.Users.Drawables
private OsuGame game { get; set; } private OsuGame game { get; set; }
/// <summary> /// <summary>
/// An avatar for specified user. /// A clickable avatar for specified user, with UI sounds included.
/// If <see cref="OpenOnClick"/> is <c>true</c>, clicking will open the user's profile.
/// </summary> /// </summary>
/// <param name="user">The user. A null value will get a placeholder avatar.</param> /// <param name="user">The user. A null value will get a placeholder avatar.</param>
public DrawableAvatar(User user = null) public ClickableAvatar(User user = null)
{ {
this.user = user; this.user = user;
} }

View File

@ -65,7 +65,7 @@ namespace osu.Game.Users.Drawables
if (user == null && !ShowGuestOnNull) if (user == null && !ShowGuestOnNull)
return null; return null;
var avatar = new DrawableAvatar(user) var avatar = new ClickableAvatar(user)
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
}; };