1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 20:32:55 +08:00

Fix mod selects not hiding when their owner screens exit

This commit is contained in:
Bartłomiej Dach 2022-05-05 17:27:21 +02:00
parent fdb21fedab
commit 0caea77176
No known key found for this signature in database
GPG Key ID: BCECCD4FA41F6497
3 changed files with 11 additions and 2 deletions

View File

@ -309,7 +309,7 @@ namespace osu.Game.Screens.OnlinePlay.Match
public override void OnSuspending(ScreenTransitionEvent e) public override void OnSuspending(ScreenTransitionEvent e)
{ {
endHandlingTrack(); onLeaving();
base.OnSuspending(e); base.OnSuspending(e);
} }
@ -327,7 +327,7 @@ namespace osu.Game.Screens.OnlinePlay.Match
RoomManager?.PartRoom(); RoomManager?.PartRoom();
Mods.Value = Array.Empty<Mod>(); Mods.Value = Array.Empty<Mod>();
endHandlingTrack(); onLeaving();
return base.OnExiting(e); return base.OnExiting(e);
} }
@ -423,6 +423,12 @@ namespace osu.Game.Screens.OnlinePlay.Match
Beatmap.BindValueChanged(applyLoopingToTrack, true); Beatmap.BindValueChanged(applyLoopingToTrack, true);
} }
private void onLeaving()
{
userModsSelectOverlay.Hide();
endHandlingTrack();
}
private void endHandlingTrack() private void endHandlingTrack()
{ {
Beatmap.ValueChanged -= applyLoopingToTrack; Beatmap.ValueChanged -= applyLoopingToTrack;

View File

@ -155,6 +155,8 @@ namespace osu.Game.Screens.OnlinePlay
Mods.Value = initialMods; Mods.Value = initialMods;
} }
freeModSelectOverlay.Hide();
return base.OnExiting(e); return base.OnExiting(e);
} }

View File

@ -659,6 +659,7 @@ namespace osu.Game.Screens.Select
return true; return true;
beatmapInfoWedge.Hide(); beatmapInfoWedge.Hide();
ModSelect.Hide();
this.FadeOut(100); this.FadeOut(100);