Elin Decompiled Documentation EA 23.295 Stable Patch 2
Loading...
Searching...
No Matches
LayerPeople Class Reference
Inheritance diagram for LayerPeople:
ELayer Layer IUISkin

Public Types

enum  Mode {
  Default , Select , Double , Hire ,
  Party
}
 
enum  ShowMode { Job , Race , Work }
 

Public Member Functions

override bool HeaderIsListOf (int id)
 
override void OnInit ()
 
LayerPeople SetOnConfirm (Action _onConfirm)
 
void Confirm ()
 
override void OnKill ()
 
override void OnSwitchContent (Window window)
 
void InitList (ListOwner o)
 
- 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 ()
 

Static Public Member Functions

static LayerPeople Create (Mode mode)
 
static LayerPeople Create< T > (string langHint=null, Chara owner=null)
 
static LayerPeople CreateReserve ()
 
static LayerPeople CreateParty ()
 
static LayerPeople CreateBed (TraitBed bed)
 
static LayerPeople CreateSelectEmbarkMembers (List< Chara > settlers)
 
static LayerPeople Create (BaseListPeople list)
 
static LayerPeople CreateSelect (string langHeader, string langHint, Action< BaseList > onList, Action< Chara > onClick, Func< Chara, string > _onShowSubText=null)
 
- 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)
 

Public Attributes

ShowMode showMode
 
LayoutGroup layoutMenu
 
UISearchPeople search
 
Action onConfirm
 
UIMultiList multi
 
- 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 Chara slaveToBuy
 
- 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

- 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 5 of file LayerPeople.cs.

Member Enumeration Documentation

◆ Mode

Enumerator
Default 
Select 
Double 
Hire 
Party 

Definition at line 7 of file LayerPeople.cs.

◆ ShowMode

Enumerator
Job 
Race 
Work 

Definition at line 16 of file LayerPeople.cs.

Member Function Documentation

◆ Confirm()

void LayerPeople.Confirm ( )
inline

Definition at line 69 of file LayerPeople.cs.

70 {
71 if (onConfirm != null)
72 {
73 onConfirm();
74 }
75 Close();
76 }
Action onConfirm
Definition: LayerPeople.cs:31
virtual void Close()
Definition: Layer.cs:463

References Layer.Close(), and onConfirm.

◆ Create() [1/2]

static LayerPeople LayerPeople.Create ( BaseListPeople  list)
inlinestatic

Definition at line 201 of file LayerPeople.cs.

202 {
203 LayerPeople layerPeople = Create(Mode.Select);
204 layerPeople.multi.AddOwner(0, list);
205 return layerPeople;
206 }
static LayerPeople Create(Mode mode)
Definition: LayerPeople.cs:106
UIMultiList multi
Definition: LayerPeople.cs:33
void AddOwner(int i, ListOwner o)
Definition: UIMultiList.cs:25

References UIMultiList.AddOwner(), Create(), and multi.

◆ Create() [2/2]

static LayerPeople LayerPeople.Create ( Mode  mode)
inlinestatic

Definition at line 106 of file LayerPeople.cs.

107 {
108 string path = "LayerPeople";
109 switch (mode)
110 {
111 case Mode.Double:
112 path = "LayerPeople/LayerPeopleDouble";
113 break;
114 case Mode.Party:
115 path = "LayerPeople/LayerPeopleDouble_party";
116 break;
117 }
118 return Layer.Create(path) as LayerPeople;
119 }
Definition: Layer.cs:9
static Layer Create(string path)
Definition: Layer.cs:299

References Layer.Create().

Referenced by Create(), Create< T >(), CreateBed(), CreateParty(), CreateReserve(), CreateSelect(), and CreateSelectEmbarkMembers().

◆ Create< T >()

static LayerPeople LayerPeople.Create< T > ( string  langHint = null,
Chara  owner = null 
)
inlinestatic
Type Constraints
T :BaseListPeople 

Definition at line 121 of file LayerPeople.cs.

122 {
123 LayerPeople layerPeople = Create(Mode.Select);
124 T o = new T
125 {
126 owner = owner
127 };
128 layerPeople.multi.AddOwner(0, o);
129 layerPeople.langHint = langHint;
130 return layerPeople;
131 }
string langHint
Definition: Layer.cs:119

References UIMultiList.AddOwner(), Create(), Layer.langHint, and multi.

◆ CreateBed()

static LayerPeople LayerPeople.CreateBed ( TraitBed  bed)
inlinestatic

Definition at line 160 of file LayerPeople.cs.

