// Token: 0x060000DF RID: 223 RVA: 0x00011944 File Offset: 0x0000FB44
    private void OnTooltip(bool show)
    {
        InvGameItem invGameItem = show ? this.mItem : null;

        if (invGameItem != null)
        {
            InvBaseItem baseItem = invGameItem.baseItem;
            if (baseItem != null)
            {
                string text = string.Concat(new string[]
                {
                    "[",
                    NGUIText.EncodeColor(invGameItem.color),
                    "]",
                    invGameItem.name,
                    "[-]\n"
                });
                text = string.Concat(new object[]
                {
                    text,
                    "[AFAFAF]Level ",
                    invGameItem.itemLevel,
                    " ",
                    baseItem.slot
                });
                List <InvStat> list  = invGameItem.CalculateStats();
                int            i     = 0;
                int            count = list.Count;
                while (i < count)
                {
                    InvStat invStat = list[i];
                    if (invStat.amount != 0)
                    {
                        if (invStat.amount < 0)
                        {
                            text = text + "\n[FF0000]" + invStat.amount;
                        }
                        else
                        {
                            text = text + "\n[00FF00]+" + invStat.amount;
                        }
                        if (invStat.modifier == InvStat.Modifier.Percent)
                        {
                            text += "%";
                        }
                        text  = text + " " + invStat.id;
                        text += "[-]";
                    }
                    i++;
                }
                if (!string.IsNullOrEmpty(baseItem.description))
                {
                    text = text + "\n[FF9900]" + baseItem.description;
                }
                UITooltip.Show(text);
                return;
            }
        }
        UITooltip.Hide();
    }
Esempio n. 2
0
    public static void SwitchTable(ContentType type)
    {
        foreach (ContentLine content in instance.contentSlots)
        {
            content.transform.parent = GetCurrentGrid().transform;
        }
        GetCurrentGrid().Reposition();
        instance.reminderTable.gameObject.SetActive(false);
        instance.conclusionTable.gameObject.SetActive(false);
        instance.truthTable.gameObject.SetActive(false);
        UITooltip.Hide();
        switch (type)
        {
        case ContentType.Reminder:
            instance.reminderTable.gameObject.SetActive(true);
            instance.tableContainer.reparentTarget = instance.reminderTable.transform;
            break;

        case ContentType.Conclusion:
            instance.conclusionTable.gameObject.SetActive(true);
            instance.tableContainer.reparentTarget = instance.conclusionTable.transform;
            break;

        case ContentType.Truth:
            instance.truthTable.gameObject.SetActive(true);
            instance.tableContainer.reparentTarget = instance.truthTable.transform;
            break;

        default:
            break;
        }
        instance.currentType = type;
        instance.contentSlots.Clear();
    }
Esempio n. 3
0
 void OnTooltip(bool show)
 {
     if (show == true)
     {
         //CustomTooltip.Show(tooltipText);
         CustomTooltip.Show(localizeKey, true);
         return;
     }
     UITooltip.Hide();
 }
