2 using System.Collections;
8 public Button editButton;
9 public Button deleteButton;
10 public Text listEntryLabel;
12 private GameObject myAnnotation;
14 public void setupListEntry (GameObject annotation) {
15 myAnnotation = annotation;
16 annotation.GetComponent<
Annotation> ().myAnnotationListEntry = this.gameObject;
17 listEntryLabel.text = annotation.GetComponent<
Annotation>().getLabelText();
20 public void DestroyAnnotation() {
22 myAnnotation.GetComponent<
Annotation>().destroyAnnotation();
23 Destroy(myAnnotation.gameObject);
27 public GameObject getAnnotation() {
31 public Color getAnnotationColor() {
32 return myAnnotation.GetComponent<
Annotation>().getColor();
35 public void updateLabel(
string newLabel) {
36 listEntryLabel.text = newLabel;
40 public void EditAnnotation() {
41 AnnotationControl.instance.EditAnnotation (this.gameObject);
45 public void DeleteAnnotation() {
46 AnnotationControl.instance.DeleteAnnotation (this.gameObject);
49 public void changeAnnotationColor(Color newColor) {
50 myAnnotation.GetComponent<
Annotation>().changeColor (newColor);
53 public void updateAnnotationposition(Quaternion rotation, Vector3 position) {
54 myAnnotation.GetComponent<
Annotation>().updatePosition (rotation, position);
57 public Vector2 getListPos() {
58 return this.gameObject.GetComponent<RectTransform> ().anchoredPosition;
61 public void replaceMyAnnotationMesh (GameObject newAnnotationGroup) {
62 newAnnotationGroup.GetComponent<
Annotation> ().transferAnnotationSettings (myAnnotation);
64 setupListEntry (newAnnotationGroup);
65 AnnotationControl.instance.updateListInLabelPositioner ();
68 public void setAnnotationMovementActive(
bool active) {
69 myAnnotation.GetComponent<
Annotation> ().setMovementMeshsActive (active);
72 public AnnotationControl.AnnotationType getMyAnnotationType() {
73 return myAnnotation.GetComponent<
Annotation> ().myType;
76 public void makeAnnotationTransparent(
float alpha) {
77 myAnnotation.GetComponent<
Annotation> ().makeTransperent (alpha);
80 public void resetAnnotationTransparency() {
81 myAnnotation.GetComponent<
Annotation> ().setDefaultTransparency ();
84 public void setAnnotationLayer(
string layer) {
85 myAnnotation.GetComponent<
Annotation> ().changeAnnotationMeshLayer (layer);
88 public void setMyAnnotationActive(
bool active) {
89 myAnnotation.SetActive (active);
92 public void enableAllCollider (
bool enable) {
93 myAnnotation.GetComponent<
Annotation> ().enableAllCollider (enable);