Elin Decompiled Documentation EA 23.102 Nightly
All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Pages
TCText Class Reference
Inheritance diagram for TCText:
TCUI TC EMono

Public Member Functions

void Say (string s, float duration=0f)
 
void ShowEmo (Emo emo, float duration)
 
override void OnDraw (ref Vector3 pos)
 
override void OnKill ()
 
- Public Member Functions inherited from TCUI
override void OnDraw (ref Vector3 pos)
 
void DrawImmediate (ref Vector3 pos)
 
- Public Member Functions inherited from TC
void SetOwner (CardRenderer r)
 
virtual void OnSetOwner ()
 
virtual void OnDraw (ref Vector3 pos)
 
void Kill ()
 
virtual void OnKill ()
 

Public Attributes

PopManager pop
 
PopItemText lastEmo
 
- Public Attributes inherited from TC
CardRenderer render
 

Static Public Attributes

static string[] popIDs = new string[2] { "PopTextSys", "PopTextGod" }
 
- Static Public Attributes inherited from TC
static GameSetting.RenderSetting.TCSetting _setting
 
- Static Public Attributes inherited from EMono
static Core core
 

Properties

override Vector3 FixPos [get]
 
- Properties inherited from TCUI
override bool isUI [get]
 
override Vector3 FixPos [get]
 
- Properties inherited from TC
Card owner [get]
 
virtual bool isUI [get]
 
virtual Vector3 FixPos [get]
 
- Properties inherited from EMono
static Game game [get]
 
static bool AdvMode [get]
 
static Player player [get]
 
static Chara pc [get]
 
static UI ui [get]
 
static Map _map [get]
 
static Zone _zone [get]
 
static FactionBranch Branch [get]
 
static FactionBranch BranchOrHomeBranch [get]
 
static Faction Home [get]
 
static Scene scene [get]
 
static BaseGameScreen screen [get]
 
static GameSetting setting [get]
 
static GameData gamedata [get]
 
static ColorProfile Colors [get]
 
static World world [get]
 
static SoundManager Sound [get]
 
static SourceManager sources [get]
 
static SourceManager editorSources [get]
 
static CoreDebug debug [get]
 

Additional Inherited Members

- Static Public Member Functions inherited from EMono
static int rnd (int a)
 
- Protected Member Functions inherited from TCUI
virtual void Awake ()
 
- Protected Attributes inherited from TCUI
Vector3 lastPos
 

Detailed Description

Definition at line 5 of file TCText.cs.

Member Function Documentation

◆ OnDraw()

override void TCText.OnDraw ( ref Vector3  pos)
inlinevirtual

Reimplemented from TC.

Definition at line 73 of file TCText.cs.

74 {
75 if (!pop.enabled)
76 {
77 render.RemoveTC(this);
78 return;
79 }
80 Vector3 pos2 = pos;
81 lastPos = pos;
82 base.OnDraw(ref pos2);
83 }
void RemoveTC(TC tc)
PopManager pop
Definition: TCText.cs:9
Vector3 lastPos
Definition: TCUI.cs:7
CardRenderer render
Definition: TC.cs:7

◆ OnKill()

override void TCText.OnKill ( )
inlinevirtual

Reimplemented from TC.

Definition at line 85 of file TCText.cs.

86 {
88 pop.CopyAll(EMono.ui.rectDynamic);
89 pop.KillAll(instant: true);
90 }
Definition: EMono.cs:4
static UI ui
Definition: EMono.cs:15
void CopyAll(RectTransform rect)
Definition: PopManager.cs:180
void KillAll(bool instant=false)
Definition: PopManager.cs:213
void DrawImmediate(ref Vector3 pos)
Definition: TCUI.cs:35

References EMono.ui.

◆ Say()

void TCText.Say ( string  s,
float  duration = 0f 
)
inline

Definition at line 16 of file TCText.cs.

17 {
18 PopItem p;
19 switch (s[0])
20 {
21 case '(':
22 p = pop.PopText(s, null, EMono.core.config.ui.balloonBG ? "PopText_alt" : "PopTextThinking", default(Color), default(Vector3), duration);
23 break;
24 case '*':
25 p = pop.PopText(s, null, "PopTextOno", default(Color), default(Vector3), duration);
26 break;
27 case '@':
28 {
29 int num = int.Parse(s[1].ToString());
30 p = pop.PopText(s.Substring(2), null, popIDs[num], default(Color), default(Vector3), duration);
31 break;
32 }
33 case '^':
34 p = pop.PopText(s.Substring(1), null, "PopTextBroadcast", default(Color), default(Vector3), duration);
35 break;
36 default:
37 p = pop.PopText(s, null, EMono.core.config.ui.balloonBG ? "PopText_alt" : "PopText", default(Color), default(Vector3), duration);
38 break;
39 }
40 if (!p)
41 {
42 return;
43 }
44 EMono.core.actionsNextFrame.Add(delegate
45 {
46 if (p != null && p.gameObject != null)
47 {
48 p.RebuildLayout(recursive: true);
49 ContentSizeFitter[] componentsInChildren = p.GetComponentsInChildren<ContentSizeFitter>();
50 for (int i = 0; i < componentsInChildren.Length; i++)
51 {
52 componentsInChildren[i].enabled = false;
53 }
54 LayoutGroup[] componentsInChildren2 = p.GetComponentsInChildren<LayoutGroup>();
55 for (int i = 0; i < componentsInChildren2.Length; i++)
56 {
57 componentsInChildren2[i].enabled = false;
58 }
59 }
60 });
61 }
List< Action > actionsNextFrame
Definition: BaseCore.cs:31
new UISetting ui
Definition: CoreConfig.cs:588
CoreConfig config
Definition: Core.cs:70
static Core core
Definition: EMono.cs:5
PopItemText PopText(string text, Sprite sprite=null, string id="PopText", Color c=default(Color), Vector3 destPos=default(Vector3), float duration=0f)
Definition: PopManager.cs:41
static string[] popIDs
Definition: TCText.cs:7

References BaseCore.actionsNextFrame, CoreConfig.UISetting.balloonBG, Color, Core.config, EMono.core, pop, popIDs, PopManager.PopText(), and CoreConfig.ui.

◆ ShowEmo()

void TCText.ShowEmo ( Emo  emo,
float  duration 
)
inline

Definition at line 63 of file TCText.cs.

64 {
65 Sprite sprite = SpriteSheet.Get("Media/Graphics/Icon/icons_32", "emo_" + emo);
66 if (lastEmo != null)
67 {
69 }
70 lastEmo = pop.PopText("", sprite, "PopTextEmo", default(Color), default(Vector3), duration);
71 }
void Kill(PopItem item, bool instant=false)
Definition: PopManager.cs:137
static Sprite Get(string id)
Definition: SpriteSheet.cs:28
PopItemText lastEmo
Definition: TCText.cs:12

References Color, and SpriteSheet.Get().

Member Data Documentation

◆ lastEmo

PopItemText TCText.lastEmo

Definition at line 12 of file TCText.cs.

◆ pop

PopManager TCText.pop

Definition at line 9 of file TCText.cs.

Referenced by AI_Idle.Run(), and Say().

◆ popIDs

string [] TCText.popIDs = new string[2] { "PopTextSys", "PopTextGod" }
static

Definition at line 7 of file TCText.cs.

Referenced by Say().

Property Documentation

◆ FixPos

override Vector3 TCText.FixPos
get

Definition at line 14 of file TCText.cs.


The documentation for this class was generated from the following file: