diff --git a/osu.Game/Screens/Select/Leaderboards/Leaderboard.cs b/osu.Game/Screens/Select/Leaderboards/Leaderboard.cs index 2abf3c3175..2c51429d4c 100644 --- a/osu.Game/Screens/Select/Leaderboards/Leaderboard.cs +++ b/osu.Game/Screens/Select/Leaderboards/Leaderboard.cs @@ -23,6 +23,8 @@ namespace osu.Game.Screens.Select.Leaderboards private readonly ScrollContainer scrollContainer; private readonly FillFlowContainer scrollFlow; + public Action ScoreSelected; + private IEnumerable scores; public IEnumerable Scores { @@ -52,6 +54,7 @@ namespace osu.Game.Screens.Select.Leaderboards var ls = new LeaderboardScore(s, 1 + i) { AlwaysPresent = true, + Action = () => ScoreSelected?.Invoke(s), State = Visibility.Hidden, }; scrollFlow.Add(ls); diff --git a/osu.Game/Screens/Select/Leaderboards/LeaderboardScore.cs b/osu.Game/Screens/Select/Leaderboards/LeaderboardScore.cs index 321067d18e..b574294587 100644 --- a/osu.Game/Screens/Select/Leaderboards/LeaderboardScore.cs +++ b/osu.Game/Screens/Select/Leaderboards/LeaderboardScore.cs @@ -17,7 +17,7 @@ using osu.Game.Rulesets.Scoring; namespace osu.Game.Screens.Select.Leaderboards { - public class LeaderboardScore : Container, IStateful + public class LeaderboardScore : ClickableContainer, IStateful { public static readonly float HEIGHT = 60; diff --git a/osu.Game/Screens/Select/PlaySongSelect.cs b/osu.Game/Screens/Select/PlaySongSelect.cs index 78a8e4c177..c15900eb6d 100644 --- a/osu.Game/Screens/Select/PlaySongSelect.cs +++ b/osu.Game/Screens/Select/PlaySongSelect.cs @@ -12,6 +12,7 @@ using osu.Game.Graphics; using osu.Game.Overlays.Mods; using osu.Game.Screens.Edit; using osu.Game.Screens.Play; +using osu.Game.Screens.Ranking; namespace osu.Game.Screens.Select { @@ -35,6 +36,8 @@ namespace osu.Game.Screens.Select RelativeSizeAxes = Axes.Both, Padding = new MarginPadding { Top = 10, Right = 5 }, }); + + beatmapDetails.Leaderboard.ScoreSelected += s => Push(new Results(s)); } [BackgroundDependencyLoader]