private void TriggerClickedHandler(object sender, ClickedEventArgs e) { XRInteractableTerrain interactableTerrain = _terrainModelManager.GetComponentFromCurrentModel <XRInteractableTerrain>(); switch (CurrentActivity) { case ControllerModalActivity.Default: SecondaryXRController controller = (SecondaryXRController)_controller; controller.Flashlight?.Toggle(); break; case ControllerModalActivity.ToolsDistance: case ControllerModalActivity.ToolsHeightProfile: interactableTerrain.CompleteSelection(); break; default: Input.RegisterKeyPress(KeyCode.T); break; } }
private void MenuButtonPressedHandler(object sender, ClickedEventArgs e) { MainModal mainModal = UserInterfaceManager.Instance.MainModal; XRInteractableTerrain interactableTerrain = _terrainModelManager.GetComponentFromCurrentModel <XRInteractableTerrain>(); switch (CurrentActivity) { case ControllerModalActivity.Default: // TODO Turn on secondary controller menu instead. SecondaryXRController controller = (SecondaryXRController)_controller; controller.Flashlight?.CycleNextColor(); break; case ControllerModalActivity.BBoxSelection: case ControllerModalActivity.ToolsDistance: case ControllerModalActivity.ToolsHeightProfile: if (interactableTerrain.CancelSelection()) { mainModal.Visible = true; } break; case ControllerModalActivity.BookmarkResults: case ControllerModalActivity.NomenclatureResults: case ControllerModalActivity.ProductResults: Input.RegisterKeyPress(KeyCode.M); break; case ControllerModalActivity.LayerManager: mainModal.Visible = true; StartActivity(ControllerModalActivity.Default); break; case ControllerModalActivity.ToolsSunAngle: break; } }