46 lines
2.9 KiB
XML
46 lines
2.9 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<UXML xmlns="UnityEngine.UIElements" xmlns:utk="UVC.UIToolkit">
|
|
<Style src="../UTKSampleCommon.uss" />
|
|
<Style src="UTKListSample.uss" />
|
|
|
|
<VisualElement class="utk-sample-container">
|
|
<Label class="utk-sample-desc" text="스크롤 뷰 컴포넌트" />
|
|
|
|
<VisualElement class="utk-sample-section">
|
|
<Label class="utk-sample-section__title" text="ScrollViews" />
|
|
<VisualElement class="utk-sample-row">
|
|
<!-- Vertical Scroll -->
|
|
<utk:UTKScrollView name="scroll-vertical" class="utk-sample-scrollview">
|
|
<Label text="Vertical Item 1" />
|
|
<Label text="Vertical Item 2" />
|
|
<Label text="Vertical Item 3" />
|
|
<Label text="Vertical Item 4" />
|
|
<Label text="Vertical Item 5" />
|
|
<Label text="Vertical Item 6" />
|
|
<Label text="Vertical Item 7" />
|
|
<Label text="Vertical Item 8" />
|
|
<Label text="Vertical Item 9" />
|
|
<Label text="Vertical Item 10" />
|
|
<Label text="Vertical Item 11" />
|
|
<Label text="Vertical Item 12" />
|
|
<Label text="Vertical Item 13" />
|
|
<Label text="Vertical Item 14" />
|
|
<Label text="Vertical Item 15" />
|
|
</utk:UTKScrollView>
|
|
|
|
<!-- Horizontal scroll will be created via C# -->
|
|
<VisualElement name="horizontal-scroll-container" class="utk-sample-scrollview" />
|
|
|
|
<!-- Both scroll will be created via C# -->
|
|
<VisualElement name="both-scroll-container" class="utk-sample-scrollview" />
|
|
</VisualElement>
|
|
</VisualElement>
|
|
|
|
<!-- Code Sample -->
|
|
<VisualElement class="utk-code-sample-container">
|
|
<utk:UTKCodeBlock title="C#" code="// 기본 스크롤 뷰 var scrollView = new UTKScrollView(); scrollView.Add(new Label("내용 1")); scrollView.Add(new Label("내용 2")); scrollView.Add(new Label("내용 3")); // 스크롤 모드 설정 var verticalScroll = new UTKScrollView(ScrollViewMode.Vertical); var horizontalScroll = new UTKScrollView(ScrollViewMode.Horizontal);" />
|
|
<utk:UTKCodeBlock title="UXML" code="<!-- 기본 스크롤 뷰 --> <utk:UTKScrollView style="height: 200px;"> <Label text="항목 1" /> <Label text="항목 2" /> <Label text="항목 3" /> </utk:UTKScrollView> <!-- 수직 스크롤만 --> <utk:UTKScrollView mode="Vertical" /> <!-- 수평 스크롤만 --> <utk:UTKScrollView mode="Horizontal" />" />
|
|
</VisualElement>
|
|
</VisualElement>
|
|
</UXML>
|