2025-05-12 18:11:43 +09:00
|
|
|
using Ookii.Dialogs;
|
|
|
|
|
using System;
|
|
|
|
|
using TMPro;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
using UnityEngine.UI;
|
|
|
|
|
using XRLib.UI;
|
|
|
|
|
|
2025-05-20 16:25:58 +09:00
|
|
|
namespace Studio.UI
|
2025-05-12 18:11:43 +09:00
|
|
|
{
|
|
|
|
|
public class Panel_OpenProjectInfo : PanelBase
|
|
|
|
|
{
|
|
|
|
|
private GameObject recentProjectItemPrefab;
|
|
|
|
|
|
|
|
|
|
public TMP_InputField InputField_ProjectRoute;
|
|
|
|
|
public Button Button_FileExplorer;
|
|
|
|
|
public Button Button_Server;
|
|
|
|
|
public RectTransform Content;
|
|
|
|
|
|
|
|
|
|
public Action onClickFileExplorer;
|
|
|
|
|
public Action onClickServer;
|
|
|
|
|
|
|
|
|
|
private RectTransform Footer;
|
|
|
|
|
public TextMeshProUGUI Text_ProjectName;
|
|
|
|
|
public TextMeshProUGUI Text_ProjectMetaInfo;
|
|
|
|
|
public Button Button_Open;
|
|
|
|
|
|
|
|
|
|
public Action onClickOpen;
|
|
|
|
|
|
|
|
|
|
public override void AfterAwake()
|
|
|
|
|
{
|
|
|
|
|
recentProjectItemPrefab = Resources.Load<GameObject>("Prefabs/UI/PRF_QuickStartItem");
|
|
|
|
|
Button_FileExplorer.onClick.AddListener(OnClickFileExplorer);
|
|
|
|
|
Button_Open.onClick.AddListener(OnClickOpen);
|
|
|
|
|
|
2025-05-13 14:49:57 +09:00
|
|
|
// Test
|
2025-05-12 18:11:43 +09:00
|
|
|
for (int i = 0; i < 3; i++)
|
|
|
|
|
{
|
|
|
|
|
CreateRecentProjectItem();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void OnClickFileExplorer()
|
|
|
|
|
{
|
|
|
|
|
onClickFileExplorer?.Invoke();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void OnClickServer()
|
|
|
|
|
{
|
|
|
|
|
onClickServer?.Invoke();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void CreateRecentProjectItem()
|
|
|
|
|
{
|
|
|
|
|
UI_QuickStartItem item = Instantiate(recentProjectItemPrefab, Content).GetComponent<UI_QuickStartItem>();
|
2025-05-13 14:49:57 +09:00
|
|
|
item.Init(name, OnClickItem);
|
2025-05-12 18:11:43 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void OnClickItem()
|
|
|
|
|
{
|
|
|
|
|
Footer.gameObject.SetActive(true);
|
2025-05-13 14:49:57 +09:00
|
|
|
Text_ProjectName.text = "test Name";
|
|
|
|
|
Text_ProjectMetaInfo.text = "test MetaInfo";
|
2025-05-12 18:11:43 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void OnClickOpen()
|
|
|
|
|
{
|
|
|
|
|
onClickOpen?.Invoke();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Open()
|
|
|
|
|
{
|
|
|
|
|
SetActive(true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Close()
|
|
|
|
|
{
|
|
|
|
|
SetActive(false);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|