示例#1
0
        public void OnSelect(ModListController cntrl)
        {
            Logger.log.Debug($"Selected IPAModCell {Plugin.Name} {Plugin.Version}");

            if (infoView == null)
            {
                PluginLoader.PluginMetadata updateInfo = null;

                try
                {
                    updateInfo = new PluginLoader.PluginMetadata
                    {
                        Name    = Plugin.Name,
                        Id      = Plugin.Name,
                        Version = new SemVer.Version(Plugin.Version)
                    };
                }
                catch (Exception e)
                {
                    Logger.log.Warn($"Could not generate fake update info for {Plugin.Name}");
                    Logger.log.Warn(e);
                }

                infoView = BeatSaberUI.CreateViewController <ModInfoViewController>();
                infoView.Init(icon, Plugin.Name, "v" + Plugin.Version.ToString(), "<color=#BFBFBF><i>Unknown Author</i>",
                              "This mod was written for IPA.\n===\n\n## No metadata is avaliable for this mod.\n\n" +
                              "Please contact the mod author and ask them to port it to BSIPA to provide more information.", updateInfo);
            }

            list.flow.SetSelected(infoView, immediate: list.flow.HasSelected);
        }
        public void OnSelect(ModListController cntrl)
        {
            Logger.log.Debug($"Selected IPAModCell {Plugin.Name} {Plugin.Version}");

            if (infoView == null)
            {
                infoView = BeatSaberUI.CreateViewController <ModInfoViewController>();
                infoView.Init(icon, Plugin.Name, "v" + Plugin.Version.ToString(), "<color=#BFBFBF><i>Unknown Author</i>",
                              "<color=#A0A0A0>This mod was written for IPA Reloaded. No metadata is avaliable for this mod. " +
                              "Please contact the mod author and ask them to port it to BSIPA to provide more information.", null);
            }

            list.flow.SetSelected(infoView, immediate: list.flow.HasSelected);
        }
示例#3
0
        public void OnSelect(ModListController cntrl)
        {
            Logger.log.Debug($"Selected BSIPAIgnoredModCell {Plugin.Name} {Plugin.Version}");

            if (infoView == null)
            {
                var desc = Plugin.Manifest.Description;
                if (string.IsNullOrWhiteSpace(desc))
                {
                    desc = "<color=#BFBFBF><i>No description</i>";
                }

                infoView = BeatSaberUI.CreateViewController <ModInfoViewController>();
                infoView.Init(icon, Plugin.Name, "v" + Plugin.Version.ToString(), authorText,
                              desc, Plugin, Plugin.Manifest.Links);
            }

            list.flow.SetSelected(infoView, immediate: list.flow.HasSelected);
        }
        public void OnSelect(ModListController cntrl)
        {
            Logger.log.Debug($"Selected BSIPAModCell {Plugin.Metadata.Name} {Plugin.Metadata.Version}");

            if (infoView == null)
            {
                var desc = Plugin.Metadata.Manifest.Description;
                if (string.IsNullOrWhiteSpace(desc))
                {
                    desc = "<color=#BFBFBF><i>No description</i>";
                }

                infoView = BeatSaberUI.CreateViewController <ModInfoViewController>();
                infoView.Init(icon, Plugin.Metadata.Name, "v" + Plugin.Metadata.Version.ToString(), subtext,
                              desc, Plugin.Metadata.Features.FirstOrDefault(f => f is NoUpdateFeature) != null ? Plugin.Metadata : null,
                              Plugin.Metadata.Manifest.Links);
            }

            list.flow.SetSelected(infoView, immediate: list.flow.HasSelected);
        }