Skip to content

Add new song select beatmap rankings section #32533

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
e391e4e
Remove previous beatmap wedge implementation
frenzibyte Mar 20, 2025
6523647
Introduce `ShearAlignedDrawable` for sheared wedge alignment
frenzibyte Mar 20, 2025
fe1b122
Include numbers in beatmap statistics
frenzibyte Mar 20, 2025
2c7ccb9
Update API beatmap model to include user play count
frenzibyte Mar 20, 2025
10d306d
Add `DarkOrange` colour set
frenzibyte Mar 20, 2025
b863168
Add specifications for new song select icons
frenzibyte Mar 20, 2025
7b9b180
Add new beatmap main & difficulty wedge design
frenzibyte Mar 20, 2025
a6dd0e8
Add animation when beatmap status pill hides
frenzibyte Mar 20, 2025
546a799
Hook carousel selection with screen beatmap bindable in basic manner
frenzibyte Mar 20, 2025
89f520a
Update resources
frenzibyte Mar 20, 2025
decc8c6
Don't show play/favourite statistic while loading if hidden
frenzibyte Mar 20, 2025
a4cdf83
Add adjusted attributes tooltip
frenzibyte Mar 20, 2025
ef1429a
Minor code adjustments
frenzibyte Mar 20, 2025
f277d40
Fix code quality error
frenzibyte Mar 21, 2025
3212279
Add new beatmap details wedge design
frenzibyte Mar 20, 2025
c5cd073
Add minimum padding to main wedge statistics
frenzibyte Mar 21, 2025
3dfeb82
Merge branch 'master' into song-select-v2-wedges-main
peppy Mar 22, 2025
e862b84
Merge branch 'sheared-dropdown' into song-select-v2-wedges-rankings
frenzibyte Mar 23, 2025
d0228e9
Add new song select beatmap rankings section
frenzibyte Mar 23, 2025
b0656eb
Add new score tooltip design
frenzibyte Mar 23, 2025
2dcb07f
Apply minor changes to score V2 design in line with latest iteration
frenzibyte Mar 23, 2025
6146e47
Fix build error
frenzibyte Mar 23, 2025
6af577c
Shorten beatmap hit statistics names
frenzibyte Mar 24, 2025
81f166a
Make difficulty statistics fixed width
frenzibyte Mar 24, 2025
c958381
Fix wedge area layout
frenzibyte Mar 24, 2025
68613c0
Fix code quality error
frenzibyte Mar 24, 2025
ffdd718
Adjust naming
peppy Mar 25, 2025
ffeb4b8
Adjust metrics to look more appropriate
frenzibyte Mar 25, 2025
30c2205
Merge branch 'song-select-v2-wedges-main' into song-select-v2-wedges-…
frenzibyte Mar 25, 2025
446c31d
Adjust details metrics to look more appropriate
frenzibyte Mar 25, 2025
422dd78
Merge branch 'song-select-v2-wedges-details' into song-select-v2-wedg…
frenzibyte Mar 25, 2025
43032b3
Add max width logic for difficulty name
frenzibyte Mar 26, 2025
5782d64
Fix typo in class name
frenzibyte Mar 26, 2025
0f04a60
Fix margin specifications
frenzibyte Mar 26, 2025
86835bf
Add compact display for hit statistics
frenzibyte Mar 27, 2025
06cdb09
Fix title & artist clickable outside text region
frenzibyte Mar 27, 2025
58f5a41
Merge branch 'master' into song-select-v2-wedges-main
frenzibyte Mar 27, 2025
6ca3685
Improve wedge difficulty statistics fluidity one step further
frenzibyte Mar 27, 2025
599b895
Fix statistic bars potentially exceeding maximum
frenzibyte Mar 27, 2025
15199de
Fix incorrect use of localisation
frenzibyte Mar 27, 2025
6c059a0
Handle mod setting changes in wedges
frenzibyte Mar 27, 2025
5e76749
Add handling for statistic value adjustments
frenzibyte Mar 27, 2025
41af060
Fix adjustment display not comparing against base values
frenzibyte Mar 28, 2025
65a3eab
Use more explicit method for sizing update
frenzibyte Mar 28, 2025
1da785a
Add spacing between count and difficulty statistics
frenzibyte Mar 28, 2025
d2f6ffc
Merge branch 'song-select-v2-wedges-main' into song-select-v2-wedges-…
frenzibyte Mar 28, 2025
1823ec7
Merge branch 'song-select-v2-wedges-details' into song-select-v2-wedg…
frenzibyte Mar 28, 2025
4ff06c8
Adjust leaderboard score metrics to match desired default
frenzibyte Mar 28, 2025
8e76021
Adjust tooltip metrics to match desired default
frenzibyte Mar 28, 2025
9930ac3
Adjust rankings wedge metrics
frenzibyte Mar 28, 2025
b27ed88
Fix leaderboard score test scene lacking popover container
frenzibyte Mar 28, 2025
073d359
Define standard font sizes and update new beatmap panel desgins accor…
frenzibyte Apr 3, 2025
48575f4
Display beatmap card title in styled font
frenzibyte Apr 4, 2025
399d5c9
Decrease difficulty author font level in standalone panel
frenzibyte Apr 4, 2025
ab3d241
Merge branch 'song-select-v2-metrics' into song-select-v2-wedges-main
frenzibyte Apr 4, 2025
2d971c0
Adjust wedge metrics and follow defined standards
frenzibyte Apr 4, 2025
df9d3be
Remove unnecessary dimming layer in song select screen
frenzibyte Apr 4, 2025
bee74a6
Add extra spacing between status pill and title
frenzibyte Apr 4, 2025
facfae0
Merge branch 'song-select-v2-wedges-main' into song-select-v2-wedges-…
frenzibyte Apr 5, 2025
780407b
Update metrics in line with standards
frenzibyte Apr 5, 2025
4abb672
Apply extra adjustments for transparency
frenzibyte Apr 5, 2025
d24e2e8
Merge branch 'song-select-v2-wedges-main' into song-select-v2-wedges-…
frenzibyte Apr 5, 2025
88b76ca
Add transparency to header and details wedge
frenzibyte Apr 5, 2025
a4bcd7a
Merge branch 'song-select-v2-wedges-details' into song-select-v2-wedg…
frenzibyte Apr 5, 2025
18b0b76
Remove unused using directive
frenzibyte Apr 5, 2025
839effd
Merge branch 'song-select-v2-wedges-details' into song-select-v2-wedg…
frenzibyte Apr 5, 2025
b9dde46
Adjust metrics in line with standards
frenzibyte Apr 5, 2025
52a8097
Remove external highlights next to score cards
frenzibyte Apr 5, 2025
2a35924
Adjust missed usages
frenzibyte Apr 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions osu.Game.Rulesets.Catch/Beatmaps/CatchBeatmap.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

