using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class Lexicon : MonoBehaviour { public GameObject LexiconPNL; public GameObject InputLine; public GameObject ListPanelContent; public void OpenList(){ DOIT.CloseALLPNL(); _G.PON = "LEXICONpnl"; LexiconPNL.SetActive(true); DOIT.DELETEAllObjectChild(ListPanelContent); foreach(KeyValuePair entry in _G.Lexique){ GameObject NewLInputLine=Instantiate(InputLine); NewLInputLine.SetActive(true); NewLInputLine.transform.SetParent(ListPanelContent.transform); NewLInputLine.transform.Find("IntoSoft").GetComponent().text=entry.Key; NewLInputLine.transform.Find("NewText").GetComponent().text=entry.Value; } } public void AddNewInputFeildLine(){ GameObject NewLInputLine=Instantiate(InputLine); NewLInputLine.SetActive(true); NewLInputLine.transform.SetParent(ListPanelContent.transform); } public void DeleteNewInputFeildLine(){ for(int i=0; i(); for(int i=0; i().text; string value = ListPanelContent.transform.transform.GetChild(i).Find("NewText").GetComponent().text; _G.Lexique.Add(key,value); } _G.UIT_LibraryLexique=new List(); foreach(KeyValuePair entry in _G.Lexique){ _G.UIT_LibraryLexique.Add(entry.Key+","+entry.Value); } _M.PH(18,0,"ffffff",1,1); OKSaveToServer(); } public void OKSaveToServer(){ SaveToServer.SaveToserver(); DOIT.CloseALLPNL(); } }