From 0b42b4b95598dcb067a4d06b4b734a0e468204c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Sat, 26 Dec 2020 13:54:10 +0100 Subject: [PATCH] Rename {Drawable -> Clickable}Avatar --- osu.Game/Online/Leaderboards/LeaderboardScore.cs | 4 ++-- osu.Game/Overlays/Chat/Tabs/PrivateChannelTabItem.cs | 4 ++-- .../Drawables/{DrawableAvatar.cs => ClickableAvatar.cs} | 7 ++++--- osu.Game/Users/Drawables/UpdateableAvatar.cs | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) rename osu.Game/Users/Drawables/{DrawableAvatar.cs => ClickableAvatar.cs} (90%) diff --git a/osu.Game/Online/Leaderboards/LeaderboardScore.cs b/osu.Game/Online/Leaderboards/LeaderboardScore.cs index d8207aa8f4..5608002513 100644 --- a/osu.Game/Online/Leaderboards/LeaderboardScore.cs +++ b/osu.Game/Online/Leaderboards/LeaderboardScore.cs @@ -78,7 +78,7 @@ private void load(IAPIProvider api, OsuColour colour, ScoreManager scoreManager) statisticsLabels = GetStatistics(score).Select(s => new ScoreComponentLabel(s)).ToList(); - DrawableAvatar innerAvatar; + ClickableAvatar innerAvatar; Children = new Drawable[] { @@ -115,7 +115,7 @@ private void load(IAPIProvider api, OsuColour colour, ScoreManager scoreManager) Children = new[] { avatar = new DelayedLoadWrapper( - innerAvatar = new DrawableAvatar(user) + innerAvatar = new ClickableAvatar(user) { RelativeSizeAxes = Axes.Both, CornerRadius = corner_radius, diff --git a/osu.Game/Overlays/Chat/Tabs/PrivateChannelTabItem.cs b/osu.Game/Overlays/Chat/Tabs/PrivateChannelTabItem.cs index 5b428a3825..00f46b0035 100644 --- a/osu.Game/Overlays/Chat/Tabs/PrivateChannelTabItem.cs +++ b/osu.Game/Overlays/Chat/Tabs/PrivateChannelTabItem.cs @@ -25,7 +25,7 @@ public PrivateChannelTabItem(Channel value) if (value.Type != ChannelType.PM) throw new ArgumentException("Argument value needs to have the targettype user!"); - DrawableAvatar avatar; + ClickableAvatar avatar; AddRange(new Drawable[] { @@ -48,7 +48,7 @@ public PrivateChannelTabItem(Channel value) Anchor = Anchor.Centre, Origin = Anchor.Centre, Masking = true, - Child = new DelayedLoadWrapper(avatar = new DrawableAvatar(value.Users.First()) + Child = new DelayedLoadWrapper(avatar = new ClickableAvatar(value.Users.First()) { RelativeSizeAxes = Axes.Both, OpenOnClick = { Value = false }, diff --git a/osu.Game/Users/Drawables/DrawableAvatar.cs b/osu.Game/Users/Drawables/ClickableAvatar.cs similarity index 90% rename from osu.Game/Users/Drawables/DrawableAvatar.cs rename to osu.Game/Users/Drawables/ClickableAvatar.cs index 42d2dbb1c6..61af2d8e27 100644 --- a/osu.Game/Users/Drawables/DrawableAvatar.cs +++ b/osu.Game/Users/Drawables/ClickableAvatar.cs @@ -14,7 +14,7 @@ namespace osu.Game.Users.Drawables { [LongRunningLoad] - public class DrawableAvatar : Container + public class ClickableAvatar : Container { /// /// Whether to open the user's profile when clicked. @@ -27,10 +27,11 @@ public class DrawableAvatar : Container private OsuGame game { get; set; } /// - /// An avatar for specified user. + /// A clickable avatar for specified user, with UI sounds included. + /// If is true, clicking will open the user's profile. /// /// The user. A null value will get a placeholder avatar. - public DrawableAvatar(User user = null) + public ClickableAvatar(User user = null) { this.user = user; } diff --git a/osu.Game/Users/Drawables/UpdateableAvatar.cs b/osu.Game/Users/Drawables/UpdateableAvatar.cs index 171462f3fc..4772207edf 100644 --- a/osu.Game/Users/Drawables/UpdateableAvatar.cs +++ b/osu.Game/Users/Drawables/UpdateableAvatar.cs @@ -65,7 +65,7 @@ protected override Drawable CreateDrawable(User user) if (user == null && !ShowGuestOnNull) return null; - var avatar = new DrawableAvatar(user) + var avatar = new ClickableAvatar(user) { RelativeSizeAxes = Axes.Both, };