public static void RegisterConfigGui(Plugin plugin, InfoOutputterWrapper wrapper)
        {
            Log.Output("Found ConfigGUI plugin, loaded and register OLSP custom config windows");
            ConfigGuiPlugin gui = plugin as ConfigGuiPlugin;

            gui.ItemFactory.RegisterItemCreator <ConfigEditorAttribute>(new OpenEditorGuiCreator(wrapper));
        }
Example #2
0
        private void SetupPlugin(SyncHost host)
        {
            //init PPShow
            PPShowPluginInstance = new InfoOutputterWrapper(PPShowJsonConfigFilePath);

            source = UsingSource.None;

            try
            {
                switch (BeatmapSourcePlugin.ToString().ToLower().Trim())
                {
                case "ortdp":
                    TryRegisterSourceFromOsuRTDataProvider(host);
                    break;

                case "dpmp":
                    TryRegisterSourceFromDifficultParamModifyPlugin(host);
                    break;

                default:
                    break;
                }

                Log.Output($"Source:{BeatmapSourcePlugin} Loaded:{SourceWrapper.GetType().Name}");
            }
            catch (Exception e)
            {
                Log.Error($"{LOAD_PLUGIN_DEPENDENCY_FAILED}:{e.Message}");
                source = UsingSource.None;
            }

            if (source == UsingSource.None)
            {
                Log.Error(INIT_PLUGIN_FAILED_CAUSE_NO_DEPENDENCY);
            }
            else
            {
                Log.Output(INIT_SUCCESS);
            }

            CleanOutput();
        }
 public OpenEditorGuiCreator(InfoOutputterWrapper wrapper)
 {
     m_wrapper = wrapper;
 }