mirror of
https://github.com/ppy/osu.git
synced 2025-01-18 16:52:54 +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>();
|
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)
|
public OsuGame(string[] args = null)
|
||||||
{
|
{
|
||||||
this.args = args;
|
this.args = args;
|
||||||
|
@ -125,6 +125,9 @@ namespace osu.Game.Overlays.BeatmapListing
|
|||||||
[Resolved]
|
[Resolved]
|
||||||
private OsuColour colours { get; set; } = null!;
|
private OsuColour colours { get; set; } = null!;
|
||||||
|
|
||||||
|
[Resolved]
|
||||||
|
private OsuGame game { get; set; } = null!;
|
||||||
|
|
||||||
[Resolved]
|
[Resolved]
|
||||||
private OsuConfigManager config { get; set; } = null!;
|
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.
|
// no need to show the disclaimer if the user already had it toggled off in config.
|
||||||
if (!Active.Value)
|
if (!Active.Value)
|
||||||
disclaimerShown.Value = true;
|
disclaimerShown.Value = true;
|
||||||
|
|
||||||
|
if (game.LimitedToFeaturedArtists)
|
||||||
|
{
|
||||||
|
Enabled.Value = false;
|
||||||
|
Active.Disabled = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override Color4 ColourNormal => colours.Orange1;
|
protected override Color4 ColourNormal => colours.Orange1;
|
||||||
@ -151,6 +160,9 @@ namespace osu.Game.Overlays.BeatmapListing
|
|||||||
|
|
||||||
protected override bool OnClick(ClickEvent e)
|
protected override bool OnClick(ClickEvent e)
|
||||||
{
|
{
|
||||||
|
if (!Enabled.Value)
|
||||||
|
return true;
|
||||||
|
|
||||||
if (!disclaimerShown.Value && dialogOverlay != null)
|
if (!disclaimerShown.Value && dialogOverlay != null)
|
||||||
{
|
{
|
||||||
dialogOverlay.Push(new FeaturedArtistConfirmDialog(() =>
|
dialogOverlay.Push(new FeaturedArtistConfirmDialog(() =>
|
||||||
|
Loading…
Reference in New Issue
Block a user