Elin Modding Docs Doc
Loading...
Searching...
No Matches
TCText.cs
1using System;
2using UnityEngine;
3using UnityEngine.UI;
4
5// Token: 0x02000183 RID: 387
6public class TCText : TCUI
7{
8 // Token: 0x170002C0 RID: 704
9 // (get) Token: 0x06000B1E RID: 2846 RVA: 0x0004541C File Offset: 0x0004361C
10 public override Vector3 FixPos
11 {
12 get
13 {
14 return TC._setting.textPos;
15 }
16 }
17
18 // Token: 0x06000B1F RID: 2847 RVA: 0x00045428 File Offset: 0x00043628
19 public void Say(string s, float duration = 0f)
20 {
21 char c = s[0];
22 PopItem p;
23 if (c <= '*')
24 {
25 if (c == '(')
26 {
27 p = this.pop.PopText(s, null, EMono.core.config.ui.balloonBG ? "PopText_alt" : "PopTextThinking", default(Color), default(Vector3), duration);
28 goto IL_17F;
29 }
30 if (c == '*')
31 {
32 p = this.pop.PopText(s, null, "PopTextOno", default(Color), default(Vector3), duration);
33 goto IL_17F;
34 }
35 }
36 else
37 {
38 if (c == '@')
39 {
40 int num = int.Parse(s[1].ToString());
41 p = this.pop.PopText(s.Substring(2), null, TCText.popIDs[num], default(Color), default(Vector3), duration);
42 goto IL_17F;
43 }
44 if (c == '^')
45 {
46 p = this.pop.PopText(s.Substring(1), null, "PopTextBroadcast", default(Color), default(Vector3), duration);
47 goto IL_17F;
48 }
49 }
50 p = this.pop.PopText(s, null, EMono.core.config.ui.balloonBG ? "PopText_alt" : "PopText", default(Color), default(Vector3), duration);
51 IL_17F:
52 if (p)
53 {
54 EMono.core.actionsNextFrame.Add(delegate
55 {
56 if (p != null && p.gameObject != null)
57 {
58 p.RebuildLayout(true);
59 ContentSizeFitter[] componentsInChildren = p.GetComponentsInChildren<ContentSizeFitter>();
60 for (int i = 0; i < componentsInChildren.Length; i++)
61 {
62 componentsInChildren[i].enabled = false;
63 }
64 LayoutGroup[] componentsInChildren2 = p.GetComponentsInChildren<LayoutGroup>();
65 for (int i = 0; i < componentsInChildren2.Length; i++)
66 {
67 componentsInChildren2[i].enabled = false;
68 }
69 }
70 });
71 }
72 }
73
74 // Token: 0x06000B20 RID: 2848 RVA: 0x000455DC File Offset: 0x000437DC
75 public void ShowEmo(Emo emo, float duration)
76 {
77 Sprite sprite = SpriteSheet.Get("Media/Graphics/Icon/icons_32", "emo_" + emo.ToString());
78 if (this.lastEmo != null)
79 {
80 this.pop.Kill(this.lastEmo, false);
81 }
82 this.lastEmo = this.pop.PopText("", sprite, "PopTextEmo", default(Color), default(Vector3), duration);
83 }
84
85 // Token: 0x06000B21 RID: 2849 RVA: 0x0004565C File Offset: 0x0004385C
86 public override void OnDraw(ref Vector3 pos)
87 {
88 if (!this.pop.enabled)
89 {
90 this.render.RemoveTC(this);
91 return;
92 }
93 Vector3 vector = pos;
94 this.lastPos = pos;
95 base.OnDraw(ref vector);
96 }
97
98 // Token: 0x06000B22 RID: 2850 RVA: 0x0004569E File Offset: 0x0004389E
99 public override void OnKill()
100 {
101 base.DrawImmediate(ref this.lastPos);
102 this.pop.CopyAll(EMono.ui.rectDynamic);
103 this.pop.KillAll(true);
104 }
105
106 // Token: 0x04000A32 RID: 2610
107 public static string[] popIDs = new string[]
108 {
109 "PopTextSys",
110 "PopTextGod"
111 };
112
113 // Token: 0x04000A33 RID: 2611
114 public PopManager pop;
115
116 // Token: 0x04000A34 RID: 2612
117 [NonSerialized]
118 public PopItemText lastEmo;
119}
Definition EMono.cs:6
Definition TC.cs:6
Definition TCUI.cs:6