Esempio n. 4
0
 static public int Hide_s(IntPtr l)
 {
     try {
         UITooltip.Hide();
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Esempio n. 5
0
 void OnTooltip(bool show)
 {
     if (show)
     {
         UITooltip.Show("test");
     }
     else
     {
         UITooltip.Hide();
     }
 }
Esempio n. 6
0
 void OnTooltip(bool show)
 {
     ReadContent();
     if (show)
     {
         UITooltip.Show(content.content);
     }
     else
     {
         UITooltip.Hide();
     }
 }
Esempio n. 7
0
    /// <summary>
    /// Show a tooltip for the item.
    /// </summary>

    void OnTooltip(bool show)
    {
        InvGameItem item = show ? mItem : null;

        if (item != null)
        {
            InvBaseItem bi = item.baseItem;

            if (bi != null)
            {
                string t = "[" + NGUIText.EncodeColor(item.color) + "]" + item.name + "[-]\n";

                t += "[AFAFAF]Level " + item.itemLevel + " " + bi.slot;

                List <InvStat> stats = item.CalculateStats();

                for (int i = 0, imax = stats.Count; i < imax; ++i)
                {
                    InvStat stat = stats[i];
                    if (stat.amount == 0)
                    {
                        continue;
                    }

                    if (stat.amount < 0)
                    {
                        t += "\n[FF0000]" + stat.amount;
                    }
                    else
                    {
                        t += "\n[00FF00]+" + stat.amount;
                    }

                    if (stat.modifier == InvStat.Modifier.Percent)
                    {
                        t += "%";
                    }
                    t += " " + stat.id;
                    t += "[-]";
                }

                if (!string.IsNullOrEmpty(bi.description))
                {
                    t += "\n[FF9900]" + bi.description;
                }
                UITooltip.Show(t);
                return;
            }
        }
        UITooltip.Hide();
    }
Esempio n. 8
0
        /// <summary>
        ///
        /// </summary>
        public void ShowTip()
        {
            if (_curView == this)
            {
                UITooltip.Hide();
                _curView = null;
                return;
            }
            _curView = this;
            var itemData = GetData <ItemData>();

            if (itemData == null)
            {
                return;
            }
            UITooltip.Show(itemData.Tip);
        }
Esempio n. 9
0
    public override void OnTooltip(bool show)
    {
        if (item == null)
        {
            return;
        }

        if (show)
        {
            item.PrepareToolTip();
            UITooltip.AnchorToRect(transform as RectTransform);
            UITooltip.Show();
        }
        else
        {
            UITooltip.Hide();
        }
    }
Esempio n. 10
0
    private void Awake()
    {
        attrControls = new Dictionary <string, AttrUIControl>();
        skillIcon    = new List <Transform>();
        Transform skills = this.transform.Find("skills");

        for (int i = 0; i < skills.childCount; i++)
        {
            skillIcon.Add(skills.GetChild(i));

            UIEventListener.Get(skills.GetChild(i).gameObject).onHover = (go, state) => {
                if (state)
                {
                    UITooltip.Show(go.name);
                }
                else
                {
                    UITooltip.Hide();
                }
            };
        }

        lv                    = this.transform.Find("lv").Find("value").GetComponent <UILabel>();
        killed                = this.transform.Find("kill").Find("value").GetComponent <UILabel>();
        soul                  = this.transform.Find("soul").Find("value").GetComponent <UILabel>();
        iconFocus             = this.transform.Find("focus").GetComponent <UITexture>();
        iconFocus.enabled     = false;
        attrControls["hp"]    = new SliderControl(this.transform.FindChild("hp"), null);
        attrControls["mp"]    = new SliderControl(this.transform.FindChild("mp"), null);
        attrControls["exp"]   = new SliderControl(this.transform.FindChild("exp"), null);
        attrControls["atk"]   = new IconControl(this.transform.FindChild("atk"), null);
        attrControls["def"]   = new IconControl(this.transform.FindChild("def"), null);
        attrControls["speed"] = new IconControl(this.transform.FindChild("speed"), null);
        attrControls["luck"]  = new IconControl(this.transform.FindChild("luck"), null);
        attrControls["mind"]  = new IconControl(this.transform.FindChild("mind"), null);
        //Transform hd = this.transform.FindChild("HUDText");
        //this.attacker.GetComponent<ChracterBase>().SetHudText(hd.GetComponent<HUDText>());
        //GameManager.gameMain.RegStateUI(this);
    }
 public void Disable()
 {
     UITooltip.Hide();
 }
Esempio n. 12
0
 public void OnPointerExit(PointerEventData eventData)
 {
     tooltip.Hide();
 }
Esempio n. 13
0
 public unsafe static long $Invoke2(long instance, long *args)
 {
     UITooltip.Hide();
     return(-1L);
 }
Esempio n. 14
0
 public void HideToolTips()
 {
     UITooltip.Hide();
 }