public void HideTooltip() { TooltipZone component = base.GetComponent <TooltipZone>(); if (component != null) { component.HideTooltip(); } }
public GameObject GetTooltipObject() { TooltipZone component = base.GetComponent <TooltipZone>(); if (component != null) { return(component.GetTooltipObject()); } return(null); }
private void OnButtonOut(UIEvent e) { this.m_highlight.ChangeState(ActorStateType.HIGHLIGHT_OFF); TooltipZone component = base.GetComponent <TooltipZone>(); if (component != null) { component.HideTooltip(); } }
private void OnButtonOver(UIEvent e) { SoundManager.Get().LoadAndPlay("quest_log_button_mouse_over", base.gameObject); this.m_highlight.ChangeState(ActorStateType.HIGHLIGHT_MOUSE_OVER); TooltipZone component = base.GetComponent <TooltipZone>(); if (component != null) { component.ShowBoxTooltip(GameStrings.Get("GLUE_TOOLTIP_BUTTON_QUESTLOG_HEADLINE"), GameStrings.Get("GLUE_TOOLTIP_BUTTON_QUESTLOG_DESC")); } }
private void OnButtonOver(UIEvent e) { SoundManager.Get().LoadAndPlay("store_button_mouse_over", base.gameObject); if (this.m_highlightState != null) { this.m_highlightState.ChangeState(ActorStateType.HIGHLIGHT_MOUSE_OVER); } if (this.m_highlight != null) { this.m_highlight.SetActive(true); } TooltipZone component = base.GetComponent <TooltipZone>(); if (component != null) { component.ShowBoxTooltip(GameStrings.Get("GLUE_TOOLTIP_BUTTON_STORE_HEADLINE"), GameStrings.Get("GLUE_TOOLTIP_BUTTON_STORE_DESC")); } }
void Update() { // TODO: Do we need a manager, or can we just subsidize the dialog creation to the events that triggered the creation in the first place? // I think we still need a manager, in order to spawn the tool tip zone in some kind of order. // Right now the tooltip will be activate based on the sequence number it has. A better way to do it is to activate it based on the id of the tooltip. int child_num = transform.childCount; List <Transform> childs = new List <Transform>(); for (int i = 0; i < child_num; i++) { childs.Add(transform.GetChild(i)); } foreach (Transform child in childs) { TooltipZone TooltipScript = child.gameObject.GetComponent <TooltipZone>(); if (TooltipScript.hasBeenTriggered) { foreach (GameObject active_item in TooltipScript.active_items) { active_item.SetActive(true); } } } }