public void OnPointerEnter(PointerEventData eventData)
 {
     if (item != null)
     {
         tooltip.Activate(item);
     }
 }
示例#2
0
 public void OnPointerEnter(PointerEventData eventData)
 {
     if (!inventoryManager.dragging)
     {
         toolTip.Activate(this);
     }
 }
    /// <summary>
    ///
    /// </summary>
    public void ActivateToolTip(ItemData item)
    {
        GUI_Panel_ToolTip.gameObject.SetActive(true);
        GUI_Panel_ToolTip.Activate(item);
        StartCoroutine(GUI_Panel_ToolTip.UpdateCount());

        if (Input.mousePosition.x > Screen.width / 2)
        {
            ChangePivot(1);
        }
        if (Input.mousePosition.x < Screen.width / 2)
        {
            ChangePivot(0);
        }

        GUI_Panel_ToolTip.transform.position = item.transform.position;
    }
示例#4
0
        void OnMouseMove(object sender, MouseEventArgs e)
        {
            SkillUI sUI = GetSkillOnMouse(e.Location); // lovely function already accounts for scrolling

            if (sUI == null)
            {
                SelectedSkillUI = null;
                ToolTip.Deactivate();
                return; // they moused nothing
            }

            // the mouse is now officially hovering over a skill
            Point ptSkillLoc = GetScrolledGridLocation(sUI.XGrid, sUI.YGrid);

            ptSkillLoc.X += m_nIconSize;

            ToolTip.Activate(sUI.Skill, ptSkillLoc);
            // dont redraw for no reason
            if (SelectedSkillUI != sUI)
            {
                SelectedSkillUI = sUI;
            }
        }
示例#5
0
 public void OnPointerEnter(PointerEventData eventData)
 {
     toolTip.Activate(item);
 }
 public void OnPointerEnter(PointerEventData eventData)
 {
     toolTip.Activate(inventoryModel);
 }