Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
LayerHome Class Reference
Inheritance diagram for LayerHome:
ELayer Layer IUISkin

Public Member Functions

override bool HeaderIsListOf (int id)
 
override void OnInit ()
 
override void OnSwitchContent (Window window)
 
void RefreshChronicle ()
 
void RefreshTech (bool listComplete=false)
 
void RefreshFocus ()
 
void RefreshFeat ()
 
void RefreshAreas ()
 
void RefreshSpots ()
 
- Public Member Functions inherited from ELayer
override void OnBeforeAddLayer ()
 
void InitInspector ()
 
sealed override void Init ()
 
override void OnAfterAddLayer ()
 
void TryShowHelp ()
 
void AddLayerToUI (string id)
 
void TryShowHint (string _langHint=null)
 
void TalkHomeMemeber (string id)
 
void TalkMaid (string id)
 
override void OnRightClick ()
 
- Public Member Functions inherited from Layer
virtual string GetTextHeader (Window window)
 
virtual bool HeaderIsListOf (int id)
 
virtual void Init ()
 
virtual void OnInit ()
 
virtual void OnAfterInit ()
 
virtual void ApplySkin ()
 
void ShowScreenLock (string id)
 
void UpdateInput ()
 
virtual void OnUpdateInput ()
 
virtual void OnRightClick ()
 
virtual bool OnBack ()
 
virtual void OnChangeLayer ()
 
virtual void OnCreate ()
 
void _AddLayer (string id)
 
Layer AddLayer (string id)
 
AddLayer< T > ()
 
AddLayer< T > (string id)
 
AddLayerDontCloseOthers< T > ()
 
Layer AddLayerDontCloseOthers (Layer l)
 
GetOrAddLayer< T > ()
 
virtual void OnBeforeAddLayer ()
 
virtual void OnAfterAddLayer ()
 
Layer AddLayer (Layer l)
 
void ToggleLayer (string id)
 
ToggleLayer< T > (string id=null)
 
void WaitAndClose ()
 
void OnClickClose ()
 
virtual void Close ()
 
void CloseLayers ()
 
void RemoveLayers (bool removeImportant=false)
 
bool RemoveLayer< T > ()
 
void RemoveLayer (Layer l)
 
virtual void OnKill ()
 
Layer SetOnKill (Action action)
 
void DisableClose ()
 
void Delay (float duration=0.05f)
 
Layer SetDelay (float d)
 
Layer GetLayer (string id)
 
GetLayer< T > (bool fromTop=false)
 
Layer GetTopLayer ()
 
void SwitchContent (int idWindow, int i)
 
virtual void OnSwitchContent (Window window)
 
Layer SetTitles (string langList, string idHeaderRow=null)
 
bool IsBlockWidgetClick ()
 
bool IsHideHud ()
 
bool IsAllowGeneralInput ()
 
bool IsUseBlur ()
 
bool IsPointerOnLayer ()
 
void ApplySkin ()
 

Public Attributes

UIList listArea
 
UIList listTech
 
UIList listTech2
 
UIList listFeat
 
UIList listFeat2
 
UIList listFeat3
 
FactionBranch branch
 
UIHomeInfo info
 
- Public Attributes inherited from Layer
Option option
 
UnityEvent onKill
 
Anime animeIn
 
Anime animeOut
 
bool closeOthers
 
bool defaultActionMode = true
 
Button screenLock
 
Layer parent
 
string idLayer
 
List< Layerlayers = new List<Layer>()
 
Vector2 lastParentPos
 
List< Windowwindows = new List<Window>()
 
string langHint
 

Static Public Attributes

static LayerHome Instance
 
const int TabResearch = 1
 
const int TabPolicy = 2
 
const int TabPopulation = 3
 
const int TabFeat = 4
 
- Static Public Attributes inherited from Layer
static int skipInput
 
static bool closeOnRightClick
 
static bool rightClicked
 
static bool cancelKeyDown
 
static bool ignoreSounds
 
static Transform blurStopInstance
 
static string[] searchPath = new string[3] { "Layer", "Layer/Dialog", "Layer/LayerHome" }
 

Additional Inherited Members

- Static Public Member Functions inherited from ELayer
static int rnd (int a)
 
- Static Public Member Functions inherited from Layer
static T Create< T > ()
 
static T Create< T > (string path)
 
static Layer Create (string path)
 
- Protected Member Functions inherited from ELayer
sealed override void _Close ()
 
sealed override void Kill ()
 
