Revert animations and apply suggested changes

This commit is contained in:
Andrei Zavatski
2019-07-09 17:38:17 +03:00
parent bdcdb3a7a6
commit 9907a58ec4
5 changed files with 45 additions and 119 deletions

View File

@ -17,17 +17,14 @@ using osu.Game.Overlays.BeatmapSet;
using osu.Game.Overlays.BeatmapSet.Scores;
using osu.Game.Rulesets;
using osuTK;
namespace osu.Game.Overlays
{
public class BeatmapSetOverlay : FullscreenOverlay
{
private const int fade_duration = 300;
public const float X_PADDING = 40;
public const float TOP_PADDING = 25;
public const float RIGHT_WIDTH = 275;
protected readonly Header Header;
private RulesetStore rulesets;
@ -46,7 +43,6 @@ namespace osu.Game.Overlays
{
OsuScrollContainer scroll;
Info info;
Children = new Drawable[]
{
new Box
@ -98,7 +94,11 @@ namespace osu.Game.Overlays
scores.Loading = true;
getScoresRequest = new GetScoresRequest(b, b.Ruleset);
getScoresRequest.Success += r => Schedule(() => scores.Scores = r);
getScoresRequest.Success += r => Schedule(() =>
{
scores.Scores = r;
scores.Loading = false;
});
api.Queue(getScoresRequest);
}
@ -123,6 +123,7 @@ namespace osu.Game.Overlays
public void FetchAndShowBeatmap(int beatmapId)
{
beatmapSet.Value = null;
var req = new GetBeatmapSetRequest(beatmapId, BeatmapSetLookupType.BeatmapId);
req.Success += res =>
{
@ -130,15 +131,18 @@ namespace osu.Game.Overlays
Header.Picker.Beatmap.Value = Header.BeatmapSet.Value.Beatmaps.First(b => b.OnlineBeatmapID == beatmapId);
};
API.Queue(req);
Show();
}
public void FetchAndShowBeatmapSet(int beatmapSetId)
{
beatmapSet.Value = null;
var req = new GetBeatmapSetRequest(beatmapSetId);
req.Success += res => beatmapSet.Value = res.ToBeatmapSet(rulesets);
API.Queue(req);
Show();
}