From aede1b183a597b0a354f2919e7787928eb409445 Mon Sep 17 00:00:00 2001 From: Andrei Zavatski Date: Fri, 22 Nov 2019 22:04:58 +0300 Subject: [PATCH] Make ScopeSelector always visible --- .../Scores/NotSupporterPlaceholder.cs | 2 -- .../BeatmapSet/Scores/ScoresContainer.cs | 22 +++++++++++++------ 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/osu.Game/Overlays/BeatmapSet/Scores/NotSupporterPlaceholder.cs b/osu.Game/Overlays/BeatmapSet/Scores/NotSupporterPlaceholder.cs index 86b02c0cff..ba08a78a61 100644 --- a/osu.Game/Overlays/BeatmapSet/Scores/NotSupporterPlaceholder.cs +++ b/osu.Game/Overlays/BeatmapSet/Scores/NotSupporterPlaceholder.cs @@ -17,8 +17,6 @@ namespace osu.Game.Overlays.BeatmapSet.Scores LinkFlowContainer text; AutoSizeAxes = Axes.Both; - Anchor = Anchor.TopCentre; - Origin = Anchor.TopCentre; Child = new FillFlowContainer { AutoSizeAxes = Axes.Both, diff --git a/osu.Game/Overlays/BeatmapSet/Scores/ScoresContainer.cs b/osu.Game/Overlays/BeatmapSet/Scores/ScoresContainer.cs index fe42ef2975..0389d4cf25 100644 --- a/osu.Game/Overlays/BeatmapSet/Scores/ScoresContainer.cs +++ b/osu.Game/Overlays/BeatmapSet/Scores/ScoresContainer.cs @@ -33,10 +33,10 @@ namespace osu.Game.Overlays.BeatmapSet.Scores private readonly ScoreTable scoreTable; private readonly FillFlowContainer topScoresContainer; private readonly DimmedLoadingLayer loading; - private readonly FillFlowContainer filterControls; private readonly LeaderboardModSelector modSelector; private readonly NoScoresPlaceholder noScoresPlaceholder; private readonly FillFlowContainer content; + private readonly NotSupporterPlaceholder notSupporterPlaceholder; [Resolved] private IAPIProvider api { get; set; } @@ -93,22 +93,30 @@ namespace osu.Game.Overlays.BeatmapSet.Scores Margin = new MarginPadding { Vertical = spacing }, Children = new Drawable[] { - filterControls = new FillFlowContainer + new FillFlowContainer { - Anchor = Anchor.TopCentre, - Origin = Anchor.TopCentre, - AutoSizeAxes = Axes.Both, + RelativeSizeAxes = Axes.X, + AutoSizeAxes = Axes.Y, Direction = FillDirection.Vertical, Spacing = new Vector2(0, spacing), Children = new Drawable[] { new LeaderboardScopeSelector { + Anchor = Anchor.TopCentre, + Origin = Anchor.TopCentre, Current = { BindTarget = scope } }, - new NotSupporterPlaceholder(), + notSupporterPlaceholder = new NotSupporterPlaceholder + { + Anchor = Anchor.TopCentre, + Origin = Anchor.TopCentre, + Alpha = 0, + }, modSelector = new LeaderboardModSelector { + Anchor = Anchor.TopCentre, + Origin = Anchor.TopCentre, Ruleset = { BindTarget = ruleset } } } @@ -207,7 +215,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores { scope.Value = BeatmapLeaderboardScope.Global; modSelector.DeselectAll(); - filterControls.FadeTo(api.IsLoggedIn && api.LocalUser.Value.IsSupporter ? 1 : 0); + modSelector.FadeTo(api.IsLoggedIn && api.LocalUser.Value.IsSupporter ? 1 : 0); } private void getScores()