// Use this for initialization private void Awake() { //in this line you need to change the string in order to get your Camera //TODO MAYBE DO IT FROM THE INSPECTOR //GUICamera = GameObject.Find("GUICamera").GetComponent<Camera>(); //GUICamera = (Camera)GameObject.FindWithTag("MainCamera");// MainCamera.cameraMy; GameObject gameControllerObject = GameObject.FindWithTag("MainCamera"); if (gameControllerObject != null) { GUICamera = gameControllerObject.GetComponent <Camera>(); } GUIMode = this.transform.parent.parent.GetComponent <Canvas>().renderMode; bgImageSource = bgImage.GetComponent <Image>(); //at start the pointer is never to be considered over and UI element inside = false; //assign the tooltip to the singleton GUI class manager for fast access //TacticalGUIManager.tgm.mmttp = this; //hide the tooltip HideTooltipVisibility(); this.transform.parent.gameObject.SetActive(false); thatObjectLink = this; }
public void OnPointerExit(PointerEventData eventData) { if (TooltipBase.get() != null) { TooltipBase.get().HideTooltip(); } inside = false; }
public void Hide() { if (TooltipBase.get() != null) { TooltipBase.get().HideTooltip(); } inside = false; }
public void Show() { if (text != "" || dynamicText != null) { if (dynamicText == null) { TooltipBase.get().SetTooltip(text); } else { TooltipBase.get().SetTooltip(dynamicText()); } inside = true; } }
public void OnPointerEnter(PointerEventData eventData) { if (text != "" || dynamicText != null) { if (dynamicText == null) { TooltipBase.get().SetTooltip(text); } else { TooltipBase.get().SetTooltip(dynamicText()); } inside = true; } }