mirror of
https://github.com/ppy/osu.git
synced 2026-05-21 05:01:20 +08:00
Tidy up GroupMode enum
This commit is contained in:
@@ -130,7 +130,7 @@ namespace osu.Game.Tests.Visual.SongSelectV2
|
||||
SelectedMods.SetDefault();
|
||||
|
||||
Config.SetValue(OsuSetting.SongSelectSortingMode, SortMode.Title);
|
||||
Config.SetValue(OsuSetting.SongSelectGroupingMode, GroupMode.All);
|
||||
Config.SetValue(OsuSetting.SongSelectGroupingMode, GroupMode.NoGrouping);
|
||||
|
||||
SongSelect = null!;
|
||||
});
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace osu.Game.Tests.Visual.SongSelectV2
|
||||
[Explicit]
|
||||
public void TestSorting()
|
||||
{
|
||||
SortAndGroupBy(SortMode.Artist, GroupMode.All);
|
||||
SortAndGroupBy(SortMode.Artist, GroupMode.NoGrouping);
|
||||
SortAndGroupBy(SortMode.Difficulty, GroupMode.Difficulty);
|
||||
SortAndGroupBy(SortMode.Artist, GroupMode.Artist);
|
||||
}
|
||||
|
||||
@@ -243,7 +243,7 @@ namespace osu.Game.Tests.Visual.SongSelectV2
|
||||
AddBeatmaps(2, 3);
|
||||
WaitForDrawablePanels();
|
||||
|
||||
SortAndGroupBy(SortMode.Difficulty, GroupMode.All);
|
||||
SortAndGroupBy(SortMode.Difficulty, GroupMode.NoGrouping);
|
||||
WaitForFiltering();
|
||||
|
||||
AddUntilStep("standalone panels displayed", () => GetVisiblePanels<PanelBeatmapStandalone>().Any());
|
||||
|
||||
@@ -30,8 +30,8 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
Position = new Vector2(275, 5)
|
||||
});
|
||||
|
||||
filter.PinItem(GroupMode.All);
|
||||
filter.PinItem(GroupMode.RecentlyPlayed);
|
||||
filter.PinItem(GroupMode.NoGrouping);
|
||||
filter.PinItem(GroupMode.LastPlayed);
|
||||
|
||||
filter.Current.ValueChanged += grouping =>
|
||||
{
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace osu.Game.Configuration
|
||||
SetDefault(OsuSetting.DisplayStarsMinimum, 0.0, 0, 10, 0.1);
|
||||
SetDefault(OsuSetting.DisplayStarsMaximum, 10.1, 0, 10.1, 0.1);
|
||||
|
||||
SetDefault(OsuSetting.SongSelectGroupingMode, GroupMode.All);
|
||||
SetDefault(OsuSetting.SongSelectGroupingMode, GroupMode.NoGrouping);
|
||||
SetDefault(OsuSetting.SongSelectSortingMode, SortMode.Title);
|
||||
|
||||
SetDefault(OsuSetting.RandomSelectAlgorithm, RandomSelectAlgorithm.RandomPermutation);
|
||||
@@ -263,6 +263,10 @@ namespace osu.Game.Configuration
|
||||
if (RuntimeInfo.IsMobile)
|
||||
GetBindable<float>(OsuSetting.UIScale).SetDefault();
|
||||
}
|
||||
|
||||
if (combined < 20250518)
|
||||
// GroupMode.All, the previous default grouping mode, is made obsolete and to be removed in favour of GroupMode.NoGrouping.
|
||||
GetBindable<GroupMode>(OsuSetting.SongSelectGroupingMode).SetDefault();
|
||||
}
|
||||
|
||||
public override TrackedSettings CreateTrackedSettings()
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace osu.Game.Screens.Select.Filter
|
||||
{
|
||||
public enum GroupMode
|
||||
{
|
||||
[Description("All")]
|
||||
All,
|
||||
[Description("No Grouping")]
|
||||
NoGrouping,
|
||||
|
||||
[Description("Artist")]
|
||||
Artist,
|
||||
@@ -37,19 +38,19 @@ namespace osu.Game.Screens.Select.Filter
|
||||
[Description("My Maps")]
|
||||
MyMaps,
|
||||
|
||||
[Description("No Grouping")]
|
||||
NoGrouping,
|
||||
|
||||
[Description("Rank Achieved")]
|
||||
RankAchieved,
|
||||
|
||||
[Description("Ranked Status")]
|
||||
RankedStatus,
|
||||
|
||||
[Description("Recently Played")]
|
||||
RecentlyPlayed,
|
||||
[Description("Last Played")]
|
||||
LastPlayed,
|
||||
|
||||
[Description("Title")]
|
||||
Title
|
||||
Title,
|
||||
|
||||
[Obsolete($"Use {nameof(NoGrouping)} instead.")] // todo: remove in 20251018
|
||||
All,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -162,7 +162,9 @@ namespace osu.Game.Screens.SelectV2
|
||||
groupDropdown = new ShearedDropdown<GroupMode>("Group by")
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Items = Enum.GetValues<GroupMode>(),
|
||||
#pragma warning disable CS0618 // Type or member is obsolete
|
||||
Items = Enum.GetValues<GroupMode>().Where(m => m != GroupMode.All),
|
||||
#pragma warning restore CS0618 // Type or member is obsolete
|
||||
},
|
||||
Empty(),
|
||||
collectionDropdown = new CollectionDropdown
|
||||
|
||||
Reference in New Issue
Block a user