Elin Decompiled Documentation EA 23.197 Nightly Patch 1
Loading...
Searching...
No Matches
WidgetStats Class Reference
Inheritance diagram for WidgetStats:
BaseWidgetNotice Widget EMono IChangeResolution ISkinRoot

Classes

class  Extra
 

Public Member Functions

override object CreateExtra ()
 
override void _OnActivate ()
 
override void OnRefresh ()
 
override void OnSetContextMenu (UIContextMenu m)
 
- Public Member Functions inherited from BaseWidgetNotice
sealed override void OnActivate ()
 
virtual void _OnActivate ()
 
void _RefreshAll ()
 
void Sort ()
 
virtual void OnRefresh ()
 
ItemNotice Add (BaseNotification n, Transform parent=null)
 
void Remove (BaseNotification n)
 
override void OnFlip ()
 
override void OnSetContextMenu (UIContextMenu m)
 
void RefreshLayout ()
 
override void OnApplySkin ()
 
- Public Member Functions inherited from Widget
void Test ()
 
bool IsInRightMode ()
 
void Activate ()
 
void RefreshOrder ()
 
virtual void OnActivate ()
 
virtual object CreateExtra ()
 
void Deactivate ()
 
virtual void OnDeactivate ()
 
void Close ()
 
void Reactivate ()
 
virtual void OnManagerActivate ()
 
virtual void OnManagerDeactivate ()
 
void SetAnchor (RectPosition p)
 
void SetPivot (RectPosition p)
 
virtual void OnChangePivot ()
 
void UpdateConfig ()
 
virtual void OnUpdateConfig ()
 
void ClampToScreen ()
 
virtual void OnChangeResolution ()
 
void OnChangePosition ()
 
virtual void OnChangeActionMode ()
 
virtual void OnFlip ()
 
bool IsAlignTop ()
 
Layer AddLayer (Layer l, Transform trans)
 
void RefreshTipPivotPosition ()
 
SkinSet GetSkin ()
 
SkinConfig GetSkinConfig ()
 
void SetSkin (int id, int v=0)
 
void TestSkin ()
 
virtual void ApplySkin ()
 
virtual void OnApplySkin ()
 
void InstantiateDeco (SkinDeco deco)
 
void AddDeco (SkinDeco deco)
 
void RemoveDeco (SkinDeco deco)
 
virtual bool CanShowContextMenu ()
 
void ShowContextMenu ()
 
void SetBaseContextMenu (UIContextMenu m)
 
virtual void OnSetContextMenu (UIContextMenu m)
 
void SetGridContextMenu (UIContextMenu m)
 
void SoundActivate ()
 
void OnChangeResolution ()
 
SkinSet GetSkin ()
 
SkinConfig GetSkinConfig ()
 

Static Public Member Functions

static void RefreshAll ()
 
- Static Public Member Functions inherited from EMono
static int rnd (int a)
 

Public Attributes

List< NotificationConditionconditions = new List<NotificationCondition>()
 
List< NotificationCooldowncds = new List<NotificationCooldown>()
 
ItemNotice moldBuff
 
ItemNotice moldStance
 
ItemNotice moldCooldown
 
- Public Attributes inherited from BaseWidgetNotice
Sprite[] sprites
 
List< BaseNotificationlist = new List<BaseNotification>()
 
VerticalLayoutGroup layout
 
VerticalLayoutGroup layout2
 
ItemNotice mold
 
- Public Attributes inherited from Widget
Image imageBG
 
SoundData soundActivate
 
UIDragPanel dragPanel
 
RectTransform tipPivotLeft
 
RectTransform tipPivotRight
 

Static Public Attributes

static WidgetStats Instance
 
- Static Public Attributes inherited from EMono
static Core core
 

Properties

Extra extra [get]
 
- Properties inherited from Widget
string ID [get]
 
Config config [get]
 
SkinRoot skinRoot [get]
 
bool IsSealed [get]
 
virtual bool ShowStyleMenu [get]
 
virtual bool AlwaysTop [get]
 
virtual bool IsStaticPosition [get]
 
virtual bool AlwaysBottom [get]
 
virtual Type SetSiblingAfter [get]
 
virtual bool ShowInBuildMode [get]
 
virtual bool RightClickToClose [get]
 
virtual bool AllowRightClickToClose [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

- Public Types inherited from Widget
enum  WidgetType { Default , ZoomMenu }
 
enum  State { Active , Inactive }
 
- Protected Member Functions inherited from Widget
void ClampToScreenEnsured (Component c, Vector2 anchoredPos)
 
void ClampToScreen (RectTransform rect, float margin=10f)
 
- Protected Attributes inherited from BaseWidgetNotice
bool dirty
 
- Protected Attributes inherited from Widget
bool flip
 

Detailed Description

Definition at line 4 of file WidgetStats.cs.

Member Function Documentation

◆ _OnActivate()

override void WidgetStats._OnActivate ( )
inlinevirtual

Reimplemented from BaseWidgetNotice.

Definition at line 39 of file WidgetStats.cs.

40 {
41 Instance = this;
43 {
44 stats = () => EMono.pc.hunger
45 });
47 {
48 stats = () => EMono.pc.burden
49 });
51 {
52 stats = () => EMono.pc.depression
53 });
55 {
56 stats = () => EMono.pc.bladder
57 });
59 {
60 stats = () => EMono.pc.hygiene
61 });
63 {
64 stats = () => EMono.pc.sleepiness
65 });
67 {
68 stats = () => EMono.pc.stamina
69 });
71 }
ItemNotice Add(BaseNotification n, Transform parent=null)
Stats depression
Definition: Chara.cs:1130
Stats sleepiness
Definition: Chara.cs:1138
Stats hygiene
Definition: Chara.cs:1134
Stats hunger
Definition: Chara.cs:1124
Stats bladder
Definition: Chara.cs:1132
Stats stamina
Definition: Chara.cs:1128
Stats burden
Definition: Chara.cs:1126
Definition: EMono.cs:4
static Chara pc
Definition: EMono.cs:13
static WidgetStats Instance
Definition: WidgetStats.cs:12

