Esempio n. 1
0
        ////////////////////////////////////////////////////////////////////////////
        ////////////////////////////////////////////////////////////////////////////

        /// <summary>
        /// When the mod button is pressed
        /// </summary>
        private void OnModButtonPressed()
        {
            if (m_UIFlowCoordinator == null)
            {
                m_UIFlowCoordinator = BeatSaberMarkupLanguage.BeatSaberUI.CreateFlowCoordinator <UI.ViewFlowCoordinator>();
            }

            BeatSaberUI.MainFlowCoordinator.PresentFlowCoordinator(m_UIFlowCoordinator as HMUI.FlowCoordinator);
        }
Esempio n. 2
0
        /// <summary>
        /// When the menu scene is loaded
        /// </summary>
        private void OnMenuSceneLoaded()
        {
            if (m_UIFlowCoordinator == null)
            {
                m_UIFlowCoordinator = BeatSaberMarkupLanguage.BeatSaberUI.CreateFlowCoordinator <UI.ViewFlowCoordinator>();
            }

            foreach (var l_Plugin in Plugins)
            {
                if (l_Plugin.IsEnabled && l_Plugin.ActivationType == BeatSaberPlus.Plugins.PluginBase.EActivationType.OnMenuSceneLoaded)
                {
                    try {
                        l_Plugin.Enable();
                    } catch (System.Exception p_InitException) { Logger.Instance.Error("Error on plugin init " + l_Plugin.Name); Logger.Instance.Error(p_InitException); }
                }
            }
        }