Beispiel #1
0
        public GetScoresRequest(IBeatmapInfo beatmapInfo, IRulesetInfo ruleset, BeatmapLeaderboardScope scope = BeatmapLeaderboardScope.Global, IEnumerable <IMod> mods = null)
        {
            if (beatmapInfo.OnlineID <= 0)
            {
                throw new InvalidOperationException($"Cannot lookup a beatmap's scores without having a populated {nameof(IBeatmapInfo.OnlineID)}.");
            }

            if (scope == BeatmapLeaderboardScope.Local)
            {
                throw new InvalidOperationException("Should not attempt to request online scores for a local scoped leaderboard");
            }

            this.beatmapInfo = beatmapInfo;
            this.scope       = scope;
            this.ruleset     = ruleset ?? throw new ArgumentNullException(nameof(ruleset));
            this.mods        = mods ?? Array.Empty <IMod>();
        }
Beispiel #2
0
        public GetScoresRequest(BeatmapInfo beatmap, RulesetInfo ruleset, BeatmapLeaderboardScope scope = BeatmapLeaderboardScope.Global)
        {
            if (!beatmap.OnlineBeatmapID.HasValue)
            {
                throw new InvalidOperationException($"Cannot lookup a beatmap's scores without having a populated {nameof(BeatmapInfo.OnlineBeatmapID)}.");
            }

            if (scope == BeatmapLeaderboardScope.Local)
            {
                throw new InvalidOperationException("Should not attempt to request online scores for a local scoped leaderboard");
            }

            this.beatmap = beatmap;
            this.scope   = scope;
            this.ruleset = ruleset ?? throw new ArgumentNullException(nameof(ruleset));

            Success += onSuccess;
        }
        public void ShowWithScope(BeatmapLeaderboardScope scope)
        {
            Show();

            switch (scope)
            {
            default:
                text.Text = @"No scores have been set yet. Maybe you can be the first!";
                break;

            case BeatmapLeaderboardScope.Friend:
                text.Text = @"None of your friends have set a score on this map yet.";
                break;

            case BeatmapLeaderboardScope.Country:
                text.Text = @"No one from your country has set a score on this map yet.";
                break;
            }
        }
Beispiel #4
0
        public void ShowWithScope(BeatmapLeaderboardScope scope)
        {
            Show();

            switch (scope)
            {
            default:
                text.Text = BeatmapsetsStrings.ShowScoreboardNoScoresGlobal;
                break;

            case BeatmapLeaderboardScope.Friend:
                text.Text = BeatmapsetsStrings.ShowScoreboardNoScoresFriend;
                break;

            case BeatmapLeaderboardScope.Country:
                text.Text = BeatmapsetsStrings.ShowScoreboardNoScoresCountry;
                break;
            }
        }
Beispiel #5
0
 public ScopeSelectorTabItem(BeatmapLeaderboardScope value)
     : base(value)
 {
 }
Beispiel #6
0
 public ScopeSelectorTabItem(BeatmapLeaderboardScope value)
     : base(value)
 {
     Text.Font = OsuFont.GetFont(size: 16);
 }