diff --git a/osu.Desktop.VisualTests/Tests/TestCaseLeaderboard.cs b/osu.Desktop.VisualTests/Tests/TestCaseLeaderboard.cs index aa53d773a0..cc30e3de95 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseLeaderboard.cs +++ b/osu.Desktop.VisualTests/Tests/TestCaseLeaderboard.cs @@ -33,7 +33,7 @@ namespace osu.Desktop.VisualTests.Tests { Id = 6602580, Username = @"waaiiru", - Region = new Country + Country = new Country { FullName = @"Spain", FlagName = @"ES", @@ -51,7 +51,7 @@ namespace osu.Desktop.VisualTests.Tests { Id = 4608074, Username = @"Skycries", - Region = new Country + Country = new Country { FullName = @"Brazil", FlagName = @"BR", @@ -69,7 +69,7 @@ namespace osu.Desktop.VisualTests.Tests { Id = 1014222, Username = @"eLy", - Region = new Country + Country = new Country { FullName = @"Japan", FlagName = @"JP", @@ -87,7 +87,7 @@ namespace osu.Desktop.VisualTests.Tests { Id = 1541390, Username = @"Toukai", - Region = new Country + Country = new Country { FullName = @"Canada", FlagName = @"CA", @@ -105,7 +105,7 @@ namespace osu.Desktop.VisualTests.Tests { Id = 2243452, Username = @"Satoruu", - Region = new Country + Country = new Country { FullName = @"Venezuela", FlagName = @"VE", @@ -123,7 +123,7 @@ namespace osu.Desktop.VisualTests.Tests { Id = 2705430, Username = @"Mooha", - Region = new Country + Country = new Country { FullName = @"France", FlagName = @"FR", @@ -141,7 +141,7 @@ namespace osu.Desktop.VisualTests.Tests { Id = 7151382, Username = @"Mayuri Hana", - Region = new Country + Country = new Country { FullName = @"Thailand", FlagName = @"TH", @@ -159,7 +159,7 @@ namespace osu.Desktop.VisualTests.Tests { Id = 2051389, Username = @"FunOrange", - Region = new Country + Country = new Country { FullName = @"Canada", FlagName = @"CA", @@ -177,7 +177,7 @@ namespace osu.Desktop.VisualTests.Tests { Id = 6169483, Username = @"-Hebel-", - Region = new Country + Country = new Country { FullName = @"Mexico", FlagName = @"MX", @@ -195,7 +195,7 @@ namespace osu.Desktop.VisualTests.Tests { Id = 6702666, Username = @"prhtnsm", - Region = new Country + Country = new Country { FullName = @"Germany", FlagName = @"DE", diff --git a/osu.Game/Graphics/UserInterface/IHasDrawableRepresentation.cs b/osu.Game/Graphics/UserInterface/IHasDrawableRepresentation.cs deleted file mode 100644 index f0265f485d..0000000000 --- a/osu.Game/Graphics/UserInterface/IHasDrawableRepresentation.cs +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) 2007-2017 ppy Pty Ltd . -// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using osu.Framework.Graphics; - -namespace osu.Game.Graphics.UserInterface -{ - public interface IHasDrawableRepresentation where T : Drawable - { - T CreateDrawable(); - } -} diff --git a/osu.Game/Screens/Select/Leaderboards/LeaderboardScore.cs b/osu.Game/Screens/Select/Leaderboards/LeaderboardScore.cs index 4d83df6a93..ed873afb44 100644 --- a/osu.Game/Screens/Select/Leaderboards/LeaderboardScore.cs +++ b/osu.Game/Screens/Select/Leaderboards/LeaderboardScore.cs @@ -104,10 +104,6 @@ namespace osu.Game.Screens.Select.Leaderboards RelativeSizeAxes = Axes.X; Height = HEIGHT; - var flag = Score.User?.Region.CreateDrawable() ?? new DrawableFlag(); - flag.Width = 30; - flag.RelativeSizeAxes = Axes.Y; - Children = new Drawable[] { new Container @@ -189,7 +185,11 @@ namespace osu.Game.Screens.Select.Leaderboards Masking = true, Children = new Drawable[] { - flag, + new DrawableFlag(Score.User?.Country?.FlagName ?? "__") + { + Width = 30, + RelativeSizeAxes = Axes.Y, + }, }, }, new FillFlowContainer diff --git a/osu.Game/Users/Country.cs b/osu.Game/Users/Country.cs index 44879a2a8d..f687350e5b 100644 --- a/osu.Game/Users/Country.cs +++ b/osu.Game/Users/Country.cs @@ -10,7 +10,7 @@ using osu.Game.Graphics.UserInterface; namespace osu.Game.Users { - public class Country : IHasDrawableRepresentation + public class Country { /// /// The name of this country. @@ -26,11 +26,6 @@ namespace osu.Game.Users /// Two-letter flag acronym (ISO 3166 standard) /// public string FlagName; - - public DrawableFlag CreateDrawable() - { - return new DrawableFlag(FlagName); - } } public class DrawableFlag : Container diff --git a/osu.Game/Users/Team.cs b/osu.Game/Users/Team.cs index 3772b32e83..361354b8f9 100644 --- a/osu.Game/Users/Team.cs +++ b/osu.Game/Users/Team.cs @@ -6,13 +6,8 @@ using osu.Game.Graphics.UserInterface; namespace osu.Game.Users { - public class Team : IHasDrawableRepresentation + public class Team { public string Name; - - public Sprite CreateDrawable() - { - return new Sprite(); - } } } diff --git a/osu.Game/Users/User.cs b/osu.Game/Users/User.cs index 6ac2cbfc2d..2763b3100f 100644 --- a/osu.Game/Users/User.cs +++ b/osu.Game/Users/User.cs @@ -7,7 +7,7 @@ namespace osu.Game.Users { public int Id; public string Username; - public Country Region; + public Country Country; public Team Team; } } diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index fd55305572..3273336112 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -354,7 +354,6 @@ -