74 lines
4.7 KiB
XML
74 lines
4.7 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<UXML xmlns="UnityEngine.UIElements" xmlns:utk="UVC.UIToolkit">
|
|
<Style src="../UTKSampleCommon.uss" />
|
|
<Style src="UTKLabelSample.uss" />
|
|
|
|
<VisualElement class="utk-sample-container">
|
|
<Label class="utk-sample-desc" text="다양한 크기와 아이콘을 지원하는 라벨 컴포넌트" />
|
|
|
|
<!-- Text Sizes -->
|
|
<VisualElement class="utk-sample-section">
|
|
<Label class="utk-sample-section__title" text="Text Sizes" />
|
|
<VisualElement class="utk-sample-column">
|
|
<utk:UTKLabel name="label-h1" text="H1 Heading" size="H1" />
|
|
<utk:UTKLabel name="label-h2" text="H2 Heading" size="H2" />
|
|
<utk:UTKLabel name="label-h3" text="H3 Heading" size="H3" />
|
|
<utk:UTKLabel name="label-body1" text="Body1 Text" size="Body1" />
|
|
<utk:UTKLabel name="label-body2" text="Body2 Text" size="Body2" />
|
|
<utk:UTKLabel name="label-caption" text="Caption Text" size="Caption" />
|
|
</VisualElement>
|
|
</VisualElement>
|
|
|
|
<!-- Material Icon + Text -->
|
|
<VisualElement class="utk-sample-section">
|
|
<Label class="utk-sample-section__title" text="Material Icon + Text" />
|
|
<VisualElement class="utk-sample-row" name="material-icon-row">
|
|
<!-- Labels with material icons will be created via C# -->
|
|
</VisualElement>
|
|
</VisualElement>
|
|
|
|
<!-- Icon Right -->
|
|
<VisualElement class="utk-sample-section">
|
|
<Label class="utk-sample-section__title" text="Icon Right" />
|
|
<VisualElement class="utk-sample-row" name="icon-right-row">
|
|
<!-- Labels with icons on right will be created via C# -->
|
|
</VisualElement>
|
|
</VisualElement>
|
|
|
|
<!-- Image Icon + Text -->
|
|
<VisualElement class="utk-sample-section">
|
|
<Label class="utk-sample-section__title" text="Image Icon + Text" />
|
|
<VisualElement class="utk-sample-row" name="image-icon-row">
|
|
<!-- Labels with image icons will be created via C# -->
|
|
</VisualElement>
|
|
</VisualElement>
|
|
|
|
<!-- Material Icon Only -->
|
|
<VisualElement class="utk-sample-section">
|
|
<Label class="utk-sample-section__title" text="Material Icon Only" />
|
|
<VisualElement class="utk-sample-row" name="material-icon-only-row">
|
|
<!-- Icon-only labels will be created via C# -->
|
|
</VisualElement>
|
|
</VisualElement>
|
|
|
|
<!-- Variants -->
|
|
<VisualElement class="utk-sample-section">
|
|
<Label class="utk-sample-section__title" text="Variants" />
|
|
<VisualElement class="utk-sample-row">
|
|
<utk:UTKLabel name="label-primary" text="Primary" variant="Primary" />
|
|
<utk:UTKLabel name="label-secondary" text="Secondary" variant="Secondary" />
|
|
<utk:UTKLabel name="label-success" text="Success" variant="Success" />
|
|
<utk:UTKLabel name="label-warning" text="Warning" variant="Warning" />
|
|
<utk:UTKLabel name="label-error" text="Error" variant="Error" />
|
|
<utk:UTKLabel name="label-disabled" text="Disabled" variant="Disabled" />
|
|
</VisualElement>
|
|
</VisualElement>
|
|
|
|
<!-- Code Sample -->
|
|
<VisualElement class="utk-code-sample-container">
|
|
<utk:UTKCodeBlock title="C#" code="// 기본 라벨 var label = new UTKLabel(); label.Text = "안녕하세요"; label.Size = UTKLabel.LabelSize.Body1; label.Variant = UTKLabel.LabelVariant.Primary; // 제목 스타일 var title = new UTKLabel(); title.Text = "제목"; title.Size = UTKLabel.LabelSize.Heading1; title.IsBold = true; // Material Icon과 텍스트 함께 사용 var iconLabel = new UTKLabel("설정", UTKMaterialIcons.Settings); // Material Icon만 사용 var iconOnly = new UTKLabel(UTKMaterialIcons.Home);" />
|
|
<utk:UTKCodeBlock title="UXML" code="<!-- 기본 라벨 --> <utk:UTKLabel text="일반 텍스트" /> <!-- 제목 --> <utk:UTKLabel text="제목" size="H1" is-bold="true" /> <!-- 보조 텍스트 --> <utk:UTKLabel text="설명" size="Caption" variant="Secondary" /> <!-- Material Icon과 텍스트 --> <utk:UTKLabel text="설정" material-icon="settings" /> <!-- 아이콘 오른쪽 배치 --> <utk:UTKLabel text="다음" material-icon="arrow_forward" icon-placement="Right" />" />
|
|
</VisualElement>
|
|
</VisualElement>
|
|
</UXML>
|