Esempio n. 1
0
        private void BackButton_DidFinish()
        {
            foreach (KeyValuePair <MockCounterGroup, ConfigModel> kvp in MockCounter.loadedMockCounters)
            {
                Destroy(kvp.Key.CounterName);
                Destroy(kvp.Key.CounterData);
            }
            CountersPlusEditViewController.ClearScreen();
            MockCounter.loadedMockCounters.Clear();
            CounterWarning.ClearAllWarnings();
            Destroy(TextHelper.CounterCanvas.gameObject);
            TextHelper.CounterCanvas      = null;
            MainScreen.transform.position = MainScreenPosition;
            MainFlowCoordinator mainFlow = Resources.FindObjectsOfTypeAll <MainFlowCoordinator>().First();

            mainFlow.InvokeMethod("DismissFlowCoordinator", this, null, false);
            foreach (CounterWarning warning in CounterWarning.existing)
            {
                DestroyImmediate(warning.gameObject);
            }
        }
Esempio n. 2
0
        protected override void BackButtonWasPressed(ViewController controller)
        {
            foreach (KeyValuePair <MockCounterGroup, ConfigModel> kvp in MockCounter.loadedMockCounters)
            {
                Destroy(kvp.Key.CounterName);
                Destroy(kvp.Key.CounterData);
            }
            CountersPlusEditViewController.ClearScreen();
            MockCounter.loadedMockCounters.Clear();
            CounterWarning.ClearAllWarnings();
            Destroy(TextHelper.CounterCanvas.gameObject);
            TextHelper.CounterCanvas      = null;
            MainScreen.transform.position = MainScreenPosition;
            MainFlowCoordinator mainFlow = Resources.FindObjectsOfTypeAll <MainFlowCoordinator>().First();

            mainFlow.InvokePrivateMethod("DismissFlowCoordinator", new object[] { this, null, false });
            ConfigModelController.ClearAllControllers();

            //Reload settings from config
            CountersController.settings = ConfigLoader.LoadSettings();
        }
Esempio n. 3
0
        public override void OnCellSelect(TableView view, int row, CountersPlusHorizontalSettingsListViewController settings)
        {
            CountersPlusEditViewController.ClearScreen(true);
            MockCounter.Highlight <ConfigModel>(null);
            switch (row)
            {
            case 0:
                RefreshScreen("General", "General HUD Settings");
                break;

            case 1:
                RefreshScreen("Camera", "HUD Camera Settings");
                break;

            case 2:
                RefreshScreen("Position", "HUD Position Offset");
                break;

            case 3:
                RefreshScreen("Rotation", "HUD Rotation");
                break;
            }
        }