Exemplo n.º 1
0
        private void InitializeAdditionalScreens(bool forceReinit = false)
        {
            if (!PluginConfig.DisableSearch || !PluginConfig.DisableFilters)
            {
                Logger.log.Debug("Creating button panel");
                ButtonPanel.instance.Setup(forceReinit);
            }
            else
            {
                Logger.log.Debug("Disabling button panel");
                if (ButtonPanel.IsSingletonAvailable)
                {
                    ButtonPanel.instance.DisablePanel();
                }
            }

            ButtonPanel.instance.SearchButtonPressed      -= SearchButtonPressed;
            ButtonPanel.instance.FilterButtonPressed      -= FilterButtonPressed;
            ButtonPanel.instance.ClearFilterButtonPressed -= ClearButtonPressed;

            ButtonPanel.instance.SearchButtonPressed      += SearchButtonPressed;
            ButtonPanel.instance.FilterButtonPressed      += FilterButtonPressed;
            ButtonPanel.instance.ClearFilterButtonPressed += ClearButtonPressed;

            _bottomScreen = new BottomScreen();
            _bottomScreen.SortButtonPressed        += SortButtonPressed;
            _bottomScreen.QuickFilterApplied       += ApplyQuickFilterPressed;
            _bottomScreen.ReportIssueButtonPressed += ReportButtonPressed;

            _uiAdditions = LevelSelectionNavigationController.gameObject.AddComponent <SongListUIAdditions>();
            _uiAdditions.ConfirmDeleteButtonPressed += ConfirmDeleteButtonPressed;

            LevelSelectionNavigationController.didActivateEvent += delegate(bool firstActivation, ViewController.ActivationType activationType)
            {
                if (ButtonPanel.IsSingletonAvailable)
                {
                    ButtonPanel.instance.ShowPanel();
                }
                _bottomScreen.ShowScreen();
            };
            LevelSelectionNavigationController.didDeactivateEvent += delegate(ViewController.DeactivationType deactivationType)
            {
                if (ButtonPanel.IsSingletonAvailable)
                {
                    ButtonPanel.instance.HidePanel();
                }
                _bottomScreen.HideScreen();
            };
        }
Exemplo n.º 2
0
        private void InitializeButtonPanel(bool forceReinit = false)
        {
            ButtonPanel.instance.Setup(forceReinit);
            _uiAdditions = LevelSelectionNavigationController.gameObject.AddComponent <SongListUIAdditions>();

            ButtonPanel.instance.SearchButtonPressed      -= SearchButtonPressed;
            ButtonPanel.instance.FilterButtonPressed      -= FilterButtonPressed;
            ButtonPanel.instance.ClearFilterButtonPressed -= ClearButtonPressed;
            ButtonPanel.instance.SortButtonPressed        -= SortButtonPressed;
            ButtonPanel.instance.ApplyQuickFilterPressed  -= ApplyQuickFilterPressed;
            ButtonPanel.instance.ReportButtonPressed      -= ReportButtonPressed;

            ButtonPanel.instance.SearchButtonPressed      += SearchButtonPressed;
            ButtonPanel.instance.FilterButtonPressed      += FilterButtonPressed;
            ButtonPanel.instance.ClearFilterButtonPressed += ClearButtonPressed;
            ButtonPanel.instance.SortButtonPressed        += SortButtonPressed;
            ButtonPanel.instance.ApplyQuickFilterPressed  += ApplyQuickFilterPressed;
            ButtonPanel.instance.ReportButtonPressed      += ReportButtonPressed;

            _uiAdditions.ConfirmDeleteButtonPressed += ConfirmDeleteButtonPressed;
        }