mirror of
https://github.com/ppy/osu.git
synced 2025-02-22 00:43:25 +08:00
Add safety against pushing to non-current screen
This commit is contained in:
parent
c84bd2c74d
commit
fd54487186
@ -49,7 +49,11 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
|
|||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Height = 40,
|
Height = 40,
|
||||||
Text = "Select beatmap",
|
Text = "Select beatmap",
|
||||||
Action = () => matchSubScreen.Push(new MultiplayerMatchSongSelect()),
|
Action = () =>
|
||||||
|
{
|
||||||
|
if (matchSubScreen.IsCurrentScreen())
|
||||||
|
matchSubScreen.Push(new MultiplayerMatchSongSelect());
|
||||||
|
},
|
||||||
Alpha = 0
|
Alpha = 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -230,7 +230,11 @@ namespace osu.Game.Screens.OnlinePlay.Playlists
|
|||||||
settingsOverlay = new PlaylistsMatchSettingsOverlay
|
settingsOverlay = new PlaylistsMatchSettingsOverlay
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
EditPlaylist = () => this.Push(new PlaylistsSongSelect()),
|
EditPlaylist = () =>
|
||||||
|
{
|
||||||
|
if (this.IsCurrentScreen())
|
||||||
|
this.Push(new PlaylistsSongSelect());
|
||||||
|
},
|
||||||
State = { Value = roomId.Value == null ? Visibility.Visible : Visibility.Hidden }
|
State = { Value = roomId.Value == null ? Visibility.Visible : Visibility.Hidden }
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user