161 {
162 LayerPeople layerPeople = Create(Mode.Double);
163 layerPeople.multi.AddOwner(0, new ListPeopleBed
164 {
165 textHeader = "candidates",
166 bed = bed
167 });
168 layerPeople.multi.AddOwner(1, new ListPeopleBed
169 {
170 funcHeader = () => "listBedHolder".lang(bed.CountHolders() + " / " + bed.MaxHolders),
171 bed = bed
172 });
173 ELayer.ui.AddLayer(layerPeople);
174 return layerPeople;
175 }
Definition: ELayer.cs:4
static UI ui
Definition: ELayer.cs:21

References UIMultiList.AddOwner(), bed, Create(), multi, and ELayer.ui.

Referenced by TraitBed.TrySetAct().

◆ CreateParty()

static LayerPeople LayerPeople.CreateParty ( )
inlinestatic

Definition at line 145 of file LayerPeople.cs.

146 {
147 LayerPeople layerPeople = Create(Mode.Party);
148 layerPeople.multi.AddOwner(0, new ListPeopleParty
149 {
150 textHeader = "candidates"
151 });
152 layerPeople.multi.AddOwner(1, new ListPeopleParty
153 {
154 textHeader = "faction_Member"
155 });
156 ELayer.ui.AddLayer(layerPeople);
157 return layerPeople;
158 }

References UIMultiList.AddOwner(), Create(), multi, and ELayer.ui.

Referenced by TraitBookRoster.OnUse(), and TraitPartyBoard.TrySetAct().

◆ CreateReserve()

static LayerPeople LayerPeople.CreateReserve ( )
inlinestatic

Definition at line 133 of file LayerPeople.cs.

134 {
135 LayerPeople layerPeople = Create(Mode.Hire);
136 layerPeople.multi.AddOwner(0, new ListPeopleCallReserve
137 {
138 textHeader = "actCallReserve"
139 });
140 layerPeople.langHint = "h_reserve";
141 ELayer.ui.AddLayer(layerPeople);
142 return layerPeople;
143 }

References UIMultiList.AddOwner(), Create(), multi, and ELayer.ui.

Referenced by TraitCoreZone.TrySetAct().

◆ CreateSelect()

static LayerPeople LayerPeople.CreateSelect ( string  langHeader,
string  langHint,
Action< BaseList onList,
Action< Chara onClick,
Func< Chara, string >  _onShowSubText = null 
)
inlinestatic

Definition at line 208 of file LayerPeople.cs.

209 {
210 LayerPeople layerPeople = Create(Mode.Select);
211 layerPeople.multi.AddOwner(0, new ListPeopleSelect
212 {
213 textHeader = langHeader,
214 onList = onList,
215 onClick = onClick,
216 onShowSubText = _onShowSubText
217 });
218 layerPeople.langHint = langHint;
219 ELayer.ui.AddLayer(layerPeople);
220 return layerPeople;
221 }

References UIMultiList.AddOwner(), Create(), Layer.langHint, multi, and ELayer.ui.

Referenced by TraitGeneMachine.OnUse(), and TraitGeneratorWheel.OnUse().

◆ CreateSelectEmbarkMembers()

static LayerPeople LayerPeople.CreateSelectEmbarkMembers ( List< Chara settlers)
inlinestatic

Definition at line 177 of file LayerPeople.cs.

178 {
179 LayerPeople layerPeople = Create(Mode.Double);
180 List<Chara> list = new List<Chara>();
181 foreach (Chara chara in ELayer.game.lastActiveZone.map.charas)
182 {
183 if (chara.IsHomeMember())
184 {
185 list.Add(chara);
186 }
187 }
188 layerPeople.multi.AddOwner(0, new ListPeopleEmbark
189 {
190 textHeader = "candidates",
191 charas = list
192 });
193 layerPeople.multi.AddOwner(1, new ListPeopleEmbark
194 {
195 textHeader = "listEmbark",
196 charas = settlers
197 });
198 return layerPeople;
199 }
Definition: Chara.cs:10
bool IsHomeMember()
Definition: Chara.cs:6747
static Game game
Definition: ELayer.cs:9
Zone lastActiveZone
Definition: Game.cs:254
List< Chara > charas
Definition: Map.cs:81
Map map
Definition: Zone.cs:63

References Map.charas, Create(), ELayer.game, Chara.IsHomeMember(), Game.lastActiveZone, and Zone.map.

Referenced by LayerNewZone.OnClickSelectMembers().

◆ HeaderIsListOf()

