Files
XRLib/Assets/Resources/UIToolkit/Sample/Card/UTKPanelSample.uxml
2026-01-21 20:43:54 +09:00

41 lines
3.3 KiB
Plaintext

<UXML xmlns="UnityEngine.UIElements" xmlns:utk="UVC.UIToolkit" editor-extension-mode="False">
<Style src="project://database/Assets/Resources/UIToolkit/Sample/UTKSampleCommon.uss?fileID=7433441132597879392&amp;guid=c2e4c4a14c2281f41af55d83d60b26e5&amp;type=3#UTKSampleCommon" />
<Style src="project://database/Assets/Resources/UIToolkit/Sample/Card/UTKCardSample.uss?fileID=7433441132597879392&amp;guid=f246df85cf52a774d9b761254cf9793b&amp;type=3#UTKCardSample" />
<VisualElement class="utk-sample-container">
<Label text="패널 컴포넌트" class="utk-sample-desc" />
<VisualElement class="utk-sample-section">
<Label text="Panel" class="utk-sample-section__title" />
<utk:UTKPanel name="panel-sample" title="Panel Title" class="utk-sample-panel">
<Label text="Panel content goes here" />
<Label text="More panel content" />
</utk:UTKPanel>
</VisualElement>
<VisualElement class="utk-sample-section">
<Label text="Panel Variants" class="utk-sample-section__title" />
<utk:UTKPanel name="panel-elevated" title="Elevated Panel" variant="Elevated" class="utk-sample-panel">
<Label text="그림자가 있는 패널" />
</utk:UTKPanel>
<VisualElement style="flex-grow: 1; height: 20px;" />
<utk:UTKPanel name="panel-outlined" title="Outlined Panel" variant="Outlined" class="utk-sample-panel">
<Label text="외곽선 패널" />
</utk:UTKPanel>
<utk:UTKPanel name="panel-flat" title="Flat Panel" variant="Flat" class="utk-sample-panel">
<Label text="플랫 패널" />
</utk:UTKPanel>
</VisualElement>
<VisualElement class="utk-sample-section">
<Label text="Collapsible Panel" class="utk-sample-section__title" />
<utk:UTKPanel name="panel-collapsible" title="접기 가능한 패널" is-collapsible="true" class="utk-sample-panel">
<Label text="헤더를 클릭하면 접힙니다." />
<Label text="추가 콘텐츠" />
</utk:UTKPanel>
</VisualElement>
<!-- Code Sample -->
<VisualElement class="utk-code-sample-container">
<utk:UTKCodeBlock title="C#" code="// 기본 패널&#10;var panel = new UTKPanel();&#10;panel.Title = &quot;설정&quot;;&#10;panel.AddContent(new Label(&quot;패널 내용&quot;));&#10;&#10;// 접을 수 있는 패널&#10;panel.IsCollapsible = true;&#10;panel.IsCollapsed = false;&#10;&#10;// 헤더 액션 버튼 추가&#10;panel.AddHeaderAction(UTKMaterialIcons.Settings, () =&gt; Debug.Log(&quot;설정&quot;));&#10;&#10;// 변형 스타일&#10;panel.Variant = UTKPanel.PanelVariant.Elevated;" />
<utk:UTKCodeBlock title="UXML" code="&lt;!-- 기본 패널 --&gt;&#10;&lt;utk:UTKPanel title=&quot;제목&quot;&gt;&#10; &lt;Label text=&quot;패널 내용&quot; /&gt;&#10;&lt;/utk:UTKPanel&gt;&#10;&#10;&lt;!-- 접을 수 있는 패널 --&gt;&#10;&lt;utk:UTKPanel title=&quot;고급 설정&quot; is-collapsible=&quot;true&quot;&gt;&#10; &lt;Label text=&quot;내용&quot; /&gt;&#10;&lt;/utk:UTKPanel&gt;&#10;&#10;&lt;!-- 외곽선 스타일 --&gt;&#10;&lt;utk:UTKPanel title=&quot;외곽선&quot; variant=&quot;Outlined&quot; /&gt;" />
</VisualElement>
</VisualElement>
</UXML>