9 public override void OnAfterInit()
15 public void RefreshList()
17 if (this.worlds ==
null)
19 this.worlds =
GameIO.GetGameList();
21 this.goInfo.SetActive(
false);
22 this.goNoInfo.SetActive(
true);
24 BaseList baseList = this.list;
25 UIList.Callback<
GameIndex, UIButton> callback =
new UIList.Callback<
GameIndex, UIButton>();
26 callback.onInstantiate = delegate(
GameIndex a, UIButton b)
28 FontColor c =
ELayer.core.version.IsSaveCompatible(a.version) ? FontColor.Good : FontColor.Bad;
29 string s = a.Title + ((ELayer.core.IsGameStarted && a.id ==
Game.id) ?
"currentSave".lang() :
"") + Environment.NewLine;
30 b.mainText.SetText(s, c);
31 b.subText.SetText(a.RealDate ??
"");
32 b.subText2.SetText(
string.Concat(
new string[]
34 (a.difficulty == 2) ?
"★" : ((a.difficulty == 1) ?
"☆" :
""),
40 b.GetComponent<UIItem>().text1.SetText(a.version.GetText() ??
"");
42 callback.onClick = delegate(
GameIndex a, UIButton b)
46 baseList.callbacks = callback;
51 this.list.Refresh(
false);
52 if (this.list.items.Count == 0)
54 this.buttonLoad.SetActive(
false);
55 this.buttonDelete.SetActive(
false);
56 this.goNoInfo.SetActive(
true);
63 this.goInfo.SetActive(
true);
64 this.goNoInfo.SetActive(
false);
66 this.note.AddTopic(
"version".lang(), i.version.GetText());
67 this.note.AddTopic(
"date_real".lang(), i.RealDate);
68 this.note.AddTopic(
"date_game".lang(), i.GameData);
69 this.note.AddTopic(
"ID", i.id);
70 bool flag =
ELayer.core.version.IsSaveCompatible(i.version);
73 this.note.Space(0, 1);
74 this.note.AddText(
"incompatible".lang(), FontColor.Bad);
78 this.note.AddTopic(
"currentZone".lang(), i.zoneName);
80 this.textAka.SetText(i.aka);
81 this.textName.SetText(i.pcName);
82 this.textDays.SetText(
"infoHire".lang(i.days.ToString() ??
"",
null,
null,
null,
null));
83 this.textDeepest.SetText(
"deepestLv2".lang(i.deepest.ToString() ??
"",
null,
null,
null,
null));
84 UIText uitext = this.textRace;
86 uitext.SetText(((row !=
null) ? row.GetName().ToTitleCase(
false) :
null) ??
"");
87 UIText uitext2 = this.textJob;
89 uitext2.SetText(((row2 !=
null) ? row2.GetName().ToTitleCase(
false) :
null) ??
"");
90 if (!i.idPortrait.IsEmpty())
92 this.portrait.SetActive(
true);
93 Color white = Color.white;
94 ColorUtility.TryParseHtmlString(
"#" + i.color, out white);
95 this.portrait.SetPortrait(i.idPortrait, white);
99 this.portrait.SetActive(
false);
102 this.buttonLoad.onClick.RemoveAllListeners();
103 this.buttonDelete.onClick.RemoveAllListeners();
104 this.buttonLoad.SetOnClick(delegate
110 this.buttonDelete.SetOnClick(delegate
112 string langDetail =
"dialogDeleteGame";
114 if ((actionYes = <>9__3) ==
null)
116 actionYes = (<>9__3 = delegate()
124 Dialog.YesNo(langDetail, actionYes,
null,
"yes",
"no");
126 this.buttonBackup.SetOnClick(delegate
128 GameIO.MakeBackup(i.id,
"_manual");
129 ELayer.ui.Say(
"backupDone",
null);
132 this.buttonLoad.SetActive(flag);
139 public GameObject goInfo;
142 public GameObject goNoInfo;
148 public UIButton buttonLoad;
151 public UIButton buttonDelete;
154 public UIButton buttonBackup;
157 public List<GameIndex> worlds;
163 public UIText textAka;
166 public UIText textName;
169 public UIText textInfo;
172 public UIText textRace;
175 public UIText textJob;
178 public UIText textDeepest;
181 public UIText textDays;