Elin Modding Docs Doc
Loading...
Searching...
No Matches
WidgetPopText.cs
1using System;
2using UnityEngine;
3
4// Token: 0x0200062E RID: 1582
5public class WidgetPopText : Widget
6{
7 // Token: 0x06002C4D RID: 11341 RVA: 0x000F8D51 File Offset: 0x000F6F51
8 public override void OnActivate()
9 {
10 WidgetPopText.Instance = this;
11 }
12
13 // Token: 0x06002C4E RID: 11342 RVA: 0x000F8D59 File Offset: 0x000F6F59
14 public static void SayPick(Thing t, int num)
15 {
16 if (!WidgetPopText.Instance)
17 {
18 return;
19 }
20 WidgetPopText.Instance._SayPick(t, num);
21 }
22
23 // Token: 0x06002C4F RID: 11343 RVA: 0x000F8D74 File Offset: 0x000F6F74
24 public static void SayValue(string name, int a, bool negative = false, Sprite sprite = null)
25 {
26 if (!WidgetPopText.Instance)
27 {
28 return;
29 }
30 WidgetPopText.Instance._SayValue(name, a, negative, sprite);
31 }
32
33 // Token: 0x06002C50 RID: 11344 RVA: 0x000F8D91 File Offset: 0x000F6F91
34 public static void Say(string text, FontColor fontColor = FontColor.Default, Sprite sprite = null)
35 {
36 if (!WidgetPopText.Instance)
37 {
38 return;
39 }
40 WidgetPopText.Instance._Say(text, fontColor, sprite);
41 }
42
43 // Token: 0x06002C51 RID: 11345 RVA: 0x000F8DB0 File Offset: 0x000F6FB0
44 public void _SayPick(Thing t, int num)
45 {
46 PopItemText popItemText = this.pop.PopText("notifyAddThing".lang(t.GetName(NameStyle.Full, num), t.Num.ToString() ?? "", null, null, null), null, "PopNotification", default(Color), default(Vector3), 0f);
47 t.SetImage(popItemText.image);
48 popItemText.image.SetActive(true);
49 }
50
51 // Token: 0x06002C52 RID: 11346 RVA: 0x000F8E2A File Offset: 0x000F702A
52 public void _SayValue(string name, int a, bool negative = false, Sprite sprite = null)
53 {
54 WidgetPopText.Say(name + " " + ((a > 0) ? "+" : "") + a.ToString(), negative ? FontColor.Bad : FontColor.Default, sprite);
55 }
56
57 // Token: 0x06002C53 RID: 11347 RVA: 0x000F8E5C File Offset: 0x000F705C
58 public void _Say(string text, FontColor fontColor = FontColor.Default, Sprite sprite = null)
59 {
60 PopItemText popItemText = this.pop.PopText(text, sprite ?? this.icons[0], "PopNotification", default(Color), default(Vector3), 0f);
61 if (fontColor != FontColor.Default)
62 {
63 popItemText.text.color = SkinManager.Instance.skinDark.Colors.GetTextColor(fontColor);
64 }
65 }
66
67 // Token: 0x040018D5 RID: 6357
68 public static WidgetPopText Instance;
69
70 // Token: 0x040018D6 RID: 6358
71 public PopManager pop;
72
73 // Token: 0x040018D7 RID: 6359
74 public Sprite[] icons;
75}
Definition Thing.cs:10