using System;
using System.Collections.Generic;
using System.Linq;
using osu.Game.Beatmaps;
Expand All @@ -16,25 +17,32 @@ public override IEnumerable<BeatmapStatistic> GetStatistics()
int fruits = HitObjects.Count(s => s is Fruit);
int juiceStreams = HitObjects.Count(s => s is JuiceStream);
int bananaShowers = HitObjects.Count(s => s is BananaShower);
int maximum = fruits + juiceStreams + bananaShowers;

return new[]
{
new BeatmapStatistic
{
Name = @"Fruit Count",
Name = @"Fruits",
Content = fruits.ToString(),
Value = fruits,
Maximum = maximum,
CreateIcon = () => new BeatmapStatisticIcon(BeatmapStatisticsIconType.Circles),
},
new BeatmapStatistic
{
Name = @"Juice Stream Count",
Name = @"Juice Streams",
Content = juiceStreams.ToString(),
Value = juiceStreams,
Maximum = maximum,
CreateIcon = () => new BeatmapStatisticIcon(BeatmapStatisticsIconType.Sliders),
},
new BeatmapStatistic
{
Name = @"Banana Shower Count",
Name = @"Banana Showers",
Content = bananaShowers.ToString(),
Value = bananaShowers,
Maximum = Math.Max(bananaShowers, 10),
CreateIcon = () => new BeatmapStatisticIcon(BeatmapStatisticsIconType.Spinners),
}
};
Expand Down
9 changes: 7 additions & 2 deletions osu.Game.Rulesets.Mania/Beatmaps/ManiaBeatmap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,25 @@ public override IEnumerable<BeatmapStatistic> GetStatistics()
{
int notes = HitObjects.Count(s => s is Note);
int holdNotes = HitObjects.Count(s => s is HoldNote);
int maximum = notes + holdNotes;

return new[]
{
new BeatmapStatistic
{
Name = @"Note Count",
Name = @"Notes",
CreateIcon = () => new BeatmapStatisticIcon(BeatmapStatisticsIconType.Circles),
Content = notes.ToString(),
Value = notes,
Maximum = maximum,
},
new BeatmapStatistic
{
Name = @"Hold Note Count",
Name = @"Hold Notes",
CreateIcon = () => new BeatmapStatisticIcon(BeatmapStatisticsIconType.Sliders),
Content = holdNotes.ToString(),
Value = holdNotes,
Maximum = maximum,
},
};
}
Expand Down
15 changes: 11 additions & 4 deletions osu.Game.Rulesets.Osu/Beatmaps/OsuBeatmap.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

