1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 20:22:55 +08:00
This commit is contained in:
smoogipoo 2018-12-27 16:28:17 +09:00
parent c614505b7c
commit 8e031325dd
14 changed files with 56 additions and 35 deletions

View File

@ -88,7 +88,6 @@ namespace osu.Game.Online.Leaderboards
AutoSizeAxes = Axes.Y,
Spacing = new Vector2(0f, 5f),
Padding = new MarginPadding { Top = 10, Bottom = 5 },
};
private TScope scope;

View File

@ -1,3 +1,6 @@
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Graphics;
using osu.Game.Graphics;
using osuTK;
@ -21,4 +24,4 @@ namespace osu.Game.Online.Multiplayer.GameTypes
};
}
}
}
}

View File

@ -1,3 +1,6 @@
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Graphics;
@ -38,4 +41,4 @@ namespace osu.Game.Online.Multiplayer.GameTypes
};
}
}
}
}

View File

@ -1,3 +1,6 @@
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Graphics;
@ -26,4 +29,4 @@ namespace osu.Game.Online.Multiplayer.GameTypes
};
}
}
}
}

View File

@ -1,3 +1,6 @@
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Graphics;
using osu.Game.Graphics;
using osuTK;

View File

@ -1,3 +1,6 @@
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Graphics;
using osu.Game.Graphics;
@ -16,4 +19,4 @@ namespace osu.Game.Online.Multiplayer.GameTypes
};
}
}
}
}

View File

@ -1,3 +1,6 @@
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
@ -49,4 +52,4 @@ namespace osu.Game.Online.Multiplayer.GameTypes
};
}
}
}
}

View File

@ -50,7 +50,6 @@ namespace osu.Game.Online.Multiplayer
[JsonIgnore]
public Bindable<IEnumerable<User>> Participants { get; private set; } = new Bindable<IEnumerable<User>>(Enumerable.Empty<User>());
public Bindable<int> ParticipantCount { get; private set; } = new Bindable<int>();
// todo: TEMPORARY

View File

@ -42,8 +42,6 @@ namespace osu.Game.Screens.Multi.Match.Components
}
};
Host.BindValueChanged(updateHost);
}

View File

@ -4,13 +4,11 @@
using System;
using System.Collections.Generic;
using osu.Framework.Allocation;
using osu.Game.Graphics;
using osu.Game.Online.API;
using osu.Game.Online.API.Requests;
using osu.Game.Online.API.Requests.Responses;
using osu.Game.Online.Leaderboards;
using osu.Game.Online.Multiplayer;
using osu.Game.Scoring;
namespace osu.Game.Screens.Multi.Match.Components
{
@ -57,27 +55,6 @@ namespace osu.Game.Screens.Multi.Match.Components
protected override LeaderboardScore CreateDrawableScore(APIRoomScoreInfo model, int index) => new MatchLeaderboardScore(model, index);
}
public class MatchLeaderboardScore : LeaderboardScore
{
public MatchLeaderboardScore(APIRoomScoreInfo score, int rank)
: base(score, rank)
{
}
[BackgroundDependencyLoader]
private void load()
{
RankContainer.Alpha = 0;
}
protected override IEnumerable<LeaderboardScoreStatistic> GetStatistics(ScoreInfo model) => new[]
{
new LeaderboardScoreStatistic(FontAwesome.fa_crosshairs, "Accuracy", string.Format(model.Accuracy % 1 == 0 ? @"{0:P0}" : @"{0:P2}", model.Accuracy)),
new LeaderboardScoreStatistic(FontAwesome.fa_refresh, "Total Attempts", ((APIRoomScoreInfo)model).TotalAttempts.ToString()),
new LeaderboardScoreStatistic(FontAwesome.fa_check, "Completed Beatmaps", ((APIRoomScoreInfo)model).CompletedBeatmaps.ToString()),
};
}
public enum MatchLeaderboardScope
{
Overall

View File

@ -0,0 +1,33 @@
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Collections.Generic;
using osu.Framework.Allocation;
using osu.Game.Graphics;
using osu.Game.Online.API.Requests.Responses;
using osu.Game.Online.Leaderboards;
using osu.Game.Scoring;
namespace osu.Game.Screens.Multi.Match.Components
{
public class MatchLeaderboardScore : LeaderboardScore
{
public MatchLeaderboardScore(APIRoomScoreInfo score, int rank)
: base(score, rank)
{
}
[BackgroundDependencyLoader]
private void load()
{
RankContainer.Alpha = 0;
}
protected override IEnumerable<LeaderboardScoreStatistic> GetStatistics(ScoreInfo model) => new[]
{
new LeaderboardScoreStatistic(FontAwesome.fa_crosshairs, "Accuracy", string.Format(model.Accuracy % 1 == 0 ? @"{0:P0}" : @"{0:P2}", model.Accuracy)),
new LeaderboardScoreStatistic(FontAwesome.fa_refresh, "Total Attempts", ((APIRoomScoreInfo)model).TotalAttempts.ToString()),
new LeaderboardScoreStatistic(FontAwesome.fa_check, "Completed Beatmaps", ((APIRoomScoreInfo)model).CompletedBeatmaps.ToString()),
};
}
}

View File

@ -294,7 +294,6 @@ namespace osu.Game.Screens.Multi.Match.Components
bindings.Duration.Value = DurationField.Current.Value;
manager?.CreateRoom(room, onSuccess, onError);
processingOverlay.Show();

View File

@ -132,7 +132,6 @@ namespace osu.Game.Screens.Multi.Ranking.Pages
private void load()
{
}
}
}
}

View File

@ -40,7 +40,6 @@ namespace osu.Game.Screens.Multi
TimeBetweenPolls = 5000;
}
protected override void Dispose(bool isDisposing)
{
base.Dispose(isDisposing);