mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Simplify the way multiple subscreens handle their disable states via a custom stack
This commit is contained in:
@ -32,6 +32,8 @@ namespace osu.Game.Screens.Multi
|
||||
{
|
||||
public override bool CursorVisible => (screenStack.CurrentScreen as IMultiplayerSubScreen)?.CursorVisible ?? true;
|
||||
|
||||
// this is required due to PlayerLoader eventually being pushed to the main stack
|
||||
// while leases may be taken out by a subscreen.
|
||||
public override bool DisallowExternalBeatmapRulesetChanges => true;
|
||||
|
||||
private readonly MultiplayerWaveContainer waves;
|
||||
@ -96,7 +98,7 @@ namespace osu.Game.Screens.Multi
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Padding = new MarginPadding { Top = Header.HEIGHT },
|
||||
Child = screenStack = new OsuScreenStack { RelativeSizeAxes = Axes.Both }
|
||||
Child = screenStack = new MultiplayerSubScreenStack { RelativeSizeAxes = Axes.Both }
|
||||
},
|
||||
new Header(screenStack),
|
||||
createButton = new HeaderButton
|
||||
@ -277,11 +279,7 @@ namespace osu.Game.Screens.Multi
|
||||
|
||||
private void updateTrack(ValueChangedEvent<WorkingBeatmap> _ = null)
|
||||
{
|
||||
bool isMatch = screenStack.CurrentScreen is MatchSubScreen;
|
||||
|
||||
Beatmap.Disabled = isMatch;
|
||||
|
||||
if (isMatch)
|
||||
if (screenStack.CurrentScreen is MatchSubScreen)
|
||||
{
|
||||
var track = Beatmap.Value?.Track;
|
||||
|
||||
|
Reference in New Issue
Block a user