Skip to content

Commit

Permalink
Fix GameplaySetup not filtering tabs properly
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoco007 committed Sep 25, 2024
1 parent a001d3b commit 455aff7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions BeatSaberMarkupLanguage/GameplaySetup/GameplaySetup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,14 @@ public void Initialize()

QueueRefreshView();

gameplaySetupViewController.didActivateEvent += GameplaySetupDidActivate;
gameplaySetupViewController.didDeactivateEvent += GameplaySetupDidDeactivate;
}

/// <inheritdoc />
public void Dispose()
{
gameplaySetupViewController.didActivateEvent -= GameplaySetupDidActivate;
gameplaySetupViewController.didDeactivateEvent -= GameplaySetupDidDeactivate;
}

Expand Down Expand Up @@ -200,6 +202,11 @@ private void AddTab(Assembly assembly, string name, string resource, object host
}
}

private void GameplaySetupDidActivate(bool firstActivation, bool addedToHierarchy, bool screenSystemEnabling)
{
UpdateTabsVisibility();
}

private void GameplaySetupDidDeactivate(bool removedFromHierarchy, bool screenSystemDisabling)
{
tabSelector.TextSegmentedControl.SelectCellWithNumber(0);
Expand Down

0 comments on commit 455aff7

Please sign in to comment.