public void Load() { UI_Choice ch = UIManager.GetUI<UI_Choice>(); UI_Choice_Context con = new UI_Choice_Context(); con.OptionList = new List<iLabel>(); for (int i = 0; i < GameManager.Save.File.Length; i++) { con.OptionList.Add(new Label() { ID = i, Name = @"["+Writing.Get(100027) + (i + 1) + "]:" + Writing.Get(Libretto.GetNode(GameManager.Save.File[i]).Sentences.First().Value.DialogueID), }); } con.Callback = this.LoadCallbacek; ch.Use(con); ch.SetFront(); }
private void PlayNodeTypeOption(iNode _node) { UIManager.GetUI<UI_Game>().NoNext = true; UI_Choice _c = UIManager.GetUI<UI_Choice>(); _c.SetFront(); UI_Choice_Context con = new UI_Choice_Context(); con.OptionList = new List<iLabel>(); foreach (var item in _node.Sentences) { Label l = new Label() { ID = item.Key, Name = Writing.Get(item.Value.DialogueID) }; con.OptionList.Add(l); } con.Callback = (res, uichoice) => { GameManager.Save.ChoiceResult[_node.ID] = res; uichoice.UseDone(); Libretto.NextNode(); }; _c.Use(con); }