using System;
using System.Collections.Generic;
using System.Linq;
using osu.Game.Beatmaps;
using osu.Game.Resources.Localisation.Web;
using osu.Game.Rulesets.Osu.Objects;

namespace osu.Game.Rulesets.Osu.Beatmaps
Expand All @@ -16,25 +16,32 @@ public override IEnumerable<BeatmapStatistic> GetStatistics()
int circles = HitObjects.Count(c => c is HitCircle);
int sliders = HitObjects.Count(s => s is Slider);
int spinners = HitObjects.Count(s => s is Spinner);
int maximum = circles + sliders + spinners;

return new[]
{
new BeatmapStatistic
{
Name = BeatmapsetsStrings.ShowStatsCountCircles,
Name = "Circles",
Content = circles.ToString(),
Value = circles,
Maximum = maximum,
CreateIcon = () => new BeatmapStatisticIcon(BeatmapStatisticsIconType.Circles),
},
new BeatmapStatistic
{
Name = BeatmapsetsStrings.ShowStatsCountSliders,
Name = "Sliders",
Content = sliders.ToString(),
Value = sliders,
Maximum = maximum,
CreateIcon = () => new BeatmapStatisticIcon(BeatmapStatisticsIconType.Sliders),
},
new BeatmapStatistic
{
Name = @"Spinner Count",
Name = @"Spinners",
Content = spinners.ToString(),
Value = spinners,
Maximum = Math.Max(spinners, 10),
CreateIcon = () => new BeatmapStatisticIcon(BeatmapStatisticsIconType.Spinners),
}
};
Expand Down
14 changes: 11 additions & 3 deletions osu.Game.Rulesets.Taiko/Beatmaps/TaikoBeatmap.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

using System;
using System.Collections.Generic;
using System.Linq;
using osu.Game.Beatmaps;
Expand All @@ -15,26 +16,33 @@ public override IEnumerable<BeatmapStatistic> GetStatistics()
int hits = HitObjects.Count(s => s is Hit);
int drumRolls = HitObjects.Count(s => s is DrumRoll);
int swells = HitObjects.Count(s => s is Swell);
int maximum = hits + drumRolls + swells;

return new[]
{
new BeatmapStatistic
{
Name = @"Hit Count",
Name = @"Hits",
CreateIcon = () => new BeatmapStatisticIcon(BeatmapStatisticsIconType.Circles),
Content = hits.ToString(),
Value = hits,
Maximum = maximum,
},
new BeatmapStatistic
{
Name = @"Drumroll Count",
Name = @"Drumrolls",
CreateIcon = () => new BeatmapStatisticIcon(BeatmapStatisticsIconType.Sliders),
Content = drumRolls.ToString(),
Value = drumRolls,
Maximum = maximum,
},
new BeatmapStatistic
{
Name = @"Swell Count",
Name = @"Swells",
CreateIcon = () => new BeatmapStatisticIcon(BeatmapStatisticsIconType.Spinners),
Content = swells.ToString(),
Value = swells,
Maximum = Math.Max(swells, 10),
}
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ public abstract partial class SongSelectComponentsTestScene : OsuManualInputMana
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Padding = new MarginPadding(10),
};

private Container? resizeContainer;
Expand All @@ -33,20 +32,19 @@ private void load()
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Padding = new MarginPadding(10),
Width = relativeWidth,
Children = new Drawable[]
{
new Box
{
RelativeSizeAxes = Axes.Both,
Colour = ColourProvider.Background5,
Colour = ColourProvider.Background6,
},
Content
}
};

