private void DoTooltip() { Dialog top = DialogManager.Instance.GetTop(); if (GUI.tooltip.Length > 0 && top != null && top.ID == DialogManager.DIALOG_INDEX.TCBOARD) { tooltip.ItemCode = string.Empty; int num = -1; try { num = int.Parse(GUI.tooltip); } catch { } TcPrize[] array = prizes.ToArray(); if (0 <= num && num < array.Length) { tooltip.ItemCode = array[num].Code; tooltip.IsShop = true; tooltip.Prize = array[num]; } if (tooltip.ItemCode.Length > 0) { Vector2 coord = new Vector2(crdBoardOutline.x + crdBoardOutline.width - tooltip.size.x, crdBoardOutline.y); tooltip.SetCoord(coord); GUI.Box(tooltip.ClientRect, string.Empty, "TooltipWindow"); GUI.BeginGroup(tooltip.ClientRect); tooltip.DoDialog(); GUI.EndGroup(); } } }
private void DoTooltip() { Dialog top = DialogManager.Instance.GetTop(); if (GUI.tooltip.Length > 0 && top != null && top.ID == DialogManager.DIALOG_INDEX.RANDOMBOX) { c_Gachapon gachaponByCode = RandomboxItemManager.Instance.GetGachaponByCode(gachaponCode); TItem tItem = TItemManager.Instance.Get <TItem>(GUI.tooltip); if (gachaponByCode != null && tItem != null) { bool flag = false; int num = 0; while (!flag && num < 5) { if (gachaponByCode.items[num] == tItem.code) { flag = true; tooltip.ItemCode = tItem.code; Vector2 vector = new Vector2((float)(num * 145 + 13), (float)ud_starty); Vector2 vector2 = new Vector2(vector.x + 143f, vector.y); float x = tooltip.size.x; float num2 = tooltip.size.y; if (tItem.type != 0) { num2 -= 130f; } if (num < 4) { tooltip.SetCoord(new Vector2(vector.x, vector.y - num2)); } else { tooltip.SetCoord(new Vector2(vector2.x - x, vector2.y - num2)); } } num++; } if (flag) { GUI.Box(tooltip.ClientRect, string.Empty, "TooltipWindow"); GUI.BeginGroup(tooltip.ClientRect); tooltip.DoDialog(); GUI.EndGroup(); } } } }
private void ShowTooltip(int id) { tooltip.DoDialog(); }
private void DoTooltip(Vector2 offset) { Dialog top = DialogManager.Instance.GetTop(); if (GUI.tooltip.Length > 0 && top != null && top.ID == DialogManager.DIALOG_INDEX.ITEM_SETTING && !IsDragging) { if (lastTooltip != GUI.tooltip) { focusTime = 0f; tooltip.ItemSeq = GUI.tooltip; if (tooltip.ItemSeq.Length <= 0) { tooltip.ItemCode = string.Empty; } else { int num = -1; try { string text = tooltip.ItemSeq; if (text[0] == '*') { text = text.Substring(2); } num = int.Parse(text); } catch { } if (num >= 0) { Item itemBySequence = MyInfoManager.Instance.GetItemBySequence(num); if (itemBySequence != null) { tooltip.SetItem(itemBySequence); tooltip.ItemCode = itemBySequence.Template.code; if (!DialogManager.Instance.IsModal) { GlobalVars.Instance.PlaySoundMouseOver(); } } } } } if (focusTime > 0.3f) { Vector2 coord = ltTooltip; float num2 = coord.y + tooltip.size.y; if (num2 > size.y) { coord.y -= num2 - size.y; } tooltip.SetCoord(coord); GUI.Box(tooltip.ClientRect, string.Empty, "TooltipWindow"); GUI.BeginGroup(tooltip.ClientRect); tooltip.DoDialog(); GUI.EndGroup(); } lastTooltip = GUI.tooltip; } }