From 47bd97363e625ccdf63bc337d158c00149d997d6 Mon Sep 17 00:00:00 2001 From: Unknown Date: Mon, 11 Dec 2017 15:05:12 +0530 Subject: [PATCH] Use ShortName for mode. - Also set the ruleset when fetching scores in BeatmapSetOverlay --- .../Online/API/Requests/GetScoresRequest.cs | 20 +------------------ osu.Game/Overlays/BeatmapSetOverlay.cs | 2 +- .../Select/Leaderboards/Leaderboard.cs | 2 +- 3 files changed, 3 insertions(+), 21 deletions(-) diff --git a/osu.Game/Online/API/Requests/GetScoresRequest.cs b/osu.Game/Online/API/Requests/GetScoresRequest.cs index 54d656eeca..4379daa47b 100644 --- a/osu.Game/Online/API/Requests/GetScoresRequest.cs +++ b/osu.Game/Online/API/Requests/GetScoresRequest.cs @@ -69,25 +69,7 @@ namespace osu.Game.Online.API.Requests break; } - switch (ruleset?.Name) - { - default: - case @"osu!": - req.AddParameter(@"mode", @"osu"); - break; - - case @"osu!taiko": - req.AddParameter(@"mode", @"taiko"); - break; - - case @"osu!catch": - req.AddParameter(@"mode", @"catch"); - break; - - case @"osu!mania": - req.AddParameter(@"mode", @"mania"); - break; - } + req.AddParameter(@"mode", ruleset?.ShortName ?? @"osu"); return req; } diff --git a/osu.Game/Overlays/BeatmapSetOverlay.cs b/osu.Game/Overlays/BeatmapSetOverlay.cs index 0d658b346e..0a88f586b5 100644 --- a/osu.Game/Overlays/BeatmapSetOverlay.cs +++ b/osu.Game/Overlays/BeatmapSetOverlay.cs @@ -104,7 +104,7 @@ namespace osu.Game.Overlays scores.IsLoading = true; - getScoresRequest = new GetScoresRequest(beatmap); + getScoresRequest = new GetScoresRequest(beatmap, beatmap.Ruleset); getScoresRequest.Success += r => { scores.Scores = r.Scores; diff --git a/osu.Game/Screens/Select/Leaderboards/Leaderboard.cs b/osu.Game/Screens/Select/Leaderboards/Leaderboard.cs index e80f502e73..36dc254792 100644 --- a/osu.Game/Screens/Select/Leaderboards/Leaderboard.cs +++ b/osu.Game/Screens/Select/Leaderboards/Leaderboard.cs @@ -289,7 +289,7 @@ namespace osu.Game.Screens.Select.Leaderboards { Height = 26; Width = 26; - Child = new ClickableContainer + Child = new OsuClickableContainer { AutoSizeAxes = Axes.Both, Anchor = Anchor.Centre,