2020-02-06 13:22:01 +08:00
|
|
|
// 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.
|
|
|
|
|
2022-06-17 15:37:17 +08:00
|
|
|
#nullable disable
|
|
|
|
|
2020-02-06 13:22:01 +08:00
|
|
|
using osu.Framework.Screens;
|
|
|
|
|
2020-12-25 23:50:00 +08:00
|
|
|
namespace osu.Game.Screens.OnlinePlay
|
2020-02-06 13:22:01 +08:00
|
|
|
{
|
2020-12-26 00:00:31 +08:00
|
|
|
public class OnlinePlaySubScreenStack : OsuScreenStack
|
2020-02-06 13:22:01 +08:00
|
|
|
{
|
|
|
|
protected override void ScreenChanged(IScreen prev, IScreen next)
|
|
|
|
{
|
|
|
|
base.ScreenChanged(prev, next);
|
|
|
|
|
|
|
|
// because this is a screen stack within a screen stack, let's manually handle disabled changes to simplify things.
|
|
|
|
var osuScreen = ((OsuScreen)next);
|
|
|
|
|
|
|
|
bool disallowChanges = osuScreen.DisallowExternalBeatmapRulesetChanges;
|
|
|
|
|
|
|
|
osuScreen.Beatmap.Disabled = disallowChanges;
|
|
|
|
osuScreen.Ruleset.Disabled = disallowChanges;
|
|
|
|
osuScreen.Mods.Disabled = disallowChanges;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|