ComponentList > 표시 설정 바로가기 기능 개발

This commit is contained in:
logonkhi
2025-08-12 19:06:20 +09:00
parent 3bb2573c51
commit 6f019476b0
12 changed files with 163 additions and 33 deletions

View File

@@ -22,12 +22,12 @@ namespace UVC.Factory.Modal.Settings
if (tabController != null)
{
// 코드로 탭 설정하기
SetupTabs();
SetupTabs(content);
}
}
private void SetupTabs()
private void SetupTabs(ModalContent content)
{
// 1. TabConfig 설정
tabController?.AddTabConfig("GeneralInfo", "일반 정보", "Prefabs/UI/Modal/Setting/GeneralInfoTabContent", "Prefabs/UI/images/icon_info", null, true);
@@ -38,10 +38,27 @@ namespace UVC.Factory.Modal.Settings
// 2. 컨트롤러 초기화
tabController?.Initialize();
tabController.OnTabChanged += (index) =>
if (tabController != null)
{
Debug.Log($"탭이 변경되었습니다: {index}");
};
tabController.OnTabChanged += (index) =>
{
Debug.Log($"탭이 변경되었습니다: {index}");
};
if(content.Message.StartsWith("shortcut:"))
{
// 특정 탭으로 이동
string[] parts = content.Message.Substring("shortcut:".Length).Split('>');
if (parts.Length > 0)
{
//시간차를 계산해 0.5초 후에 탭을 활성화
UniTask.Delay(500).ContinueWith(() => {
Debug.Log($"ActivateTab: {parts[0]}");
string tabKey = parts[0];
tabController.ActivateTab(tabKey, content.Message);
});
}
}
}
}
}
}