Пример #1
0
        private IEnumerator GetSongBrowserButtons()
        {
            if (SongBrowserTweaks.ModLoaded && !SongBrowserTweaks.IsModAvailable)
            {
                Logger.log.Error($"Unable to initialize this mod to work with SongBrowser (SongBrowser v{SongBrowserTweaks.ValidVersionRange.ToString().Replace("^", "")} or above is required)");
                yield break;
            }

            Logger.log.Info("SongBrowser mod found. Attempting to modify button behaviour.");

            int tries;

            for (tries = 10; tries > 0; --tries)
            {
                if (SongBrowserTweaks.Init())
                {
                    break;
                }

                yield return(new WaitForSeconds(0.5f));
            }

            if (tries <= 0)
            {
                Logger.log.Warn("SongBrowser buttons could not be found. Creating default buttons panel");
                InitializeAdditionalScreens();
            }
        }
Пример #2
0
        private IEnumerator GetSongBrowserButtons()
        {
            Logger.log.Info("SongBrowser mod found. Attempting to modify button behaviour.");

            int tries;

            for (tries = 10; tries > 0; --tries)
            {
                if (SongBrowserTweaks.Init())
                {
                    break;
                }

                yield return(new WaitForSeconds(0.5f));
            }

            if (tries <= 0)
            {
                Logger.log.Warn("SongBrowser buttons could not be found. Creating default buttons panel");
                InitializeButtonPanel();
            }
        }
        IEnumerator GetSongBrowserButtons()
        {
            Logger.log.Info("SongBrowser mod found. Attempting to modify button behaviour.");

            int tries;

            for (tries = 10; tries > 0; --tries)
            {
                if (SongBrowserTweaks.Init())
                {
                    break;
                }

                yield return(new WaitForSeconds(0.5f));
            }

            if (tries <= 0)
            {
                Logger.log.Warn("SongBrowser buttons were not found. Creating new buttons, which may overlap with other UI elements.");
                CreateSearchButton(DefaultSearchButtonPosition, DefaultButtonSize);
                CreateFilterButton(DefaultFilterButtonPosition, DefaultButtonSize);
                CreateClearButton(DefaultClearButtonPosition, DefaultButtonSize);
            }
        }