- Protected Member Functions inherited from Layer
virtual void Awake ()
 
virtual void _Close ()
 
virtual void Kill ()
 
- Protected Attributes inherited from Layer
RectTransform _rect
 
bool isDestroyed
 
- Properties inherited from ELayer
static Core core [get]
 
static Game game [get]
 
static bool AdvMode [get]
 
static Player player [get]
 
static Chara pc [get]
 
static FactionBranch Branch [get]
 
static Faction Home [get]
 
static UI ui [get]
 
static Map _map [get]
 
static Zone _zone [get]
 
static Scene scene [get]
 
static BaseGameScreen screen [get]
 
static CoreConfig config [get]
 
static GameSetting setting [get]
 
static ColorProfile Colors [get]
 
static SourceManager sources [get]
 
static World world [get]
 
static SoundManager Sound [get]
 
static CoreDebug debug [get]
 
bool IsFloat [get]
 
virtual string IdHelp [get]
 
- Properties inherited from Layer
Layer TopLayer [get]
 
string uid [get]
 
virtual RectTransform rectLayers [get]
 
virtual bool blockWidgetClick [get]
 

Detailed Description

Definition at line 4 of file LayerHome.cs.

Member Function Documentation

◆ HeaderIsListOf()

override bool LayerHome.HeaderIsListOf ( int  id)
inlinevirtual

Reimplemented from Layer.

Definition at line 32 of file LayerHome.cs.

33 {
34 return id != 0;
35 }

◆ OnInit()

override void LayerHome.OnInit ( )
inlinevirtual

Reimplemented from Layer.

Definition at line 37 of file LayerHome.cs.

38 {
40 Instance = this;
41 }
Definition: ELayer.cs:4
static FactionBranch Branch
Definition: ELayer.cs:17
FactionBranch branch
Definition: LayerHome.cs:20
static LayerHome Instance
Definition: LayerHome.cs:6

References ELayer.Branch, branch, and Instance.

◆ OnSwitchContent()

override void LayerHome.OnSwitchContent ( Window  window)
inlinevirtual

Reimplemented from Layer.

Definition at line 43 of file LayerHome.cs.

44 {
45 if (window.setting.tabs.Count == 0)
46 {
47 return;
48 }
49 WindowMenu menuLeft = window.menuLeft;
50 menuLeft.Clear();
51 if (ELayer.player.shippingResults.Count > 0)
52 {
53 menuLeft.AddButtonSimple(() => "shipping_result".lang(), delegate
54 {
55 ELayer.ui.AddLayer<LayerShippingResult>().Show();
56 });
57 }
58 switch (window.CurrentTab.idLang)
59 {
60 case "top":
61 info.Refresh();
62 break;
63 case "skills":
65 break;
66 case "chronicle":
68 break;
69 case "population":
70 break;
71 }
72 }
static Player player
Definition: ELayer.cs:13
static UI ui
Definition: ELayer.cs:21
void RefreshChronicle()
Definition: LayerHome.cs:74
void RefreshFeat()
Definition: LayerHome.cs:109
UIHomeInfo info
Definition: LayerHome.cs:22
List< ShippingResult > shippingResults
Definition: Player.cs:925
void Refresh()
Definition: UIHomeInfo.cs:114
void Clear()
Definition: WindowMenu.cs:44
UIButton AddButtonSimple(Func< string > funcText, Action< UIButton > onClick=null, Sprite sprite=null, string idButton="Simple")
Definition: WindowMenu.cs:70
List< Tab > tabs
Definition: Window.cs:81
Setting.Tab CurrentTab
Definition: Window.cs:787
Setting setting
Definition: Window.cs:606
WindowMenu menuLeft
Definition: Window.cs:700

References WindowMenu.AddButtonSimple(), WindowMenu.Clear(), Window.CurrentTab, info, Window.menuLeft, ELayer.player, UIHomeInfo.Refresh(), RefreshChronicle(), RefreshFeat(), Window.setting, Player.shippingResults, Window.Setting.tabs, and ELayer.ui.

◆ RefreshAreas()

void LayerHome.RefreshAreas ( )
inline

Definition at line 204 of file LayerHome.cs.

