Elin Modding Docs Doc
Loading...
Searching...
No Matches
WidgetNotice.cs
1using System;
2using UnityEngine;
3
4// Token: 0x02000628 RID: 1576
6{
7 // Token: 0x06002C2D RID: 11309 RVA: 0x000F87D1 File Offset: 0x000F69D1
8 public override object CreateExtra()
9 {
10 return new WidgetNotice.Extra();
11 }
12
13 // Token: 0x17000C9A RID: 3226
14 // (get) Token: 0x06002C2E RID: 11310 RVA: 0x000F87D8 File Offset: 0x000F69D8
15 public WidgetNotice.Extra extra
16 {
17 get
18 {
19 return base.config.extra as WidgetNotice.Extra;
20 }
21 }
22
23 // Token: 0x06002C2F RID: 11311 RVA: 0x000F87EA File Offset: 0x000F69EA
24 public static void RefreshAll()
25 {
26 if (!WidgetNotice.Instance)
27 {
28 return;
29 }
30 WidgetNotice.Instance._RefreshAll();
31 }
32
33 // Token: 0x06002C30 RID: 11312 RVA: 0x000F8804 File Offset: 0x000F6A04
34 public override void _OnActivate()
35 {
36 WidgetNotice.Instance = this;
37 LittlePopper.showStock = this.extra.showStock;
38 base.Add(new NotificationHome(), this.H1);
39 base.Add(new NotificationStockpile(), this.H3);
40 this.itemBattle = base.Add(new NotificationBattle(), this.H4);
41 this.itemGuest = base.Add(new NotificationGuest(), this.H4);
42 }
43
44 // Token: 0x06002C31 RID: 11313 RVA: 0x000F887C File Offset: 0x000F6A7C
45 public override void OnRefresh()
46 {
47 this.battles = 0;
48 this.guests = 0;
49 foreach (Chara chara in EMono._map.charas)
50 {
51 if (chara.IsHomeMember())
52 {
53 if (chara.enemy != null && chara.IsAliveInCurrentZone)
54 {
55 this.battles++;
56 }
57 }
58 else if (chara.IsGuest())
59 {
60 this.guests++;
61 }
62 }
63 this.H4.SetActive(this.itemBattle.gameObject.activeSelf || this.itemGuest.gameObject.activeSelf);
64 }
65
66 // Token: 0x06002C32 RID: 11314 RVA: 0x000F8948 File Offset: 0x000F6B48
67 public override void OnSetContextMenu(UIContextMenu m)
68 {
69 m.AddToggle("showStockPop", this.extra.showStock, delegate(bool a)
70 {
71 WidgetNotice.Extra extra = this.extra;
72 LittlePopper.showStock = a;
73 extra.showStock = a;
74 });
75 base.OnSetContextMenu(m);
76 }
77
78 // Token: 0x040018CA RID: 6346
79 public static WidgetNotice Instance;
80
81 // Token: 0x040018CB RID: 6347
82 public Transform H1;
83
84 // Token: 0x040018CC RID: 6348
85 public Transform H2;
86
87 // Token: 0x040018CD RID: 6349
88 public Transform H3;
89
90 // Token: 0x040018CE RID: 6350
91 public Transform H4;
92
93 // Token: 0x040018CF RID: 6351
94 public ItemNotice itemBattle;
95
96 // Token: 0x040018D0 RID: 6352
97 public ItemNotice itemGuest;
98
99 // Token: 0x040018D1 RID: 6353
100 [NonSerialized]
101 public int battles;
102
103 // Token: 0x040018D2 RID: 6354
104 [NonSerialized]
105 public int guests;
106
107 // Token: 0x02000B98 RID: 2968
108 public class Extra
109 {
110 // Token: 0x04002E7D RID: 11901
111 public bool showStock;
112 }
113}
Definition Chara.cs:12
Definition EMono.cs:6