Revert commits

This reverts commit 28586c704dbf6e5a2b1bc43e8f93c13e3b8f72e5.

This reverts commit d9d35bb847a8f424c1379763019dbb0dc05c52a2.
This commit is contained in:
Adam Baker 2022-07-22 22:24:50 -05:00
parent d9d35bb847
commit d451bc8fda
3 changed files with 10 additions and 15 deletions

View File

@ -222,7 +222,7 @@ namespace osu.Game.Overlays.BeatmapSet
TextSize = 14, TextSize = 14,
TextPadding = new MarginPadding { Horizontal = 35, Vertical = 10 } TextPadding = new MarginPadding { Horizontal = 35, Vertical = 10 }
}, },
Details = new Details(false), Details = new Details(),
}, },
}, },
} }

View File

@ -59,7 +59,7 @@ namespace osu.Game.Overlays.BeatmapSet
ratingBox.Alpha = BeatmapSet?.Status > 0 ? 1 : 0; ratingBox.Alpha = BeatmapSet?.Status > 0 ? 1 : 0;
} }
public Details(bool updateWithModSelection = true) public Details()
{ {
Width = BeatmapSetOverlay.RIGHT_WIDTH; Width = BeatmapSetOverlay.RIGHT_WIDTH;
AutoSizeAxes = Axes.Y; AutoSizeAxes = Axes.Y;
@ -82,7 +82,7 @@ namespace osu.Game.Overlays.BeatmapSet
}, },
new DetailBox new DetailBox
{ {
Child = advanced = new AdvancedStats(updateWithModSelection) Child = advanced = new AdvancedStats
{ {
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y, AutoSizeAxes = Axes.Y,

View File

@ -57,7 +57,7 @@ namespace osu.Game.Screens.Select.Details
} }
} }
public AdvancedStats(bool updateWithModSelection = true) public AdvancedStats()
{ {
Child = new FillFlowContainer Child = new FillFlowContainer
{ {
@ -65,11 +65,11 @@ namespace osu.Game.Screens.Select.Details
AutoSizeAxes = Axes.Y, AutoSizeAxes = Axes.Y,
Children = new[] Children = new[]
{ {
FirstValue = new StatisticRow(updateWithModSelection), // circle size/key amount FirstValue = new StatisticRow(), // circle size/key amount
HpDrain = new StatisticRow(updateWithModSelection) { Title = BeatmapsetsStrings.ShowStatsDrain }, HpDrain = new StatisticRow { Title = BeatmapsetsStrings.ShowStatsDrain },
Accuracy = new StatisticRow(updateWithModSelection) { Title = BeatmapsetsStrings.ShowStatsAccuracy }, Accuracy = new StatisticRow { Title = BeatmapsetsStrings.ShowStatsAccuracy },
ApproachRate = new StatisticRow(updateWithModSelection) { Title = BeatmapsetsStrings.ShowStatsAr }, ApproachRate = new StatisticRow { Title = BeatmapsetsStrings.ShowStatsAr },
starDifficulty = new StatisticRow(updateWithModSelection, 10, true) { Title = BeatmapsetsStrings.ShowStatsStars }, starDifficulty = new StatisticRow(10, true) { Title = BeatmapsetsStrings.ShowStatsStars },
}, },
}; };
} }
@ -183,7 +183,6 @@ namespace osu.Game.Screens.Select.Details
private readonly OsuSpriteText name, valueText; private readonly OsuSpriteText name, valueText;
private readonly Bar bar; private readonly Bar bar;
public readonly Bar ModBar; public readonly Bar ModBar;
private readonly bool showModdedValue;
[Resolved] [Resolved]
private OsuColour colours { get; set; } private OsuColour colours { get; set; }
@ -204,9 +203,6 @@ namespace osu.Game.Screens.Select.Details
if (value == this.value) if (value == this.value)
return; return;
if (!showModdedValue)
value.adjustedValue = null;
this.value = value; this.value = value;
bar.Length = value.baseValue / maxValue; bar.Length = value.baseValue / maxValue;
@ -229,14 +225,13 @@ namespace osu.Game.Screens.Select.Details
set => bar.AccentColour = value; set => bar.AccentColour = value;
} }
public StatisticRow(bool showModdedValue, float maxValue = 10, bool forceDecimalPlaces = false) public StatisticRow(float maxValue = 10, bool forceDecimalPlaces = false)
{ {
this.maxValue = maxValue; this.maxValue = maxValue;
this.forceDecimalPlaces = forceDecimalPlaces; this.forceDecimalPlaces = forceDecimalPlaces;
RelativeSizeAxes = Axes.X; RelativeSizeAxes = Axes.X;
AutoSizeAxes = Axes.Y; AutoSizeAxes = Axes.Y;
Padding = new MarginPadding { Vertical = 2.5f }; Padding = new MarginPadding { Vertical = 2.5f };
this.showModdedValue = showModdedValue;
Children = new Drawable[] Children = new Drawable[]
{ {