9 public override void OnSwitchContent(
int idTab)
11 this.list.sortMode = UIList.SortMode.ByValue;
12 BaseList baseList = this.list;
17 string text = a.GetTitle();
18 if (
EClass.debug.showExtra)
20 text = text +
"(" + a.phase.ToString() +
")";
22 b.button1.mainText.SetText(a.TitlePrefix + text);
23 b.SetSubText(a.TextDeadline, 260, FontColor.Default, TextAnchor.MiddleRight);
24 b.button2.SetActive(
EClass.debug.enable && a.CanAutoAdvance);
25 if (
EClass.debug.enable && a.CanAutoAdvance)
27 b.button2.SetOnClick(delegate
41 this.list.List(
false);
44 b.button3.SetOnClick(delegate
49 EClass.player.questTracker =
true;
50 EClass.ui.widgets.ActivateWidget(
"QuestTracker");
54 this.list.Select(a,
false);
56 this.RefreshTrackButtons();
63 callback.onList = delegate(UIList.SortMode m)
70 callback.onSort = ((
Quest a, UIList.SortMode m) => -
EClass.sources.quests.rows.IndexOf(a.source));
71 baseList.callbacks = callback;
72 this.list.List(
false);
73 this.SelectQuest(this.list.items[0] as
Quest);
74 this.RefreshTrackButtons();
78 public void RefreshTrackButtons()
80 foreach (UIList.ButtonPair buttonPair in
this.list.buttons)
83 (buttonPair.component as
ItemGeneral).button3.icon.SetActive(quest.track);
88 public void SelectQuest(
Quest q)
90 this.buttonAbandon.SetActive(q.CanAbandon);
92 this.buttonAbandon.SetOnClick(delegate
94 string langDetail =
"dialog_abandonQuest";
96 if ((actionYes = <>9__1) ==
null)
98 actionYes = (<>9__1 = delegate()
100 Msg.Say(
"questAbandon", q.GetTitle(),
null,
null,
null);
102 this.OnSwitchContent(0);
105 Dialog.YesNo(langDetail, actionYes,
null,
"yes",
"no");
107 this.textClient.text = q.person.NameBraced;
108 this.textReward.SetText(q.GetRewardText());
109 string text = q.GetDetail(
true);
110 if (
EClass.debug.showExtra && q.person !=
null)
112 text += Environment.NewLine;
113 string[] array =
new string[7];
115 array[1] = q.person.id;
117 array[3] = q.person.name;
120 Chara chara = q.person.chara;
121 array[num] = ((chara !=
null) ? chara.ToString() :
null);
122 array[6] = Environment.NewLine;
123 text =
string.Concat(array);
125 if (questDeliver !=
null)
128 string str2 = questDeliver.uidDest.ToString();
130 Chara destChara = questDeliver.DestChara;
131 text = str + str2 + str3 + ((destChara !=
null) ? destChara.ToString() :
null);
134 this.textDetail.SetText(text);
135 this.textHours.text = q.TextDeadline;
136 Text text2 = this.textZone;
137 Zone clientZone = q.ClientZone;
138 text2.text = (((clientZone !=
null) ? clientZone.Name :
null) ??
"-");
139 this.portrait.SetPerson(q.person);
140 this.RebuildLayout(
true);
147 public UIText textClient;
150 public UIText textTitle;
153 public UIText textDetail;
156 public UIText textHours;
159 public UIText textNote;
162 public UIText textReward;
165 public UIText textZone;
171 public UIButton buttonAbandon;