205 {
206 listArea.callbacks = new UIList.Callback<Area, ItemGeneral>
207 {
208 onClick = delegate
209 {
210 },
211 onInstantiate = delegate(Area a, ItemGeneral b)
212 {
213 _ = b.button1;
214 b.SetMainText(a.Name);
215 b.AddSubButton(ELayer.core.refs.icons.go, delegate
216 {
217 ELayer.screen.Focus(a.points[0]);
218 }, "tFocus");
219 b.Build();
220 },
221 onList = delegate
222 {
223 foreach (Area item in ELayer._map.rooms.listArea)
224 {
226 }
227 },
228 onSort = (Area a, UIList.SortMode m) => a.GetSortVal(m),
229 onRefresh = null
230 };
231 listArea.List();
232 }
Definition: Area.cs:4
int GetSortVal(UIList.SortMode m)
Definition: BaseArea.cs:161
virtual string Name
Definition: BaseArea.cs:37
Sprite go
Definition: CoreRef.cs:82
Icons icons
Definition: CoreRef.cs:339
CoreRef refs
Definition: Core.cs:51
static Core core
Definition: ELayer.cs:7
static Map _map
Definition: ELayer.cs:23
void Build()
Definition: ItemGeneral.cs:161
void SetMainText(string lang, Sprite sprite=null, bool disableMask=true)
Definition: ItemGeneral.cs:101
UIButton AddSubButton(Sprite sprite, Action action, string lang=null, Action< UITooltip > onTooltip=null)
Definition: ItemGeneral.cs:76
UIList listArea
Definition: LayerHome.cs:8
RoomManager rooms
Definition: Map.cs:31
List< Area > listArea
Definition: RoomManager.cs:10
UIButton button1
Definition: UIItem.cs:18
Definition: UIList.cs:9
SortMode
Definition: UIList.cs:27
override void Add(object item)
Definition: UIList.cs:302
override void List()
Definition: UIList.cs:717

References ELayer._map, UIList.Add(), ItemGeneral.AddSubButton(), ItemGeneral.Build(), UIItem.button1, ELayer.core, BaseArea.GetSortVal(), CoreRef.Icons.go, CoreRef.icons, item, UIList.List(), RoomManager.listArea, BaseArea.Name, Core.refs, Map.rooms, and ItemGeneral.SetMainText().

◆ RefreshChronicle()

void LayerHome.RefreshChronicle ( )
inline

Definition at line 74 of file LayerHome.cs.

75 {
76 }

Referenced by OnSwitchContent().

◆ RefreshFeat()

void LayerHome.RefreshFeat ( )
inline

Definition at line 109 of file LayerHome.cs.

