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

Public Types

enum  Mode { Default , Select , Double , Hire }
 
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)
 
- 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 CreateBed (TraitBed bed)
 
static LayerPeople CreateSelectEmbarkMembers (List< Chara > settlers)
 
static LayerPeople Create (BaseListPeople list)
 
static LayerPeople CreateSelect (string langHeader, string langHint, Action< UIList > 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
 
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 

Definition at line 7 of file LayerPeople.cs.

◆ ShowMode

Enumerator
Job 
Race 
Work 

Definition at line 15 of file LayerPeople.cs.

Member Function Documentation

◆ Confirm()

void LayerPeople.Confirm ( )
inline

Definition at line 66 of file LayerPeople.cs.

67 {
68 if (onConfirm != null)
69 {
70 onConfirm();
71 }
72 Close();
73 }
Action onConfirm
Definition: LayerPeople.cs:28
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 169 of file LayerPeople.cs.

170 {
171 LayerPeople layerPeople = Create(Mode.Select);
172 layerPeople.multi.AddOwner(0, list);
173 return layerPeople;
174 }
static LayerPeople Create(Mode mode)
Definition: LayerPeople.cs:94
UIMultiList multi
Definition: LayerPeople.cs:30
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 94 of file LayerPeople.cs.

95 {
96 string path = "LayerPeople";
97 if (mode == Mode.Double)
98 {
99 path = "LayerPeople/LayerPeopleDouble";
100 }
101 return Layer.Create(path) as LayerPeople;
102 }
Definition: Layer.cs:9
static Layer Create(string path)
Definition: Layer.cs:299

References Layer.Create().

Referenced by Create(), Create< T >(), CreateBed(), 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 104 of file LayerPeople.cs.

105 {
106 LayerPeople layerPeople = Create(Mode.Select);
107 T o = new T
108 {
109 owner = owner
110 };
111 layerPeople.multi.AddOwner(0, o);
112 layerPeople.langHint = langHint;
113 return layerPeople;
114 }
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 128 of file LayerPeople.cs.

129 {
130 LayerPeople layerPeople = Create(Mode.Double);
131 layerPeople.multi.AddOwner(0, new ListPeopleBed
132 {
133 textHeader = "candidates",
134 bed = bed
135 });
136 layerPeople.multi.AddOwner(1, new ListPeopleBed
137 {
138 textHeader = "listBedHolder".lang(bed.MaxHolders.ToString() ?? ""),
139 bed = bed
140 });
141 ELayer.ui.AddLayer(layerPeople);
142 return layerPeople;
143 }
Definition: ELayer.cs:4
static UI ui
Definition: ELayer.cs:21

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

Referenced by TraitBed.TrySetAct().

◆ CreateReserve()

static LayerPeople LayerPeople.CreateReserve ( )
inlinestatic

Definition at line 116 of file LayerPeople.cs.

117 {
118 LayerPeople layerPeople = Create(Mode.Hire);
119 layerPeople.multi.AddOwner(0, new ListPeopleCallReserve
120 {
121 textHeader = "actCallReserve"
122 });
123 layerPeople.langHint = "h_reserve";
124 ELayer.ui.AddLayer(layerPeople);
125 return layerPeople;
126 }

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

Referenced by TraitCoreZone.TrySetAct().

◆ CreateSelect()

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

Definition at line 176 of file LayerPeople.cs.

177 {
178 LayerPeople layerPeople = Create(Mode.Select);
179 layerPeople.multi.AddOwner(0, new ListPeopleSelect
180 {
181 textHeader = langHeader,
182 onList = onList,
183 onClick = onClick,
184 onShowSubText = _onShowSubText
185 });
186 layerPeople.langHint = langHint;
187 ELayer.ui.AddLayer(layerPeople);
188 return layerPeople;
189 }

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

146 {
147 LayerPeople layerPeople = Create(Mode.Double);
148 List<Chara> list = new List<Chara>();
149 foreach (Chara chara in ELayer.game.lastActiveZone.map.charas)
150 {
151 if (chara.IsHomeMember())
152 {
153 list.Add(chara);
154 }
155 }
156 layerPeople.multi.AddOwner(0, new ListPeopleEmbark
157 {
158 textHeader = "candidates",
159 charas = list
160 });
161 layerPeople.multi.AddOwner(1, new ListPeopleEmbark
162 {
163 textHeader = "listEmbark",
164 charas = settlers
165 });
166 return layerPeople;
167 }
Definition: Chara.cs:10
bool IsHomeMember()
Definition: Chara.cs:5942
static Game game
Definition: ELayer.cs:9
Zone lastActiveZone
Definition: Game.cs:247
List< Chara > charas
Definition: Map.cs:81
Map map
Definition: Zone.cs:60

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

33 {
34 return true;
35 }

◆ OnInit()

override void LayerPeople.OnInit ( )
inlinevirtual

Reimplemented from Layer.

Definition at line 37 of file LayerPeople.cs.

38 {
40 if (multi.owners.Count == 0)
41 {
43 {
44 memberType = FactionMemberType.Default
45 });
47 {
48 memberType = FactionMemberType.Livestock
49 });
51 {
52 memberType = FactionMemberType.Guest
53 });
54 langHint = "h_residents";
55 }
57 multi.owners[0].menu = new WindowMenu(layoutMenu);
58 }
static Player player
Definition: ELayer.cs:13
ShowMode showMode
Definition: LayerPeople.cs:24
LayoutGroup layoutMenu
Definition: LayerPeople.cs:26
LayerPeople.ShowMode modePoeple
Definition: Player.cs:55
UIList.SortMode sortPeople
Definition: Player.cs:45
Pref pref
Definition: Player.cs:814
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 75 of file LayerPeople.cs.

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

References multi, UIMultiList.owners, and showMode.

◆ OnSwitchContent()

override void LayerPeople.OnSwitchContent ( Window  window)
inlinevirtual

Reimplemented from Layer.

Definition at line 82 of file LayerPeople.cs.

83 {
84 if (multi.Double)
85 {
86 multi.owners[window.windowIndex].OnSwitchContent();
87 }
88 else
89 {
90 multi.owners[window.idTab].OnSwitchContent();
91 }
92 }
int windowIndex
Definition: Window.cs:697
int idTab
Definition: Window.cs:694

References UIMultiList.Double, Window.idTab, multi, UIMultiList.owners, and Window.windowIndex.

Referenced by BaseListPeople.OnClick().

◆ SetOnConfirm()

LayerPeople LayerPeople.SetOnConfirm ( Action  _onConfirm)
inline

Definition at line 60 of file LayerPeople.cs.

61 {
62 onConfirm = _onConfirm;
63 return this;
64 }

References onConfirm.

Referenced by LayerNewZone.OnClickSelectMembers().

Member Data Documentation

◆ layoutMenu

LayoutGroup LayerPeople.layoutMenu

Definition at line 26 of file LayerPeople.cs.

Referenced by OnInit().

◆ multi

◆ onConfirm

Action LayerPeople.onConfirm

Definition at line 28 of file LayerPeople.cs.

Referenced by Confirm(), and SetOnConfirm().

◆ showMode

ShowMode LayerPeople.showMode

Definition at line 24 of file LayerPeople.cs.

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

◆ slaveToBuy

Chara LayerPeople.slaveToBuy
static

Definition at line 22 of file LayerPeople.cs.


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