Esempio n. 1
0
 public void OnPointerEnter(PointerEventData eventData)  //마우스가 해당 아이템안에 들어갔을때 tooltip의 GenerateTootip을 호출하여 해당 tooltip정보를 보여줌
 {
     if (this.item != null)
     {
         tooltip.GenerateTooltip(this.item);
     }
 }
Esempio n. 2
0
 public void OnPointerEnter(PointerEventData eventData)
 {
     if (this.item != null)
     {
         tooltip.GenerateTooltip(item);
     }
 }
 public void OnPointerEnter(PointerEventData eventData)
 {
     if (this.avatar != null)
     {
         tooltip.GenerateTooltip(this.avatar);
     }
 }
Esempio n. 4
0
 // function is called by IPointerEnterHandler whenever a user mouses over an item
 public void OnPointerEnter(PointerEventData eventData)
 {
     if (GameMenu.instance.showStatusTooltip.isOn)
     {
         tooltip.GenerateTooltip(gameObject.name); // calls function to generate and display tooltip based on name of stat label
     }
 }
Esempio n. 5
0
 public void OnPointerEnter(PointerEventData eventData)
 {
     //loads up the tooltip if the mouse goes over the icon in the inventory panel
     if (this.item != null)
     {
         tooltip.GenerateTooltip(this.item);
     }
 }
Esempio n. 6
0
 public void OnPointerClick(PointerEventData eventData)
 {
     if (item != null)
     {
         Debug.Log("click1: " + this.item.id + " name: " + gameObject.name);
         tooltip.GenerateTooltip(item);
     }
 }
Esempio n. 7
0
 public void OnPointerEnter(PointerEventData eventData)
 {
     if (playerImage.sprite.name != "Empty" && selectedPlayer.sprite.name == "Empty") // checks if sprite portrait is not empty and selected player is empty
     {
         //Debug.Log("playerImage sprite name = " + playerImage.sprite.name); // prints player name notice to debug log
         CharStats player = GameMenu.instance.FindPlayerStats(playerImage.sprite.name); // pulls reference to player stats based on sprite name
         //Debug.Log("Generating tooltip for " + player.charName); // prints tooltip notice to debug log
         tooltip.GenerateTooltip(player);                                               // calls function to generate tooltip based on player stats
     }
 }
Esempio n. 8
0
 public void UpdateTooltip(ItemData item)
 {
     if (item != null && grabbedItem.item == null)
     {
         tooltip.GenerateTooltip(item);
     }
     else
     {
         tooltip.gameObject.SetActive(false);
     }
 }
Esempio n. 9
0
    // function is called by IPointerEnterHandler whenever a user mouses over an item
    public void OnPointerEnter(PointerEventData eventData)
    {
        if (buttonImage.gameObject.activeInHierarchy)                                                                               // check if item button image is active in hierarchy, meaning item isn't
        {
            Item item = null;                                                                                                       // creates local item variable to store passed item

            if (GameManager.instance.gameMenuOpen || GameManager.instance.battleActive || Shop.instance.sellMenu.activeInHierarchy) // checks if game menu, battle menu, or shop sell window are open, since all pull from character inventory
            {
                item = GameManager.instance.GetItemDetails(GameManager.instance.itemsHeld[buttonValue]);                            // calls GetItemDetails function to pull item from itemsHeld array at button location
            }
            else if (/*GameManager.instance.shopActive*/ Shop.instance.buyMenu.activeInHierarchy)                                   // checks if shop buy window is open
            {
                item = GameManager.instance.GetItemDetails(Shop.instance.itemsForSale[buttonValue]);                                // calls GetItemDetails function to pull item from itemsForSale array at button location
            }

            tooltip.GenerateTooltip(item); // calls function to generate and display tooltip based on passed item
        }
    }