Exemplo n.º 1
0
    public void HideTooltip()
    {
        TooltipZone component = base.GetComponent <TooltipZone>();

        if (component != null)
        {
            component.HideTooltip();
        }
    }
Exemplo n.º 2
0
    public GameObject GetTooltipObject()
    {
        TooltipZone component = base.GetComponent <TooltipZone>();

        if (component != null)
        {
            return(component.GetTooltipObject());
        }
        return(null);
    }
Exemplo n.º 3
0
    private void OnButtonOut(UIEvent e)
    {
        this.m_highlight.ChangeState(ActorStateType.HIGHLIGHT_OFF);
        TooltipZone component = base.GetComponent <TooltipZone>();

        if (component != null)
        {
            component.HideTooltip();
        }
    }
Exemplo n.º 4
0
    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"));
        }
    }
Exemplo n.º 5
0
    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"));
        }
    }
Exemplo n.º 6
0
    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);
                }
            }
        }
    }