Exemplo n.º 1
0
        protected override void DidActivate(bool firstActivation, ActivationType activationType)
        {
            MainScreen         = GameObject.Find("MainScreen");
            MainScreenPosition = MainScreen.transform.position;
            if (firstActivation && activationType == ActivationType.AddedToHierarchy)
            {
                Instance = this;
                title    = "Counters+";

                navigationController = BeatSaberUI.CreateViewController <BackButton>();
                navigationController.DidFinishEvent += BackButton_DidFinish;

                editSettings = BeatSaberUI.CreateViewController <CountersPlusEditViewController>();
                placeholder  = BeatSaberUI.CreateViewController <CountersPlusFillerForMainViewController>();
                //settingsList = BeatSaberUI.CreateViewController<CountersPlusSettingsListViewController>();
                horizSettingsList = BeatSaberUI.CreateViewController <CountersPlusHorizontalSettingsListViewController>();
                credits           = BeatSaberUI.CreateViewController <CountersPlusCreditsViewController>();
            }
            SetViewControllersToNavigationConctroller(navigationController, new VRUIViewController[] { credits });
            ProvideInitialViewControllers(placeholder, navigationController, editSettings, horizSettingsList);
            MainScreen.transform.position = new Vector3(0, -100, 0); //"If it works it's not stupid"

            CounterWarning.CreateWarning("Due to limitations, some counters may not reflect their true appearance in-game.", 7.5f);
            if (!Plugin.UpToDate)
            {
                CounterWarning.CreateWarning("A new Counters+ update is available to download!", 5);
            }
            StartCoroutine(InitMockCounters());
        }
Exemplo n.º 2
0
 internal static void OnClick()
 {
     if (settingsFC == null)
     {
         settingsFC = BeatSaberUI.CreateFlowCoordinator <CountersPlusSettingsFlowCoordinator>();
     }
     BeatSaberUI.MainFlowCoordinator.PresentFlowCoordinator(settingsFC, null, false, false);
 }
Exemplo n.º 3
0
        internal static void OnClick()
        {
            if (settingsFC == null)
            {
                settingsFC = new GameObject("Counters+ | Settings Flow Coordinator").AddComponent <CountersPlusSettingsFlowCoordinator>();
            }
            MainFlowCoordinator main = Resources.FindObjectsOfTypeAll <MainFlowCoordinator>().First();

            main.InvokeMethod("PresentFlowCoordinator", settingsFC, null, false, false);
        }