110 {
111 listFeat.callbacks = new UIList.Callback<Element, ButtonElement>
112 {
113 onClick = delegate(Element a, ButtonElement b)
114 {
116 int currency = ELayer.pc.GetCurrency("money2");
117 if (p == 0 || p > currency || a.ValueWithoutLink == 0 || a.source.cost[0] == 0)
118 {
119 SE.Beep();
120 }
121 else
122 {
123 Dialog.YesNo("dialogUpgradeTech".lang(a.Name), delegate
124 {
125 SE.Pay();
126 ELayer.pc.ModCurrency(-p, "money2");
127 ELayer.Branch.elements.ModBase(a.id, 1);
128 listFeat.List();
129 ELayer.Branch.resources.SetDirty();
130 ELayer.core.game.player.hotbars.ResetHotbar(2);
131 if ((bool)WidgetHotbar.HotBarMainMenu)
132 {
133 WidgetHotbar.HotBarMainMenu.RebuildPage();
134 }
136 {
137 WidgetMenuPanel.Instance.OnChangeActionMode();
138 }
139 });
140 }
141 },
142 onInstantiate = delegate(Element a, ButtonElement b)
143 {
145 },
146 onList = delegate
147 {
148 foreach (Element item in branch.elements.dict.Values.Where((Element b) => (b.Value > 0 || b.vBase > 0) && b.source.category != "policy" && b.source.category != "landfeat" && !b.HasTag("hidden")))
149 {
151 }
152 },
153 onSort = (Element a, UIList.SortMode m) => a.GetSortVal(m),
154 onRefresh = null
155 };
156 listFeat.List();
157 listFeat2.callbacks = new UIList.Callback<Element, ButtonElement>
158 {
159 onClick = delegate
160 {
161 },
162 onInstantiate = delegate(Element a, ButtonElement b)
163 {
165 },
166 onList = delegate
167 {
168 foreach (Element item2 in branch.elements.dict.Values.Where((Element b) => b.source.category == "policy"))
169 {
170 listFeat2.Add(item2);
171 }
172 },
173 onSort = (Element a, UIList.SortMode m) => a.GetSortVal(m),
174 onRefresh = null
175 };
176 listFeat2.List();
177 listFeat3.callbacks = new UIList.Callback<Element, ButtonElement>
178 {
179 onClick = delegate
180 {
181 },
182 onInstantiate = delegate(Element a, ButtonElement b)
183 {
185 },
186 onList = delegate
187 {
188 IEnumerable<Element> enumerable = branch.elements.dict.Values;
189 if (branch.HasNetwork)
190 {
191 enumerable = enumerable.Concat(ELayer.pc.faction.elements.dict.Values);
192 }
193 foreach (Element item3 in enumerable.Where((Element b) => (b.Value > 0 || b.vBase > 0) && b.source.category == "landfeat" && !b.HasTag("hidden")))
194 {
195 listFeat3.Add(item3);
196 }
197 },
198 onSort = (Element a, UIList.SortMode m) => a.GetSortVal(m),
199 onRefresh = null
200 };
201 listFeat3.List();
202 }
@ currency
if(item3.idFile==idFirstFile &&item3.id==idFirstTopic)
Definition: UIBook.cs:627
void SetElement(Element _e, ElementContainer _owner, Mode _mode=Mode.Skill)
int GetCurrency(string id="money")
Definition: Card.cs:3652
Faction faction
Definition: Chara.cs:412
Definition: Dialog.cs:7
static Dialog YesNo(string langDetail, Action actionYes, Action actionNo=null, string langYes="yes", string langNo="no")
Definition: Dialog.cs:244
static Chara pc
Definition: ELayer.cs:15
static Zone _zone
Definition: ELayer.cs:25
Dictionary< int, Element > dict
int ValueWithoutLink
Definition: ELEMENT.cs:284
int vBase
Definition: ELEMENT.cs:242
SourceElement.Row source
Definition: ELEMENT.cs:263
bool HasTag(string tag)
Definition: ELEMENT.cs:463
int GetSortVal(UIList.SortMode m)
Definition: ELEMENT.cs:834
int Value
Definition: ELEMENT.cs:282
virtual string Name
Definition: ELEMENT.cs:294
int GetTechUpgradeCost(Element e)
ElementContainerZone elements
ElementContainerZone elements
Definition: FACTION.cs:139
UIList listFeat
Definition: LayerHome.cs:14
UIList listFeat3
Definition: LayerHome.cs:18
UIList listFeat2
Definition: LayerHome.cs:16
static WidgetMenuPanel Instance
ElementContainerZone elements
Definition: Zone.cs:43

References ELayer._zone, UIList.Add(), ELayer.Branch, branch, currency, ElementContainer.dict, FactionBranch.elements, Zone.elements, Card.GetCurrency(), Element.GetSortVal(), FactionBranch.GetTechUpgradeCost(), Element.HasTag(), if(), WidgetMenuPanel.Instance, item, listFeat, Element.Name, ELayer.pc, ButtonElement.SetElement(), Element.source, Element.Value, Element.ValueWithoutLink, Element.vBase, and Dialog.YesNo().

Referenced by OnSwitchContent().

◆ RefreshFocus()

void LayerHome.RefreshFocus ( )
inline

Definition at line 100 of file LayerHome.cs.

101 {
102 ItemResearch[] componentsInChildren = listTech.GetComponentsInChildren<ItemResearch>();
103 foreach (ItemResearch itemResearch in componentsInChildren)
104 {
105 itemResearch.goFocus.SetActive(itemResearch.plan == branch.researches.focused);
106 }
107 }
ResearchManager researches
ResearchPlan plan
Definition: ItemResearch.cs:9
Image goFocus
Definition: ItemResearch.cs:7
UIList listTech
Definition: LayerHome.cs:10
ResearchPlan focused

References branch, ResearchManager.focused, ItemResearch.goFocus, listTech, ItemResearch.plan, and FactionBranch.researches.

Referenced by RefreshTech().

◆ RefreshSpots()

void LayerHome.RefreshSpots ( )
inline

Definition at line 234 of file LayerHome.cs.

