mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 19:42:55 +08:00
Merge pull request #5576 from Joehuu/update-direct-categories-sorting
Update osu!direct categories sorting with web changes
This commit is contained in:
commit
be02019f5f
@ -27,24 +27,25 @@ namespace osu.Game.Online.API.Requests
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ReSharper disable once ImpureMethodCallOnReadonlyValueField
|
// ReSharper disable once ImpureMethodCallOnReadonlyValueField
|
||||||
protected override string Target => $@"beatmapsets/search?q={query}&m={ruleset.ID ?? 0}&s={(int)searchCategory}&sort={sortCriteria.ToString().ToLowerInvariant()}_{directionString}";
|
protected override string Target => $@"beatmapsets/search?q={query}&m={ruleset.ID ?? 0}&s={searchCategory.ToString().ToLowerInvariant()}&sort={sortCriteria.ToString().ToLowerInvariant()}_{directionString}";
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum BeatmapSearchCategory
|
public enum BeatmapSearchCategory
|
||||||
{
|
{
|
||||||
Any = 7,
|
Any,
|
||||||
|
|
||||||
[Description("Ranked & Approved")]
|
[Description("Has Leaderboard")]
|
||||||
RankedApproved = 0,
|
Leaderboard,
|
||||||
Qualified = 3,
|
Ranked,
|
||||||
Loved = 8,
|
Qualified,
|
||||||
Favourites = 2,
|
Loved,
|
||||||
|
Favourites,
|
||||||
|
|
||||||
[Description("Pending & WIP")]
|
[Description("Pending & WIP")]
|
||||||
PendingWIP = 4,
|
Pending,
|
||||||
Graveyard = 5,
|
Graveyard,
|
||||||
|
|
||||||
[Description("My Maps")]
|
[Description("My Maps")]
|
||||||
MyMaps = 6,
|
Mine,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,7 @@ namespace osu.Game.Overlays.Direct
|
|||||||
|
|
||||||
protected override Color4 BackgroundColour => OsuColour.FromHex(@"384552");
|
protected override Color4 BackgroundColour => OsuColour.FromHex(@"384552");
|
||||||
protected override DirectSortCriteria DefaultTab => DirectSortCriteria.Ranked;
|
protected override DirectSortCriteria DefaultTab => DirectSortCriteria.Ranked;
|
||||||
|
protected override BeatmapSearchCategory DefaultCategory => BeatmapSearchCategory.Leaderboard;
|
||||||
|
|
||||||
protected override Drawable CreateSupplementaryControls() => rulesetSelector = new DirectRulesetSelector();
|
protected override Drawable CreateSupplementaryControls() => rulesetSelector = new DirectRulesetSelector();
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@ namespace osu.Game.Overlays.SearchableList
|
|||||||
|
|
||||||
protected abstract Color4 BackgroundColour { get; }
|
protected abstract Color4 BackgroundColour { get; }
|
||||||
protected abstract T DefaultTab { get; }
|
protected abstract T DefaultTab { get; }
|
||||||
|
protected abstract U DefaultCategory { get; }
|
||||||
protected virtual Drawable CreateSupplementaryControls() => null;
|
protected virtual Drawable CreateSupplementaryControls() => null;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -109,6 +110,9 @@ namespace osu.Game.Overlays.SearchableList
|
|||||||
|
|
||||||
Tabs.Current.Value = DefaultTab;
|
Tabs.Current.Value = DefaultTab;
|
||||||
Tabs.Current.TriggerChange();
|
Tabs.Current.TriggerChange();
|
||||||
|
|
||||||
|
DisplayStyleControl.Dropdown.Current.Value = DefaultCategory;
|
||||||
|
DisplayStyleControl.Dropdown.Current.TriggerChange();
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
|
@ -12,6 +12,7 @@ namespace osu.Game.Overlays.Social
|
|||||||
{
|
{
|
||||||
protected override Color4 BackgroundColour => OsuColour.FromHex(@"47253a");
|
protected override Color4 BackgroundColour => OsuColour.FromHex(@"47253a");
|
||||||
protected override SocialSortCriteria DefaultTab => SocialSortCriteria.Rank;
|
protected override SocialSortCriteria DefaultTab => SocialSortCriteria.Rank;
|
||||||
|
protected override SortDirection DefaultCategory => SortDirection.Ascending;
|
||||||
|
|
||||||
public FilterControl()
|
public FilterControl()
|
||||||
{
|
{
|
||||||
|
@ -14,6 +14,7 @@ namespace osu.Game.Screens.Multi.Lounge.Components
|
|||||||
{
|
{
|
||||||
protected override Color4 BackgroundColour => OsuColour.FromHex(@"362e42");
|
protected override Color4 BackgroundColour => OsuColour.FromHex(@"362e42");
|
||||||
protected override PrimaryFilter DefaultTab => PrimaryFilter.Open;
|
protected override PrimaryFilter DefaultTab => PrimaryFilter.Open;
|
||||||
|
protected override SecondaryFilter DefaultCategory => SecondaryFilter.Public;
|
||||||
|
|
||||||
protected override float ContentHorizontalPadding => base.ContentHorizontalPadding + OsuScreen.HORIZONTAL_OVERFLOW_PADDING;
|
protected override float ContentHorizontalPadding => base.ContentHorizontalPadding + OsuScreen.HORIZONTAL_OVERFLOW_PADDING;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user