AddSliderStep("change relative width", 0, 1f, 1f, v =>
AddSliderStep("change relative width", 0, 1f, 0.6f, v =>
{
if (resizeContainer != null)
resizeContainer.Width = v;
Expand Down
75 changes: 11 additions & 64 deletions osu.Game.Tests/Visual/SongSelectV2/TestSceneBeatmapInfoWedge.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,22 @@
using System.Linq;
using NUnit.Framework;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.UserInterface;
using osu.Framework.Testing;
using osu.Game.Beatmaps;
using osu.Game.Rulesets;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Objects.Legacy;
using osu.Game.Screens.Select;
using osu.Game.Screens.SelectV2;

namespace osu.Game.Tests.Visual.SongSelectV2
{
public partial class TestSceneBeatmapInfoWedge : SongSelectComponentsTestScene
{
private RulesetStore rulesets = null!;
private TestBeatmapInfoWedgeV2 infoWedge = null!;
private readonly List<IBeatmap> beatmaps = new List<IBeatmap>();
private BeatmapInfoWedge infoWedge = null!;

[BackgroundDependencyLoader]
private void load(RulesetStore rulesets)
Expand All @@ -44,32 +41,23 @@ protected override void LoadComplete()

AddRange(new Drawable[]
{
// This exists only to make the wedge more visible in the test scene
new Box
{
Y = -20,
Colour = Colour4.Cornsilk.Darken(0.2f),
Height = BeatmapInfoWedgeV2.WEDGE_HEIGHT + 40,
Width = 0.65f,
RelativeSizeAxes = Axes.X,
Margin = new MarginPadding { Top = 20, Left = -10 }
},
new Container
{
RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding { Top = 20 },
Child = infoWedge = new TestBeatmapInfoWedgeV2
Children = new Drawable[]
{
Width = 0.6f,
RelativeSizeAxes = Axes.X,
infoWedge = new BeatmapInfoWedge
{
State = { Value = Visibility.Visible },
},
},
}
});

AddSliderStep("change star difficulty", 0, 11.9, 5.55, v =>
AddSliderStep("change star difficulty", 0, 11.9, 4.18, v =>
{
foreach (var hasCurrentValue in infoWedge.ChildrenOfType<IHasCurrentValue<StarDifficulty>>())
hasCurrentValue.Current.Value = new StarDifficulty(v, 0);
((BindableDouble)infoWedge.ChildrenOfType<WedgeDifficultyDisplay>().Single().DisplayedStars).Value = v;
});
}

Expand All @@ -82,16 +70,10 @@ public void TestRulesetChange()

foreach (var rulesetInfo in rulesets.AvailableRulesets)
{
var instance = rulesetInfo.CreateInstance();
var testBeatmap = createTestBeatmap(rulesetInfo);

beatmaps.Add(testBeatmap);

setRuleset(rulesetInfo);

selectBeatmap(testBeatmap);

testBeatmapLabels(instance);
}
}

Expand All @@ -106,12 +88,6 @@ public void TestWedgeVisibility()
AddAssert("check visibility", () => infoWedge.Alpha > 0);
}

private void testBeatmapLabels(Ruleset ruleset)
{
AddAssert("check title", () => infoWedge.Info!.TitleLabel.Current.Value == $"{ruleset.ShortName}Title");
AddAssert("check artist", () => infoWedge.Info!.ArtistLabel.Current.Value == $"{ruleset.ShortName}Artist");
}

[Test]
public void TestTruncation()
{
Expand All @@ -122,39 +98,16 @@ public void TestTruncation()
public void TestNullBeatmapWithBackground()
{
selectBeatmap(null);
AddAssert("check default title", () => infoWedge.Info!.TitleLabel.Current.Value == Beatmap.Default.BeatmapInfo.Metadata.Title);
AddAssert("check default artist", () => infoWedge.Info!.ArtistLabel.Current.Value == Beatmap.Default.BeatmapInfo.Metadata.Artist);
AddAssert("check no info labels", () => !infoWedge.Info.ChildrenOfType<BeatmapInfoWedge.WedgeInfoText.InfoLabel>().Any());
}

private void setRuleset(RulesetInfo rulesetInfo)
{
Container? containerBefore = null;

AddStep("set ruleset", () =>
{
// wedge content is only refreshed if the ruleset changes, so only wait for load in that case.
if (!rulesetInfo.Equals(Ruleset.Value))
containerBefore = infoWedge.DisplayedContent;

Ruleset.Value = rulesetInfo;
});

AddUntilStep("wait for async load", () => infoWedge.DisplayedContent != containerBefore);
AddStep("set ruleset", () => Ruleset.Value = rulesetInfo);
}

private void selectBeatmap(IBeatmap? b)
{
Container? containerBefore = null;

AddStep($"select {b?.Metadata.Title ?? "null"} beatmap", () =>
{
containerBefore = infoWedge.DisplayedContent;
infoWedge.Beatmap = Beatmap.Value = b == null ? Beatmap.Default : CreateWorkingBeatmap(b);
infoWedge.Show();
});

AddUntilStep("wait for async load", () => infoWedge.DisplayedContent != containerBefore);
AddStep($"select {b?.Metadata.Title ?? "null"} beatmap", () => Beatmap.Value = b == null ? Beatmap.Default : CreateWorkingBeatmap(b));
}

private IBeatmap createTestBeatmap(RulesetInfo ruleset)
Expand Down Expand Up @@ -202,12 +155,6 @@ private IBeatmap createLongMetadata()
};
}

private partial class TestBeatmapInfoWedgeV2 : BeatmapInfoWedgeV2
{
public new Container? DisplayedContent => base.DisplayedContent;
public new WedgeInfoText? Info => base.Info;
}

private class TestHitObject : ConvertHitObject;
}
}
Loading
Loading