41 lines
2.2 KiB
Plaintext
41 lines
2.2 KiB
Plaintext
<!--
|
|
TreeListItem.uxml - TreeView 개별 항목 템플릿
|
|
|
|
[개요]
|
|
TreeList의 각 항목(노드)을 표시하는 템플릿입니다.
|
|
TreeList.cs의 MakeItem()에서 이 템플릿을 복제하여 사용합니다.
|
|
|
|
[UI 구조]
|
|
item-root (tree-item-container)
|
|
├── item-label - 항목 이름 표시 라벨
|
|
└── visibility-btn - 가시성 토글 버튼 (눈 아이콘)
|
|
|
|
[바인딩]
|
|
- item-label.text : TreeListItemData.name에 바인딩
|
|
- visibility-btn.class : IsVisible 상태에 따라 visibility-on/off 클래스 토글
|
|
|
|
[이벤트]
|
|
- visibility-btn 클릭 시 해당 항목과 하위 항목의 3D 모델 가시성 토글
|
|
|
|
[스타일]
|
|
- TreeList.uss의 .visibility-toggle 클래스 적용
|
|
- 높이 32px 고정 (TreeList.uxml의 fixed-item-height와 일치)
|
|
|
|
[연관 파일]
|
|
- TreeList.uxml : 부모 컨테이너
|
|
- TreeList.uss : 스타일시트
|
|
- TreeList.cs : 바인딩 및 이벤트 처리
|
|
- TreeListItemData.cs : 데이터 모델
|
|
-->
|
|
<ui:UXML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" noNamespaceSchemaLocation="../../../../../UIElementsSchema/UIElements.xsd" editor-extension-mode="False">
|
|
<Style src="project://database/Assets/Resources/SHI/Modal/TreeList.uss?fileID=7433441132597879392&guid=a1b1f50d423b463408e1f540fb4acfe9&type=3#TreeList" />
|
|
|
|
<!-- 항목 루트 컨테이너: 가로 배치, 라벨과 버튼 양 끝 정렬 -->
|
|
<ui:VisualElement name="item-root" class="tree-item-container" style="flex-direction: row; justify-content: space-between; height: 32px; padding-left: 0; padding-right: 8px; align-items: center;">
|
|
<!-- 항목 이름 라벨: TreeListItemData.name에 바인딩됨 -->
|
|
<ui:Label name="item-label" text="Item Name" class="item-label-style" style="flex-grow: 1; margin-top: 0; margin-right: 0; margin-bottom: 0; margin-left: 0; padding-left: 4px; padding-top: 0; padding-bottom: 0; padding-right: 4px; color: rgb(255, 255, 255); font-size: 14px;" />
|
|
<!-- 가시성 토글 버튼: 클릭 시 3D 모델 표시/숨김 전환 -->
|
|
<ui:Button name="visibility-btn" class="visibility-toggle" />
|
|
</ui:VisualElement>
|
|
</ui:UXML>
|