From 17a9f191cd70dde920ee52ba58ada1e81d38127d Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Wed, 8 May 2019 23:08:08 +0900 Subject: [PATCH 1/2] Fix incorrect texture name usage for some rank icons --- .../Profile/Header/DetailHeaderContainer.cs | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/osu.Game/Overlays/Profile/Header/DetailHeaderContainer.cs b/osu.Game/Overlays/Profile/Header/DetailHeaderContainer.cs index de710c5fcd..f9ee67002a 100644 --- a/osu.Game/Overlays/Profile/Header/DetailHeaderContainer.cs +++ b/osu.Game/Overlays/Profile/Header/DetailHeaderContainer.cs @@ -4,14 +4,12 @@ using System.Collections.Generic; using osu.Framework.Allocation; using osu.Framework.Bindables; -using osu.Framework.Extensions; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Shapes; -using osu.Framework.Graphics.Sprites; -using osu.Framework.Graphics.Textures; using osu.Game.Graphics; using osu.Game.Graphics.Sprites; +using osu.Game.Online.Leaderboards; using osu.Game.Overlays.Profile.Header.Components; using osu.Game.Scoring; using osu.Game.Users; @@ -185,8 +183,6 @@ namespace osu.Game.Overlays.Profile.Header private class ScoreRankInfo : CompositeDrawable { - private readonly ScoreRank rank; - private readonly Sprite rankSprite; private readonly OsuSpriteText rankCount; public int RankCount @@ -196,8 +192,6 @@ namespace osu.Game.Overlays.Profile.Header public ScoreRankInfo(ScoreRank rank) { - this.rank = rank; - AutoSizeAxes = Axes.Both; InternalChild = new FillFlowContainer { @@ -206,9 +200,10 @@ namespace osu.Game.Overlays.Profile.Header Direction = FillDirection.Vertical, Children = new Drawable[] { - rankSprite = new Sprite + new DrawableRank(rank) { - RelativeSizeAxes = Axes.Both, + RelativeSizeAxes = Axes.X, + Height = 30, FillMode = FillMode.Fit }, rankCount = new OsuSpriteText @@ -220,12 +215,6 @@ namespace osu.Game.Overlays.Profile.Header } }; } - - [BackgroundDependencyLoader] - private void load(TextureStore textures) - { - rankSprite.Texture = textures.Get($"Grades/{rank.GetDescription()}"); - } } } } From 5128dc32e440d7c3925d1440ef5961d0782c00a4 Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Wed, 8 May 2019 23:13:09 +0900 Subject: [PATCH 2/2] Remove unnecessary fillmode --- osu.Game/Overlays/Profile/Header/DetailHeaderContainer.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/osu.Game/Overlays/Profile/Header/DetailHeaderContainer.cs b/osu.Game/Overlays/Profile/Header/DetailHeaderContainer.cs index f9ee67002a..e41c90be45 100644 --- a/osu.Game/Overlays/Profile/Header/DetailHeaderContainer.cs +++ b/osu.Game/Overlays/Profile/Header/DetailHeaderContainer.cs @@ -204,7 +204,6 @@ namespace osu.Game.Overlays.Profile.Header { RelativeSizeAxes = Axes.X, Height = 30, - FillMode = FillMode.Fit }, rankCount = new OsuSpriteText {