mirror of
https://github.com/ppy/osu.git
synced 2025-01-18 14:03:07 +08:00
Disable ability to toggle "featured artists" beatmap listing filter in iOS
This commit is contained in:
parent
c24f690019
commit
589e187a80
@ -220,6 +220,12 @@ namespace osu.Game
|
||||
|
||||
private readonly List<OverlayContainer> visibleBlockingOverlays = new List<OverlayContainer>();
|
||||
|
||||
/// <summary>
|
||||
/// Whether the game should be limited from providing access to download non-featured-artist beatmaps.
|
||||
/// This only affects the "featured artists" filter in the beatmap listing overlay.
|
||||
/// </summary>
|
||||
public bool LimitedToFeaturedArtists => RuntimeInfo.OS == RuntimeInfo.Platform.iOS && true;
|
||||
|
||||
public OsuGame(string[] args = null)
|
||||
{
|
||||
this.args = args;
|
||||
|
@ -125,6 +125,9 @@ namespace osu.Game.Overlays.BeatmapListing
|
||||
[Resolved]
|
||||
private OsuColour colours { get; set; } = null!;
|
||||
|
||||
[Resolved]
|
||||
private OsuGame game { get; set; } = null!;
|
||||
|
||||
[Resolved]
|
||||
private OsuConfigManager config { get; set; } = null!;
|
||||
|
||||
@ -144,6 +147,12 @@ namespace osu.Game.Overlays.BeatmapListing
|
||||
// no need to show the disclaimer if the user already had it toggled off in config.
|
||||
if (!Active.Value)
|
||||
disclaimerShown.Value = true;
|
||||
|
||||
if (game.LimitedToFeaturedArtists)
|
||||
{
|
||||
Enabled.Value = false;
|
||||
Active.Disabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected override Color4 ColourNormal => colours.Orange1;
|
||||
@ -151,6 +160,9 @@ namespace osu.Game.Overlays.BeatmapListing
|
||||
|
||||
protected override bool OnClick(ClickEvent e)
|
||||
{
|
||||
if (!Enabled.Value)
|
||||
return true;
|
||||
|
||||
if (!disclaimerShown.Value && dialogOverlay != null)
|
||||
{
|
||||
dialogOverlay.Push(new FeaturedArtistConfirmDialog(() =>
|
||||
|
Loading…
Reference in New Issue
Block a user