76 lines
2.1 KiB
C#
76 lines
2.1 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using TMPro;
|
|
using UnityEngine;
|
|
|
|
public class MyTestLogData
|
|
{
|
|
public LogType logtype;
|
|
public string log;
|
|
}
|
|
|
|
public class MyTestUI : MonoBehaviourSingletonuScrollViewMgr<MyTestUI>
|
|
{
|
|
public GameObject go_child;
|
|
public TMP_Dropdown dd_item;
|
|
public TMP_InputField if_itemid, if_itemamount;
|
|
|
|
static List<MyTestLogData> mylogs = new List<MyTestLogData>();
|
|
|
|
public static void Add_Log(LogType logtype, string log) { mylogs.Add(new MyTestLogData { log = log, logtype = logtype }); }
|
|
|
|
IEnumerator Start()
|
|
{
|
|
while (true)
|
|
{
|
|
if (TableChecker.Ins && TableChecker.Ins.CheckAllLoad())
|
|
break;
|
|
yield return null;
|
|
}
|
|
|
|
//var lst = table_ItemList.Ins.Get_DataList();
|
|
//dd_item.options.Clear();
|
|
//for (int i = 0; i < lst.Count; i++)
|
|
// dd_item.options.Add(new TMP_Dropdown.OptionData($"{lst[i].n_ItemID}({lst[i].Get_Name()})"));
|
|
}
|
|
|
|
public override void Set()
|
|
{
|
|
go_child.SetActive(true);
|
|
Set_ScrollView(mylogs);
|
|
}
|
|
|
|
public void OnClick_AddItemAmount()
|
|
{
|
|
int.TryParse(if_itemamount.text, out int count);
|
|
|
|
if (count != 0)
|
|
{
|
|
//ItemListTableData item = null;
|
|
//if (!string.IsNullOrEmpty(if_itemid.text))
|
|
// item = table_ItemList.Ins.Get_Data_orNull(int.Parse(if_itemid.text));
|
|
//else
|
|
// item = table_ItemList.Ins.Get_DataList()[dd_item.value];
|
|
|
|
//if (item != null)
|
|
//{
|
|
// MyValue.sdata.Add_Item(item.n_ItemID, count);
|
|
// ToastUI.Ins.Set($"{item.Get_Name()} {if_itemamount.text}개 추가!!");
|
|
//}
|
|
}
|
|
}
|
|
|
|
public override void OnClick_Back()
|
|
{
|
|
go_child.SetActive(false);
|
|
}
|
|
|
|
public void OnClick_DelSaveFile()
|
|
{
|
|
Popup.Ins.Set("세이브 파일을 지우시겠습니까?\n앱이 종료됩니다.", () =>
|
|
{
|
|
CryptoUtil.Del(MyValue.SaveDataFileName);
|
|
DSUtil.Quit();
|
|
});
|
|
}
|
|
} |