Пример #1
0
        /// <summary>
        /// This is the code used to create a submenu in Beat Saber's Settings menu.
        /// </summary>
        public static void CreateSettingsUI()
        {
            ////This will create a menu tab in the settings menu for your plugin
            var pluginSettingsSubmenu = SettingsUI.CreateSubMenu("BeatSync");

            CreateBeatSyncSettingsUI(pluginSettingsSubmenu);
            var sourceSettings = pluginSettingsSubmenu.AddSubMenu("Source Settings", "Settings to configure song sources.", true);

            CreateSourceSettingsUI(sourceSettings);
        }
Пример #2
0
        public void Init(IPALogger logger)//, [Config.Prefer("json")] Config conf)
        {
            log = logger;
            log?.Debug("Logger initialized.");
            //config = conf.Generated<BeatSyncConfig>();
            var readerLogger = new Logging.BeatSyncFeedReaderLogger(SongFeedReaders.Logging.LoggingController.DefaultLogController);

            SongFeedReaders.Logging.LoggingController.DefaultLogger = readerLogger;
            BeatSyncLib.Logger.log = new BeatSyncLogger(logger);
            ConfigManager          = new ConfigManager();
            ConfigInitialized      = ConfigManager.InitializeConfig();
            if (ConfigInitialized)
            {
                modConfig  = ConfigManager.Config;
                config     = ConfigManager.Config.BeatSyncConfig;
                SettingsUI = new UI.SettingsUI(modConfig);
            }
        }