public void OnDisabled() { Harmony?.UnpatchAll(); Harmony = null; _host = null; GameplaySetup.instance.RemoveTab("SongInfoViewer"); }
public void OnEnabled() { Harmony = new Harmony("dev.auros.songinfoviewer"); Harmony.PatchAll(Assembly.GetExecutingAssembly()); BSEvents.lateMenuSceneLoadedFresh += OnLateMenuSceneLoadedFresh; _host = new SIVHost(); GameplaySetup.instance.AddTab("SongInfoViewer", "SongInfoViewer.song-info-view.bsml", _host); }
public void OnDisabled() { Harmony?.UnpatchAll(); Harmony = null; BSEvents.lateMenuSceneLoadedFresh -= OnLateMenuSceneLoadedFresh; _host = null; GameplaySetup.instance.RemoveTab("SongInfoViewer"); }
public void OnEnabled() { Harmony = new Harmony("dev.auros.songinfoviewer"); Harmony.PatchAll(Assembly.GetExecutingAssembly()); BSEvents.lateMenuSceneLoadedFresh += delegate(ScenesTransitionSetupDataSO so) { var siv = new GameObject("Song Info Viewer").AddComponent <SongInfoViewer>(); siv.SetHost(_host); }; _host = new SIVHost(); GameplaySetup.instance.AddTab("SongInfoViewer", "SongInfoViewer.song-info-view.bsml", _host); }
public void SetHost(SIVHost host) => _host = host;