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