override bool LayerPeople.HeaderIsListOf ( int  id)
inlinevirtual

Reimplemented from Layer.

Definition at line 35 of file LayerPeople.cs.

36 {
37 return true;
38 }

◆ InitList()

void LayerPeople.InitList ( ListOwner  o)
inline

Definition at line 97 of file LayerPeople.cs.

98 {
99 if ((bool)search && (!multi.Double || o.main))
100 {
101 search.Init(o);
102 }
103 o.OnSwitchContent();
104 }
UISearchPeople search
Definition: LayerPeople.cs:29
virtual void OnSwitchContent()
Definition: ListOwner.cs:85
bool main
Definition: ListOwner.cs:37
void Init(ListOwner _list)

References UIMultiList.Double, UISearchPeople.Init(), ListOwner< T1, T2 >.main, multi, ListOwner< T1, T2 >.OnSwitchContent(), and search.

Referenced by OnSwitchContent().

◆ OnInit()

override void LayerPeople.OnInit ( )
inlinevirtual

Reimplemented from Layer.

Definition at line 40 of file LayerPeople.cs.

41 {
43 if (multi.owners.Count == 0)
44 {
46 {
47 memberType = FactionMemberType.Default
48 });
50 {
51 memberType = FactionMemberType.Livestock
52 });
54 {
55 memberType = FactionMemberType.Guest
56 });
57 langHint = "h_residents";
58 }
60 multi.owners[0].menu = new WindowMenu(layoutMenu);
61 }
static Player player
Definition: ELayer.cs:13
ShowMode showMode
Definition: LayerPeople.cs:25
LayoutGroup layoutMenu
Definition: LayerPeople.cs:27
LayerPeople.ShowMode modePoeple
Definition: Player.cs:55
UIList.SortMode sortPeople
Definition: Player.cs:45
Pref pref
Definition: Player.cs:1080
List< ListOwner > owners
Definition: UIMultiList.cs:6
void Build(UIList.SortMode m=UIList.SortMode.ByNone)
Definition: UIMultiList.cs:41

References UIMultiList.AddOwner(), UIMultiList.Build(), Layer.langHint, layoutMenu, Player.Pref.modePoeple, multi, UIMultiList.owners, ELayer.player, Player.pref, showMode, and Player.Pref.sortPeople.

◆ OnKill()

override void LayerPeople.OnKill ( )
inlinevirtual

Reimplemented from Layer.

Definition at line 78 of file LayerPeople.cs.

79 {
80 ELayer.player.pref.sortPeople = multi.owners[0].list.sortMode;
81 ELayer.player.pref.modePoeple = showMode;
82 ELayer.scene.screenElin.focusOption = null;
83 }

References multi, UIMultiList.owners, and showMode.

◆ OnSwitchContent()

override void LayerPeople.OnSwitchContent ( Window  window)
inlinevirtual

Reimplemented from Layer.

Definition at line 85 of file LayerPeople.cs.

86 {
87 if (multi.Double)
88 {
90 }
91 else
92 {
93 InitList(multi.owners[window.idTab]);
94 }
95 }
void InitList(ListOwner o)
Definition: LayerPeople.cs:97
int windowIndex
Definition: Window.cs:697
int idTab
Definition: Window.cs:694

References UIMultiList.Double, Window.idTab, InitList(), multi, UIMultiList.owners, and Window.windowIndex.

Referenced by BaseListPeople.OnClick().

◆ SetOnConfirm()

LayerPeople LayerPeople.SetOnConfirm ( Action  _onConfirm)
inline

Definition at line 63 of file LayerPeople.cs.

64 {
65 onConfirm = _onConfirm;
66 return this;
67 }

References onConfirm.

Referenced by LayerNewZone.OnClickSelectMembers().

Member Data Documentation

◆ layoutMenu

LayoutGroup LayerPeople.layoutMenu

Definition at line 27 of file LayerPeople.cs.

Referenced by OnInit().

◆ multi

◆ onConfirm

Action LayerPeople.onConfirm

Definition at line 31 of file LayerPeople.cs.

Referenced by Confirm(), and SetOnConfirm().

◆ search

UISearchPeople LayerPeople.search

Definition at line 29 of file LayerPeople.cs.

Referenced by InitList().

◆ showMode

ShowMode LayerPeople.showMode

Definition at line 25 of file LayerPeople.cs.

Referenced by OnInit(), OnKill(), and BaseListPeople.OnRefreshMenu().

◆ slaveToBuy

Chara LayerPeople.slaveToBuy
static

Definition at line 23 of file LayerPeople.cs.


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