9 public override bool HeaderIsListOf(
int id)
15 public override void OnInit()
17 this.showMode =
ELayer.player.pref.modePoeple;
18 if (this.multi.owners.Count == 0)
22 textTab =
"residents",
23 memberType = FactionMemberType.Default
27 textTab =
"livestock",
28 memberType = FactionMemberType.Livestock
33 memberType = FactionMemberType.Guest
35 this.langHint =
"h_residents";
37 this.multi.Build(
ELayer.player.pref.sortPeople);
38 this.multi.owners[0].menu =
new WindowMenu(this.layoutMenu);
44 this.onConfirm = _onConfirm;
51 if (this.onConfirm !=
null)
59 public override void OnKill()
61 ELayer.player.pref.sortPeople = this.multi.owners[0].list.sortMode;
62 ELayer.player.pref.modePoeple = this.showMode;
63 ELayer.scene.screenElin.focusOption =
null;
67 public override void OnSwitchContent(Window window)
69 if (this.multi.Double)
71 this.multi.owners[window.windowIndex].OnSwitchContent();
74 this.multi.owners[window.idTab].OnSwitchContent();
80 string path =
"LayerPeople";
83 path =
"LayerPeople/LayerPeopleDouble";
92 T t = Activator.CreateInstance<T>();
94 layerPeople.multi.AddOwner(0, t);
95 layerPeople.langHint = langHint;
105 textHeader =
"actCallReserve"
107 layerPeople.langHint =
"h_reserve";
108 ELayer.ui.AddLayer(layerPeople);
119 public static LayerPeople CreateSelectEmbarkMembers(List<Chara> settlers)
122 List<Chara> list =
new List<Chara>();
123 foreach (
Chara chara
in ELayer.game.lastActiveZone.map.charas)
125 if (chara.IsHomeMember())
132 textHeader =
"candidates",
137 textHeader =
"listEmbark",
147 layerPeople.multi.AddOwner(0, list);
152 public static LayerPeople CreateSelect(
string langHeader,
string langHint, Action<UIList> onList, Action<Chara> onClick, Func<Chara, string> _onShowSubText =
null)
157 textHeader = langHeader,
160 onShowSubText = _onShowSubText
162 layerPeople.langHint = langHint;
163 ELayer.ui.AddLayer(layerPeople);
168 public static Chara slaveToBuy;
171 public LayerPeople.ShowMode showMode;
174 public LayoutGroup layoutMenu;
177 public Action onConfirm;