시작화면 모달 수정
This commit is contained in:
@@ -2448,6 +2448,7 @@ MonoBehaviour:
|
|||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
InputField_ProjectName: {fileID: 0}
|
InputField_ProjectName: {fileID: 0}
|
||||||
InputField_ProjectRoute: {fileID: 0}
|
InputField_ProjectRoute: {fileID: 0}
|
||||||
|
InputField_ProjectTemplate: {fileID: 0}
|
||||||
Button_FileExplorer: {fileID: 0}
|
Button_FileExplorer: {fileID: 0}
|
||||||
Button_Dropdown: {fileID: 0}
|
Button_Dropdown: {fileID: 0}
|
||||||
Button_Create: {fileID: 0}
|
Button_Create: {fileID: 0}
|
||||||
|
|||||||
@@ -5,11 +5,10 @@ using TMPro;
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.EventSystems;
|
using UnityEngine.EventSystems;
|
||||||
using XRLib.UI;
|
using XRLib.UI;
|
||||||
using static UnityEditor.Progress;
|
|
||||||
|
|
||||||
namespace XED.UI
|
namespace XED.UI
|
||||||
{
|
{
|
||||||
public class ProjectTemplateDropdown : UIBase, IPointerExitHandler
|
public class ProjectTemplateDropdown : UIBase
|
||||||
{
|
{
|
||||||
private GameObject optionItemPrefab;
|
private GameObject optionItemPrefab;
|
||||||
|
|
||||||
@@ -35,24 +34,24 @@ namespace XED.UI
|
|||||||
{
|
{
|
||||||
optionItemPrefab = Resources.Load<GameObject>("Prefabs/UI/PRF_QuickStartItem");
|
optionItemPrefab = Resources.Load<GameObject>("Prefabs/UI/PRF_QuickStartItem");
|
||||||
InputField_ProjectTemplate.onValueChanged.AddListener(FilteringOption);
|
InputField_ProjectTemplate.onValueChanged.AddListener(FilteringOption);
|
||||||
InputField_ProjectTemplate.onSelect.AddListener(FilteringOption);
|
InputField_ProjectTemplate.onSelect.AddListener(ShowDropdown);
|
||||||
|
|
||||||
// InputField_ProjectTemplate.onDeselect.AddListener(_ => Invoke(nameof(HideDropdown), 0.1f));
|
|
||||||
CreateDropdown();
|
|
||||||
HideDropdown();
|
HideDropdown();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void Start()
|
||||||
|
{
|
||||||
|
CreateDropdown();
|
||||||
|
}
|
||||||
|
|
||||||
private void ShowDropdown(string input)
|
private void ShowDropdown(string input)
|
||||||
{
|
{
|
||||||
TemplateDropdown.gameObject.SetActive(true);
|
TemplateDropdown.gameObject.SetActive(true);
|
||||||
FilteringOption(input);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void HideDropdown()
|
private void HideDropdown()
|
||||||
{
|
{
|
||||||
TemplateDropdown.gameObject.SetActive(false);
|
TemplateDropdown.gameObject.SetActive(false);
|
||||||
ClearDropdownItems();
|
|
||||||
InputField_ProjectTemplate.DeactivateInputField();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CreateDropdown()
|
private void CreateDropdown()
|
||||||
@@ -77,8 +76,8 @@ namespace XED.UI
|
|||||||
private void OnClickOptionItem(string text)
|
private void OnClickOptionItem(string text)
|
||||||
{
|
{
|
||||||
InputField_ProjectTemplate.text = text;
|
InputField_ProjectTemplate.text = text;
|
||||||
InputField_ProjectTemplate.selectionStringAnchorPosition = text.Length;
|
|
||||||
HideDropdown();
|
HideDropdown();
|
||||||
|
EventSystem.current.SetSelectedGameObject(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void FilteringOption(string input)
|
private void FilteringOption(string input)
|
||||||
@@ -105,10 +104,5 @@ namespace XED.UI
|
|||||||
|
|
||||||
activeOptionItems.Clear();
|
activeOptionItems.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnPointerExit(PointerEventData eventData)
|
|
||||||
{
|
|
||||||
//HideDropdown();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ namespace XED.UI
|
|||||||
|
|
||||||
public void OnPointerDown(PointerEventData eventData)
|
public void OnPointerDown(PointerEventData eventData)
|
||||||
{
|
{
|
||||||
Debug.Log("enter");
|
|
||||||
onClickButton?.Invoke();
|
onClickButton?.Invoke();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ namespace XED.UI
|
|||||||
{
|
{
|
||||||
public class Panel_AppLogicList : PanelBase
|
public class Panel_AppLogicList : PanelBase
|
||||||
{
|
{
|
||||||
|
StudioCanvas_Popup studioCanvas_popup;
|
||||||
|
|
||||||
private List<UI_LogicItem> itemList = new();
|
private List<UI_LogicItem> itemList = new();
|
||||||
public GameObject logicItem;
|
public GameObject logicItem;
|
||||||
public RectTransform itemRoot;
|
public RectTransform itemRoot;
|
||||||
@@ -22,6 +24,7 @@ namespace XED.UI
|
|||||||
public override void AfterAwake()
|
public override void AfterAwake()
|
||||||
{
|
{
|
||||||
logicItem = Resources.Load<GameObject>("Prefabs/UI/PRF_LogicItem");
|
logicItem = Resources.Load<GameObject>("Prefabs/UI/PRF_LogicItem");
|
||||||
|
studioCanvas_popup = EventConnector.instance.GetCanvas<StudioCanvas_Popup>();
|
||||||
CreateItem();
|
CreateItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -37,7 +40,7 @@ namespace XED.UI
|
|||||||
private void OnClickAdd(UI_LogicItem item)
|
private void OnClickAdd(UI_LogicItem item)
|
||||||
{
|
{
|
||||||
selectItem = item;
|
selectItem = item;
|
||||||
EventConnector.instance.GetCanvas<StudioCanvas_Popup>().panel_selectlogic.Open(true);
|
studioCanvas_popup.panel_selectlogic.Open(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnClickEdit(ELogic logic)
|
private void OnClickEdit(ELogic logic)
|
||||||
@@ -51,10 +54,10 @@ namespace XED.UI
|
|||||||
switch (logic)
|
switch (logic)
|
||||||
{
|
{
|
||||||
case ELogic.AppSetting:
|
case ELogic.AppSetting:
|
||||||
curInspectorPanel = EventConnector.instance.GetCanvas<StudioCanvas_Popup>().panel_appsetting.gameObject;
|
curInspectorPanel = studioCanvas_popup.panel_appsetting.gameObject;
|
||||||
break;
|
break;
|
||||||
case ELogic.Authentication:
|
case ELogic.Authentication:
|
||||||
curInspectorPanel = EventConnector.instance.GetCanvas<StudioCanvas_Popup>().panel_authentication.gameObject;
|
curInspectorPanel = studioCanvas_popup.panel_authentication.gameObject;
|
||||||
break;
|
break;
|
||||||
case ELogic.Language:
|
case ELogic.Language:
|
||||||
break;
|
break;
|
||||||
@@ -96,7 +99,7 @@ namespace XED.UI
|
|||||||
{
|
{
|
||||||
selectItem.OnSelectLogic(logic);
|
selectItem.OnSelectLogic(logic);
|
||||||
CreateItem();
|
CreateItem();
|
||||||
EventConnector.instance.GetCanvas<StudioCanvas_Popup>().panel_selectlogic.Open(false);
|
studioCanvas_popup.panel_selectlogic.Open(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Open()
|
public void Open()
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
using XRLib.UI;
|
using XRLib.UI;
|
||||||
@@ -7,11 +9,14 @@ namespace XED.UI
|
|||||||
public class Panel_AppSetting : PanelBase
|
public class Panel_AppSetting : PanelBase
|
||||||
{
|
{
|
||||||
private GameObject itemPrefab;
|
private GameObject itemPrefab;
|
||||||
|
private List<GameObject> items = new();
|
||||||
private RectTransform Info;
|
private RectTransform Info;
|
||||||
|
|
||||||
public Button Button_Add;
|
public Button Button_Add;
|
||||||
public Button Button_Save;
|
public Button Button_Save;
|
||||||
|
|
||||||
|
public Action onRemove;
|
||||||
|
|
||||||
public override void AfterAwake()
|
public override void AfterAwake()
|
||||||
{
|
{
|
||||||
itemPrefab = Resources.Load<GameObject>("Prefabs/UI/PRF_AppSettingItem");
|
itemPrefab = Resources.Load<GameObject>("Prefabs/UI/PRF_AppSettingItem");
|
||||||
@@ -26,16 +31,21 @@ namespace XED.UI
|
|||||||
{
|
{
|
||||||
GameObject item = Instantiate(itemPrefab, Info);
|
GameObject item = Instantiate(itemPrefab, Info);
|
||||||
item.transform.SetSiblingIndex(Info.childCount - 2);
|
item.transform.SetSiblingIndex(Info.childCount - 2);
|
||||||
|
items.Add(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Init()
|
||||||
|
{
|
||||||
|
foreach (GameObject item in items)
|
||||||
|
{
|
||||||
|
Destroy(item);
|
||||||
|
}
|
||||||
|
items.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnClickSave()
|
private void OnClickSave()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Open(bool isOpen)
|
|
||||||
{
|
|
||||||
SetActive(isOpen);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,10 +33,5 @@ namespace XED.UI
|
|||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Open(bool isOpen)
|
|
||||||
{
|
|
||||||
SetActive(isOpen);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ namespace XED.UI
|
|||||||
{
|
{
|
||||||
public TMP_InputField InputField_ProjectName;
|
public TMP_InputField InputField_ProjectName;
|
||||||
public TMP_InputField InputField_ProjectRoute;
|
public TMP_InputField InputField_ProjectRoute;
|
||||||
|
public TMP_InputField InputField_ProjectTemplate;
|
||||||
public Button Button_FileExplorer;
|
public Button Button_FileExplorer;
|
||||||
public Button Button_Dropdown;
|
public Button Button_Dropdown;
|
||||||
public Button Button_Create;
|
public Button Button_Create;
|
||||||
@@ -20,14 +21,13 @@ namespace XED.UI
|
|||||||
public Action onClickFileExplorer;
|
public Action onClickFileExplorer;
|
||||||
public Action onClickCreate;
|
public Action onClickCreate;
|
||||||
|
|
||||||
private string defaultPath;
|
private string defaultPath = "C:\\Users\\";
|
||||||
|
|
||||||
public override void AfterAwake()
|
public override void AfterAwake()
|
||||||
{
|
{
|
||||||
Button_FileExplorer.onClick.AddListener(OnClickFileExplorer);
|
Button_FileExplorer.onClick.AddListener(OnClickFileExplorer);
|
||||||
Button_Create.onClick.AddListener(OnClickCreate);
|
Button_Create.onClick.AddListener(OnClickCreate);
|
||||||
|
|
||||||
defaultPath = "C:\\Users\\";
|
|
||||||
InputField_ProjectRoute.text = defaultPath;
|
InputField_ProjectRoute.text = defaultPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -50,5 +50,6 @@ namespace XED.UI
|
|||||||
{
|
{
|
||||||
SetActive(false);
|
SetActive(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ namespace XED.UI
|
|||||||
Button_FileExplorer.onClick.AddListener(OnClickFileExplorer);
|
Button_FileExplorer.onClick.AddListener(OnClickFileExplorer);
|
||||||
Button_Open.onClick.AddListener(OnClickOpen);
|
Button_Open.onClick.AddListener(OnClickOpen);
|
||||||
|
|
||||||
|
// Test
|
||||||
for (int i = 0; i < 3; i++)
|
for (int i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
CreateRecentProjectItem();
|
CreateRecentProjectItem();
|
||||||
@@ -51,14 +52,14 @@ namespace XED.UI
|
|||||||
private void CreateRecentProjectItem()
|
private void CreateRecentProjectItem()
|
||||||
{
|
{
|
||||||
UI_QuickStartItem item = Instantiate(recentProjectItemPrefab, Content).GetComponent<UI_QuickStartItem>();
|
UI_QuickStartItem item = Instantiate(recentProjectItemPrefab, Content).GetComponent<UI_QuickStartItem>();
|
||||||
item.Init("test", OnClickItem);
|
item.Init(name, OnClickItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnClickItem()
|
private void OnClickItem()
|
||||||
{
|
{
|
||||||
Footer.gameObject.SetActive(true);
|
Footer.gameObject.SetActive(true);
|
||||||
Text_ProjectName.text = "test Name";
|
Text_ProjectName.text = "test Name";
|
||||||
Text_ProjectMetaInfo.text = "test metaInfo";
|
Text_ProjectMetaInfo.text = "test MetaInfo";
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnClickOpen()
|
private void OnClickOpen()
|
||||||
|
|||||||
Reference in New Issue
Block a user