mirror of
https://github.com/ppy/osu
synced 2025-01-09 07:39:46 +00:00
Push results screen when clicking on top score
This commit is contained in:
parent
9c13ede5a8
commit
7e367dc397
@ -8,6 +8,8 @@ using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Online.API.Requests.Responses;
|
||||
using osu.Game.Online.Leaderboards;
|
||||
using osu.Game.Scoring;
|
||||
using System;
|
||||
|
||||
namespace osu.Game.Screens.Select.Details
|
||||
{
|
||||
@ -21,6 +23,8 @@ namespace osu.Game.Screens.Select.Details
|
||||
|
||||
public Bindable<APILegacyUserTopScoreInfo> Score = new Bindable<APILegacyUserTopScoreInfo>();
|
||||
|
||||
public Action<ScoreInfo> ScoreSelected;
|
||||
|
||||
protected override bool StartHidden => true;
|
||||
|
||||
public UserTopScoreContainer()
|
||||
@ -66,7 +70,10 @@ namespace osu.Game.Screens.Select.Details
|
||||
if (score != null)
|
||||
{
|
||||
scoreContainer.Clear();
|
||||
scoreContainer.Add(new LeaderboardScore(score.Score, score.Position));
|
||||
scoreContainer.Add(new LeaderboardScore(score.Score, score.Position)
|
||||
{
|
||||
Action = () => ScoreSelected?.Invoke(score.Score)
|
||||
});
|
||||
Show();
|
||||
}
|
||||
else
|
||||
|
@ -216,6 +216,7 @@ namespace osu.Game.Screens.Select
|
||||
}
|
||||
|
||||
BeatmapDetails.Leaderboard.ScoreSelected += s => this.Push(new SoloResults(s));
|
||||
BeatmapDetails.TopScore.ScoreSelected += s => this.Push(new SoloResults(s));
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader(true)]
|
||||
|
Loading…
Reference in New Issue
Block a user