Skip to content

Commit

Permalink
Ensure local mods are constructed in time for Pop{In,Out}()
Browse files Browse the repository at this point in the history
  • Loading branch information
bdach committed May 11, 2022
1 parent 9353916 commit 981ead6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions osu.Game/Overlays/Mods/ModSelectOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,11 @@ private void load(OsuGameBase game, OsuColour colours)

protected override void LoadComplete()
{
base.LoadComplete();

// this is called before base call so that the mod state is populated early, and the transition in `PopIn()` can play out properly.
availableMods.BindValueChanged(_ => createLocalMods(), true);

base.LoadComplete();

State.BindValueChanged(_ => samplePlaybackDisabled.Value = State.Value == Visibility.Hidden, true);

// This is an optimisation to prevent refreshing the available settings controls when it can be
Expand Down

0 comments on commit 981ead6

Please sign in to comment.