2023-06-23 00:37:25 +08:00
|
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
2020-02-06 13:22:01 +08:00
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
|
|
2023-06-23 23:59:36 +08:00
|
|
|
|
using System.Diagnostics;
|
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 partial class OnlinePlaySubScreenStack : OsuScreenStack
|
2020-02-06 13:22:01 +08:00
|
|
|
|
{
|
2023-06-23 23:59:36 +08:00
|
|
|
|
protected override void ScreenChanged(IScreen prev, IScreen? next)
|
2020-02-06 13:22:01 +08:00
|
|
|
|
{
|
|
|
|
|
base.ScreenChanged(prev, next);
|
|
|
|
|
|
|
|
|
|
// because this is a screen stack within a screen stack, let's manually handle disabled changes to simplify things.
|
2023-06-23 23:59:36 +08:00
|
|
|
|
var osuScreen = next as OsuScreen;
|
|
|
|
|
|
|
|
|
|
Debug.Assert(osuScreen != null);
|
2020-02-06 13:22:01 +08:00
|
|
|
|
|
|
|
|
|
bool disallowChanges = osuScreen.DisallowExternalBeatmapRulesetChanges;
|
|
|
|
|
|
|
|
|
|
osuScreen.Beatmap.Disabled = disallowChanges;
|
|
|
|
|
osuScreen.Ruleset.Disabled = disallowChanges;
|
|
|
|
|
osuScreen.Mods.Disabled = disallowChanges;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|