Elin Decompiled Documentation EA 23.219 Nightly
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 42 of file WidgetStats.cs.

43 {
44 Instance = this;
46 {
47 stats = () => EMono.pc.hunger
48 });
50 {
51 stats = () => EMono.pc.burden
52 });
54 {
55 stats = () => EMono.pc.depression
56 });
58 {
59 stats = () => EMono.pc.bladder
60 });
62 {
63 stats = () => EMono.pc.hygiene
64 });
66 {
67 stats = () => EMono.pc.sleepiness
68 });
70 {
71 stats = () => EMono.pc.stamina
72 });
74 }
ItemNotice Add(BaseNotification n, Transform parent=null)
Stats depression
Definition: Chara.cs:1142
Stats sleepiness
Definition: Chara.cs:1150
Stats hygiene
Definition: Chara.cs:1146
Stats hunger
Definition: Chara.cs:1136
Stats bladder
Definition: Chara.cs:1144
Stats stamina
Definition: Chara.cs:1140
Stats burden
Definition: Chara.cs:1138
Definition: EMono.cs:4
static Chara pc
Definition: EMono.cs:13
static WidgetStats Instance
Definition: WidgetStats.cs:15

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 29 of file WidgetStats.cs.

30 {
31 return new Extra();
32 }

◆ OnRefresh()

override void WidgetStats.OnRefresh ( )
inlinevirtual

Reimplemented from BaseWidgetNotice.

Definition at line 76 of file WidgetStats.cs.

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

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 146 of file WidgetStats.cs.

147 {
148 UIContextMenu uIContextMenu = m.AddChild("setting");
149 uIContextMenu.AddToggle("sort_always", extra.sort, delegate(bool a)
150 {
151 extra.sort = a;
152 RefreshAll();
153 });
154 uIContextMenu.AddToggle("sort_ascending", extra.sort_ascend, delegate(bool a)
155 {
156 extra.sort_ascend = a;
157 RefreshAll();
158 });
160 }
UIContextMenuItem AddToggle(string idLang="", bool isOn=false, UnityAction< bool > action=null)
UIContextMenu AddChild(string idLang, TextAnchor anchor)
Extra extra
Definition: WidgetStats.cs:27
static void RefreshAll()
Definition: WidgetStats.cs:34
void SetBaseContextMenu(UIContextMenu m)
Definition: Widget.cs:608

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

◆ RefreshAll()

static void WidgetStats.RefreshAll ( )
inlinestatic

Definition at line 34 of file WidgetStats.cs.

35 {
36 if ((bool)Instance)
37 {
39 }
40 }

References BaseWidgetNotice._RefreshAll(), and Instance.

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

Member Data Documentation

◆ cds

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

Definition at line 19 of file WidgetStats.cs.

Referenced by OnRefresh().

◆ conditions

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

Definition at line 17 of file WidgetStats.cs.

Referenced by OnRefresh().

◆ Instance

◆ moldBuff

ItemNotice WidgetStats.moldBuff

Definition at line 21 of file WidgetStats.cs.

Referenced by NotificationBuff.GetMold().

◆ moldCooldown

ItemNotice WidgetStats.moldCooldown

Definition at line 25 of file WidgetStats.cs.

Referenced by NotificationCooldown.GetMold().

◆ moldStance

ItemNotice WidgetStats.moldStance

Definition at line 23 of file WidgetStats.cs.

Referenced by NotificationStance.GetMold().

Property Documentation

◆ extra

Extra WidgetStats.extra
get

Definition at line 27 of file WidgetStats.cs.

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


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