References BaseWidgetNotice.Add(), Chara.bladder, Chara.burden, Chara.depression, Chara.hunger, Chara.hygiene, Instance, EMono.pc, Chara.sleepiness, and Chara.stamina.

◆ CreateExtra()

override object WidgetStats.CreateExtra ( )
inlinevirtual

Reimplemented from Widget.

Definition at line 26 of file WidgetStats.cs.

27 {
28 return new Extra();
29 }

◆ OnRefresh()

override void WidgetStats.OnRefresh ( )
inlinevirtual

Reimplemented from BaseWidgetNotice.

Definition at line 73 of file WidgetStats.cs.

74 {
75 conditions.ForeachReverse(delegate(NotificationCondition a)
76 {
77 if (a.ShouldRemove())
78 {
79 conditions.Remove(a);
80 Remove(a);
81 dirty = true;
82 }
83 });
84 cds.ForeachReverse(delegate(NotificationCooldown a)
85 {
86 if (a.ShouldRemove())
87 {
88 cds.Remove(a);
89 Remove(a);
90 dirty = true;
91 }
92 });
93 foreach (Condition condition in EMono.pc.conditions)
94 {
95 if (!condition.ShowInWidget)
96 {
97 continue;
98 }
99 bool flag = true;
100 foreach (NotificationCondition condition2 in conditions)
101 {
102 if (condition2.condition == condition)
103 {
104 flag = false;
105 break;
106 }
107 }
108 if (flag)
109 {
110 NotificationCondition notificationCondition = condition.CreateNotification() as NotificationCondition;
111 Add(notificationCondition);
112 conditions.Add(notificationCondition);
113 }
114 }
115 if (EMono.pc._cooldowns == null)
116 {
117 return;
118 }
119 foreach (int cooldown in EMono.pc._cooldowns)
120 {
121 int num = cooldown / 1000;
122 bool flag2 = true;
123 foreach (NotificationCooldown cd in cds)
124 {
125 if (cd.idEle == num)
126 {
127 flag2 = false;
128 break;
129 }
130 }
131 if (flag2)
132 {
133 NotificationCooldown notificationCooldown = new NotificationCooldown
134 {
135 idEle = num
136 };
137 Add(notificationCooldown);
138 cds.Add(notificationCooldown);
139 }
140 }
141 }
virtual bool ShowInWidget
Definition: BaseStats.cs:23
List< int > _cooldowns
Definition: Chara.cs:58
List< Condition > conditions
Definition: Chara.cs:209
override BaseNotification CreateNotification()
Definition: Condition.cs:30
override bool ShouldRemove()
List< NotificationCondition > conditions
Definition: WidgetStats.cs:14
List< NotificationCooldown > cds
Definition: WidgetStats.cs:16

References Chara._cooldowns, BaseWidgetNotice.Add(), cds, NotificationCondition.condition, Chara.conditions, conditions, Condition.CreateNotification(), NotificationCooldown.idEle, EMono.pc, NotificationCondition.ShouldRemove(), and BaseStats.ShowInWidget.

◆ OnSetContextMenu()

override void WidgetStats.OnSetContextMenu ( UIContextMenu  m)
inlinevirtual

Reimplemented from BaseWidgetNotice.

Definition at line 143 of file WidgetStats.cs.

144 {
145 m.AddChild("setting").AddToggle("sort_always", extra.sort, delegate(bool a)
146 {
147 extra.sort = a;
148 });
150 }
UIContextMenuItem AddToggle(string idLang="", bool isOn=false, UnityAction< bool > action=null)
UIContextMenu AddChild(string idLang, TextAnchor anchor)
Extra extra
Definition: WidgetStats.cs:24
void SetBaseContextMenu(UIContextMenu m)
Definition: Widget.cs:608

References UIContextMenu.AddChild(), UIContextMenu.AddToggle(), extra, Widget.SetBaseContextMenu(), and WidgetStats.Extra.sort.

◆ RefreshAll()

static void WidgetStats.RefreshAll ( )
inlinestatic

Definition at line 31 of file WidgetStats.cs.

32 {
33 if ((bool)Instance)
34 {
36 }
37 }

References BaseWidgetNotice._RefreshAll(), and Instance.

Referenced by NotificationCondition.OnClick().

Member Data Documentation

◆ cds

List<NotificationCooldown> WidgetStats.cds = new List<NotificationCooldown>()

Definition at line 16 of file WidgetStats.cs.

Referenced by OnRefresh().

◆ conditions

List<NotificationCondition> WidgetStats.conditions = new List<NotificationCondition>()

Definition at line 14 of file WidgetStats.cs.

Referenced by OnRefresh().

◆ Instance

◆ moldBuff

ItemNotice WidgetStats.moldBuff

Definition at line 18 of file WidgetStats.cs.

Referenced by NotificationBuff.GetMold().

◆ moldCooldown

ItemNotice WidgetStats.moldCooldown

Definition at line 22 of file WidgetStats.cs.

Referenced by NotificationCooldown.GetMold().

◆ moldStance

ItemNotice WidgetStats.moldStance

Definition at line 20 of file WidgetStats.cs.

Referenced by NotificationStance.GetMold().

Property Documentation

◆ extra

Extra WidgetStats.extra
get

Definition at line 24 of file WidgetStats.cs.

Referenced by NotificationCondition.GetSortVal(), and OnSetContextMenu().


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