/// <summary> /// Press the button programatically. /// </summary> public void Press() { if (IsEnabled) { ButtonPressed.RaiseEvent(); } }
public void OnInputClicked(InputEventData eventData) { if (IsEnabled) { ButtonPressed.RaiseEvent(); } }
public void OnInputClicked(InputClickedEventData eventData) { if (IsEnabled) { ButtonPressed.RaiseEvent(); eventData.Use(); // Mark the event as used, so it doesn't fall through to other handlers. } }
void IInputHandler.OnInputUp(InputEventData eventData) { if (IsEnabled && eventData.PressType == InteractionSourcePressInfo.Select) { ButtonPressed.RaiseEvent(); eventData.Use(); // Mark the event as used, so it doesn't fall through to other handlers. } }
void IInputHandler.OnInputUp(InputEventData eventData) { if (IsEnabled && eventData.PressType == InteractionSourcePressInfo.Select) { ButtonPressed.RaiseEvent(); eventData.Use(); // Mark the event as used, so it doesn't fall through to other handlers. if (eventData.selectedObject.name == this.name) { this.transform.parent.GetComponent <SingleConnectome>().DrawEdges(int.Parse(this.name)); } } }
void IInputHandler.OnInputUp(InputEventData eventData) { if (IsEnabled && eventData.PressType == InteractionSourcePressInfo.Select) { ButtonPressed.RaiseEvent(); eventData.Use(); // Mark the event as used, so it doesn't fall through to other handlers. if (eventData.selectedObject.name == "ResetButton") { //this.transform.parent.GetComponent<SingleConnectome>().DrawEdges GameObject.Find("SceneManager").GetComponent <NSceneManager>().resetConnectomeBuilder(); } } }
void IInputHandler.OnInputUp(InputEventData eventData) { if (IsEnabled && eventData.PressType == InteractionSourcePressInfo.Select) { ButtonPressed.RaiseEvent(); eventData.Use(); // Mark the event as used, so it doesn't fall through to other handlers. if (eventData.selectedObject.name == "StepParent") { mode = 0; step.GetComponent <TextMesh>().color = Color.red; hr.GetComponent <TextMesh>().color = new Color(1.0f, 1.0f, 1.0f); } else if (eventData.selectedObject.name == "HRParent") { mode = 1; step.GetComponent <TextMesh>().color = new Color(1.0f, 1.0f, 1.0f); hr.GetComponent <TextMesh>().color = Color.red; } if (eventData.selectedObject.name == "Week1Parent") { weekID = 0; week1.GetComponent <TextMesh>().color = Color.yellow; week2.GetComponent <TextMesh>().color = new Color(1.0f, 1.0f, 1.0f); week3.GetComponent <TextMesh>().color = new Color(1.0f, 1.0f, 1.0f); } else if (eventData.selectedObject.name == "Week2Parent") { weekID = 1; week1.GetComponent <TextMesh>().color = new Color(1.0f, 1.0f, 1.0f); week2.GetComponent <TextMesh>().color = Color.yellow; week3.GetComponent <TextMesh>().color = new Color(1.0f, 1.0f, 1.0f); } else if (eventData.selectedObject.name == "Week3Parent") { weekID = 2; week1.GetComponent <TextMesh>().color = new Color(1.0f, 1.0f, 1.0f); week2.GetComponent <TextMesh>().color = new Color(1.0f, 1.0f, 1.0f); week3.GetComponent <TextMesh>().color = Color.yellow; } smScript.visualize(mode, weekID); } }
void IInputHandler.OnInputUp(InputEventData eventData) { Debug.Log("Inside Oninputup"); if (IsEnabled && eventData.PressType == InteractionSourcePressInfo.Select) { ButtonPressed.RaiseEvent(); eventData.Use(); // Mark the event as used, so it doesn't fall through to other handlers. Debug.Log("Inside Oninputup"); if (eventData.selectedObject.name == "Cube") { Debug.Log("Click"); } } }
void IInputHandler.OnInputUp(InputEventData eventData) { if (IsEnabled && eventData.PressType == InteractionSourcePressInfo.Select) { ButtonPressed.RaiseEvent(); eventData.Use(); // Mark the event as used, so it doesn't fall through to other handlers. if (eventData.selectedObject == Anatomy) { this.transform.parent.GetComponentInChildren <SingleConnectome>()._representationType = SingleConnectome.representationTypes.Anatomy; Anatomy.GetComponentInChildren <TextMesh>().color = Color.red; Tsne.GetComponentInChildren <TextMesh>().color = new Color(1.0f, 1.0f, 1.0f); Mds.GetComponentInChildren <TextMesh>().color = new Color(1.0f, 1.0f, 1.0f); Isomap.GetComponentInChildren <TextMesh>().color = new Color(1.0f, 1.0f, 1.0f); } else if (eventData.selectedObject == Tsne) { this.transform.parent.GetComponentInChildren <SingleConnectome>()._representationType = SingleConnectome.representationTypes.Tsne; Anatomy.GetComponentInChildren <TextMesh>().color = new Color(1.0f, 1.0f, 1.0f); Tsne.GetComponentInChildren <TextMesh>().color = Color.red; Mds.GetComponentInChildren <TextMesh>().color = new Color(1.0f, 1.0f, 1.0f); Isomap.GetComponentInChildren <TextMesh>().color = new Color(1.0f, 1.0f, 1.0f); } else if (eventData.selectedObject == Mds) { this.transform.parent.GetComponentInChildren <SingleConnectome>()._representationType = SingleConnectome.representationTypes.MDS; Anatomy.GetComponentInChildren <TextMesh>().color = new Color(1.0f, 1.0f, 1.0f); Tsne.GetComponentInChildren <TextMesh>().color = new Color(1.0f, 1.0f, 1.0f); Mds.GetComponentInChildren <TextMesh>().color = Color.red; Isomap.GetComponentInChildren <TextMesh>().color = new Color(1.0f, 1.0f, 1.0f); } else if (eventData.selectedObject == Isomap) { this.transform.parent.GetComponentInChildren <SingleConnectome>()._representationType = SingleConnectome.representationTypes.Isomap; Anatomy.GetComponentInChildren <TextMesh>().color = new Color(1.0f, 1.0f, 1.0f); Tsne.GetComponentInChildren <TextMesh>().color = new Color(1.0f, 1.0f, 1.0f); Mds.GetComponentInChildren <TextMesh>().color = new Color(1.0f, 1.0f, 1.0f); Isomap.GetComponentInChildren <TextMesh>().color = Color.red; } if (eventData.selectedObject == CAnatomy) { this.transform.parent.GetComponentInChildren <SingleConnectome>()._classificationType = SingleConnectome.classificationTypes.Anatomy; CAnatomy.GetComponentInChildren <TextMesh>().color = Color.red; Embeddness.GetComponentInChildren <TextMesh>().color = new Color(1.0f, 1.0f, 1.0f); RichClub.GetComponentInChildren <TextMesh>().color = new Color(1.0f, 1.0f, 1.0f); } else if (eventData.selectedObject == Embeddness) { this.transform.parent.GetComponentInChildren <SingleConnectome>()._classificationType = SingleConnectome.classificationTypes.Embeddness; CAnatomy.GetComponentInChildren <TextMesh>().color = new Color(1.0f, 1.0f, 1.0f); Embeddness.GetComponentInChildren <TextMesh>().color = Color.red; RichClub.GetComponentInChildren <TextMesh>().color = new Color(1.0f, 1.0f, 1.0f); } else if (eventData.selectedObject == RichClub) { this.transform.parent.GetComponentInChildren <SingleConnectome>()._classificationType = SingleConnectome.classificationTypes.RichClub; CAnatomy.GetComponentInChildren <TextMesh>().color = new Color(1.0f, 1.0f, 1.0f); Embeddness.GetComponentInChildren <TextMesh>().color = new Color(1.0f, 1.0f, 1.0f); RichClub.GetComponentInChildren <TextMesh>().color = Color.red; } if (eventData.selectedObject == EdgeOn) { this.transform.parent.GetComponentInChildren <BoxCollider>().enabled = false; EdgeOn.GetComponentInChildren <TextMesh>().color = Color.red; EdgeOff.GetComponentInChildren <TextMesh>().color = new Color(1.0f, 1.0f, 1.0f); } else if (eventData.selectedObject == EdgeOff) { this.transform.parent.GetComponentInChildren <BoxCollider>().enabled = true; EdgeOn.GetComponentInChildren <TextMesh>().color = new Color(1.0f, 1.0f, 1.0f); EdgeOff.GetComponentInChildren <TextMesh>().color = Color.red; } } }