9 public override void OnSwitchContent(
int idTab)
11 ContentPopulation.Instance =
this;
14 ContentPopulation.queryTarget = a;
19 ContentPopulation.queryType = a;
29 BaseList baseList = this.list;
35 callback.onSort = this.onSort;
36 baseList.callbacks = callback;
37 this.onSort = ((
ContentPopulation.Topic t, UIList.SortMode m) => -this.list.items.IndexOf(t) + t.sortVal * 100);
43 using (List<Chara>.Enumerator enumerator = list.GetEnumerator())
45 while (enumerator.MoveNext())
47 Chara chara = enumerator.Current;
48 if (chara.happiness > 70)
50 this.Add(
"happy".lang(), chara, 1, 10);
52 else if (chara.happiness > 30)
54 this.Add(
"normal".lang(), chara, 0, 5);
58 this.Add(
"unhappy".lang(), chara, 2, 0);
71 using (List<Chara>.Enumerator enumerator = list.GetEnumerator())
73 while (enumerator.MoveNext())
75 Chara c = enumerator.Current;
76 this.Add(
"querySingle".lang(), c, 2, 0);
84 using (List<Chara>.Enumerator enumerator = list.GetEnumerator())
86 while (enumerator.MoveNext())
88 Chara c2 = enumerator.Current;
89 this.Add(
"noJob".lang(), c2, 2, 0);
94 using (List<Chara>.Enumerator enumerator = list.GetEnumerator())
96 while (enumerator.MoveNext())
98 Chara c3 = enumerator.Current;
99 this.Add(
"houseless".lang(), c3, 2, 0);
104 foreach (
Chara chara2
in list)
106 this.Add(chara2.faith.Name, chara2, 1, 0);
108 this.onSort = ((
ContentPopulation.Topic t, UIList.SortMode m) => t.list.Count * 1000 - this.list.items.IndexOf(t));
111 foreach (
Chara c4
in list)
113 this.Add(
"test", c4, 1, 0);
116 this.list.Refresh(
false);
117 this.RebuildLayout(
true);
121 public void Add(
string idTopic,
Chara c,
int color = 1,
int sortVal = 0)
132 this.topics.Add(idTopic, topic);
133 this.list.Add(topic);
142 public static int queryTarget;
145 public static int queryType;
148 public Color[] colors;
154 public UISelectableGroup groupQueryTarget;
157 public UISelectableGroup groupQueryType;
169 public string header;
172 public List<Chara> list =
new List<Chara>();