private static void CreateSongRequestFilterButton()
        {
            if (filterSongRequestsButton != null)
            {
                filterSongRequestsButton.SetActive(true);
                return;
            }

            GameObject filterMainButton = GameObject.Find("menu/ShellPage_Song/page/ShellPanel_Left/FilterExtras");

            if (filterMainButton == null)
            {
                return;
            }

            filterSongRequestsButton = CreateButton(filterMainButton, "Song Requests", OnFilterSongRequestsShot,
                                                    filterSongRequestsButtonPos, filterSongRequestsButtonScale);

            requestButtonSelectedIndicator = filterSongRequestsButton.transform.GetChild(3).gameObject;
            requestButtonSelectedIndicator.SetActive(requestFilterActive);

            filterMainButton.GetComponentInChildren <GunButton>().onHitEvent.AddListener(new System.Action(() =>
            {
                DisableFilter();
                songSelect.ShowSongList();
            }));

            UpdateButtonText();
        }
 public static void UpdateFilter()
 {
     if ((SongRequests.hasCompatibleSongBrowser && IsSongBrowserFilterActive()) || requestFilterActive)
     {
         songSelect?.ShowSongList();
     }
 }
示例#3
0
        private static void OnFilterHit(string filterId)
        {
            songListControls.FilterExtras(); // this seems to fix duplicated songs
            Filter filter = filters[filterId];

            if (!filter.IsActive)
            {
                filter.IsActive    = true;
                filterStateChanged = true;
                filter.ButtonSelectedIndicator.SetActive(true);
                filter.OnHit();

                DisableCustomFilters(filterId);
            }
            else
            {
                DisableCustomFilters();
            }
            songSelect.ShowSongList();
        }
示例#4
0
        internal static void Initialize()
        {
            if (songListControls == null)
            {
                songSelect       = GameObject.FindObjectOfType <SongSelect>();
                songListControls = GameObject.FindObjectOfType <SongListControls>();
                GetReferences();

                foreach (string filterKey in filters.Keys)
                {
                    PrepareFilterButton(filters[filterKey]);
                }

                SetFilterUIGeometry();

                extrasButton.GetComponentInChildren <GunButton>().onHitEvent.AddListener(new Action(() =>
                {
                    DisableCustomFilters();
                    songSelect.ShowSongList();
                }));
            }
        }
示例#5
0
        public static void ReloadSongList()
        {
            needRefresh                     = false;
            SongList.sFirstTime             = true;
            SongList.OnSongListLoaded.mDone = false;
            SongList.SongSourceDirs         = new Il2CppSystem.Collections.Generic.List <SongList.SongSourceDir>();
            SongList.AddSongSearchDir(Application.dataPath, downloadsDirectory);
            SongList.I.StartAssembleSongList();
            SongSelect songSelect = GameObject.FindObjectOfType <SongSelect>();

            if (songSelect != null)
            {
                SongList.OnSongListLoaded.On(new Action(() => { songSelect.ShowSongList(); }));
            }

            if (songDataLoaderInstalled)
            {
                SongList.OnSongListLoaded.On(new Action(() => { SafeDataLoaderReload(); }));
            }

            DebugText("Reloading Songs");
        }