1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 10:42:54 +08:00

Apply formatting adjustments

This commit is contained in:
smoogipoo 2019-03-08 16:44:39 +09:00
parent 8c0e325d8b
commit a40ffcc692
6 changed files with 29 additions and 17 deletions

View File

@ -26,10 +26,9 @@ namespace osu.Game.Tests.Visual
public TestCaseBeatmapScoresContainer()
{
Container container;
ScoresContainer scoresContainer;
Child = container = new Container
Child = new Container
{
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
@ -65,6 +64,7 @@ namespace osu.Game.Tests.Visual
new OsuModHardRock(),
},
Rank = ScoreRank.XH,
PP = 200,
MaxCombo = 1234,
TotalScore = 1234567890,
Accuracy = 1,
@ -88,6 +88,7 @@ namespace osu.Game.Tests.Visual
new OsuModFlashlight(),
},
Rank = ScoreRank.S,
PP = 190,
MaxCombo = 1234,
TotalScore = 1234789,
Accuracy = 0.9997,
@ -110,6 +111,7 @@ namespace osu.Game.Tests.Visual
new OsuModHidden(),
},
Rank = ScoreRank.B,
PP = 180,
MaxCombo = 1234,
TotalScore = 12345678,
Accuracy = 0.9854,
@ -131,6 +133,7 @@ namespace osu.Game.Tests.Visual
new OsuModDoubleTime(),
},
Rank = ScoreRank.C,
PP = 170,
MaxCombo = 1234,
TotalScore = 1234567,
Accuracy = 0.8765,
@ -148,6 +151,7 @@ namespace osu.Game.Tests.Visual
},
},
Rank = ScoreRank.F,
PP = 160,
MaxCombo = 1234,
TotalScore = 123456,
Accuracy = 0.6543,

View File

@ -5,7 +5,6 @@ using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Input.Events;
using osu.Game.Graphics;
using osu.Game.Users;
namespace osu.Game.Overlays.BeatmapSet.Scores

View File

@ -118,7 +118,8 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
private class DrawableScoreData : ScoreTableLine
{
public DrawableScoreData(int index, APIScoreInfo score, int maxModsAmount) : base(maxModsAmount)
public DrawableScoreData(int index, APIScoreInfo score, int maxModsAmount)
: base(maxModsAmount)
{
SpriteText scoreText;
SpriteText accuracy;

View File

@ -56,13 +56,15 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
private readonly ModsInfoColumn modsInfo;
private APIScoreInfo score;
public APIScoreInfo Score
{
get { return score; }
get => score;
set
{
if (score == value)
return;
score = value;
avatar.User = username.User = score.User;
@ -274,9 +276,10 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
{
if (text.TextSize == value)
return;
text.TextSize = value;
}
get { return text.TextSize; }
get => text.TextSize;
}
public ClickableTopScoreUsername()
@ -386,7 +389,8 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
}
}
public ModsInfoColumn(string header) : base(header)
public ModsInfoColumn(string header)
: base(header)
{
AutoSizeAxes = Axes.Both;
Add(modsContainer = new FillFlowContainer
@ -409,12 +413,14 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
{
if (valueText.Text == value)
return;
valueText.Text = value;
}
get { return valueText.Text; }
get => valueText.Text;
}
protected TextInfoColumn(string header, float valueTextSize = 25) : base(header)
protected TextInfoColumn(string header, float valueTextSize = 25)
: base(header)
{
Add(valueText = new SpriteText
{
@ -425,7 +431,8 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
private class AutoSizedInfoColumn : TextInfoColumn
{
public AutoSizedInfoColumn(string header, float valueTextSize = 25) : base(header, valueTextSize)
public AutoSizedInfoColumn(string header, float valueTextSize = 25)
: base(header, valueTextSize)
{
AutoSizeAxes = Axes.Both;
}
@ -435,7 +442,8 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
{
private const float width = 70;
public MediumInfoColumn(string header, float valueTextSize = 25) : base(header, valueTextSize)
public MediumInfoColumn(string header, float valueTextSize = 25)
: base(header, valueTextSize)
{
Width = width;
}
@ -445,7 +453,8 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
{
private const float width = 40;
public SmallInfoColumn(string header, float valueTextSize = 25) : base(header, valueTextSize)
public SmallInfoColumn(string header, float valueTextSize = 25)
: base(header, valueTextSize)
{
Width = width;
}

View File

@ -11,6 +11,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
public class ScoreTable : FillFlowContainer
{
private IEnumerable<APIScoreInfo> scores;
public IEnumerable<APIScoreInfo> Scores
{
set
@ -31,10 +32,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
foreach (var s in scores)
Add(new DrawableScore(index++, s, maxModsAmount));
}
get
{
return scores;
}
get => scores;
}
public ScoreTable()

View File

@ -7,7 +7,8 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
{
public class ScoreTextLine : ScoreTableLine
{
public ScoreTextLine(int maxModsAmount) : base(maxModsAmount)
public ScoreTextLine(int maxModsAmount)
: base(maxModsAmount)
{
RankContainer.Add(new ScoreText
{