235 {
236 listArea.Clear();
237 listArea.callbacks = new UIList.Callback<Trait, ItemGeneral>
238 {
239 onClick = delegate
240 {
241 },
242 onInstantiate = delegate(Trait a, ItemGeneral b)
243 {
244 _ = b.button1;
245 b.SetMainText(a.Name);
246 b.AddSubButton(ELayer.core.refs.icons.go, delegate
247 {
248 ELayer.screen.Focus(a.GetPoint());
249 }, "tFocus");
250 b.Build();
251 },
252 onList = delegate
253 {
254 foreach (Card item in ELayer._map.Installed.all)
255 {
256 if (item.trait.IsSpot)
257 {
258 listArea.Add(item.trait);
259 }
260 }
261 },
262 onSort = (Trait a, UIList.SortMode m) => a.GetSortVal(m),
263 onRefresh = null
264 };
265 listArea.List();
266 }
Definition: Card.cs:11
PropsInstalled Installed
Definition: Map.cs:123
PropSet all
Definition: Props.cs:8
Definition: Trait.cs:7
int GetSortVal(UIList.SortMode m)
Definition: Trait.cs:908
virtual string Name
Definition: Trait.cs:46
override void Clear()
Definition: UIList.cs:349

References ELayer._map, UIList.Add(), ItemGeneral.AddSubButton(), Props.all, ItemGeneral.Build(), UIItem.button1, UIList.Clear(), ELayer.core, Trait.GetSortVal(), CoreRef.Icons.go, CoreRef.icons, Map.Installed, item, UIList.List(), Trait.Name, Core.refs, and ItemGeneral.SetMainText().

◆ RefreshTech()

void LayerHome.RefreshTech ( bool  listComplete = false)
inline

Definition at line 78 of file LayerHome.cs.

79 {
80 UIList list = (listComplete ? listTech2 : listTech);
81 list.sortMode = ELayer.player.pref.sortResearch;
82 list.callbacks = new UIList.Callback<ResearchPlan, ItemResearch>
83 {
84 onInstantiate = delegate
85 {
86 },
87 onList = delegate
88 {
89 foreach (ResearchPlan item in listComplete ? branch.researches.finished : branch.researches.plans)
90 {
91 list.Add(item);
92 }
93 },
94 onSort = (ResearchPlan a, UIList.SortMode m) => a.GetSortVal(m)
95 };
96 list.List();
98 }
UIList listTech2
Definition: LayerHome.cs:12
void RefreshFocus()
Definition: LayerHome.cs:100
UIList.SortMode sortResearch
Definition: Player.cs:47
Pref pref
Definition: Player.cs:814
List< ResearchPlan > finished
List< ResearchPlan > plans
int GetSortVal(UIList.SortMode m)
Definition: ResearchPlan.cs:45

References UIList.Add(), branch, ResearchManager.finished, ResearchPlan.GetSortVal(), item, UIList.List(), listTech, listTech2, ResearchManager.plans, ELayer.player, Player.pref, RefreshFocus(), FactionBranch.researches, and Player.Pref.sortResearch.

Member Data Documentation

◆ branch

FactionBranch LayerHome.branch

Definition at line 20 of file LayerHome.cs.

Referenced by OnInit(), RefreshFeat(), RefreshFocus(), and RefreshTech().

◆ info

UIHomeInfo LayerHome.info

Definition at line 22 of file LayerHome.cs.

Referenced by OnSwitchContent().

◆ Instance

LayerHome LayerHome.Instance
static

Definition at line 6 of file LayerHome.cs.

Referenced by OnInit().

◆ listArea

UIList LayerHome.listArea

Definition at line 8 of file LayerHome.cs.

◆ listFeat

UIList LayerHome.listFeat

Definition at line 14 of file LayerHome.cs.

Referenced by RefreshFeat().

◆ listFeat2

UIList LayerHome.listFeat2

Definition at line 16 of file LayerHome.cs.

◆ listFeat3

UIList LayerHome.listFeat3

Definition at line 18 of file LayerHome.cs.

◆ listTech

UIList LayerHome.listTech

Definition at line 10 of file LayerHome.cs.

Referenced by RefreshFocus(), and RefreshTech().

◆ listTech2

UIList LayerHome.listTech2

Definition at line 12 of file LayerHome.cs.

Referenced by RefreshTech().

◆ TabFeat

const int LayerHome.TabFeat = 4
static

Definition at line 30 of file LayerHome.cs.

◆ TabPolicy

const int LayerHome.TabPolicy = 2
static

Definition at line 26 of file LayerHome.cs.

◆ TabPopulation

const int LayerHome.TabPopulation = 3
static

Definition at line 28 of file LayerHome.cs.

◆ TabResearch

const int LayerHome.TabResearch = 1
static

Definition at line 24 of file LayerHome.cs.


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