샘플 코드 개선. UTKHelpBox 개선

This commit is contained in:
logonkhi
2026-01-26 20:00:21 +09:00
parent 99f9c3b26d
commit 097436a8b0
18 changed files with 1321 additions and 81 deletions

View File

@@ -13,6 +13,147 @@ public partial class UTKStyleGuideSample
{
#region Button Initializers
private void InitializeCheckBoxSample(VisualElement root)
{
SetCodeSamples(root,
csharpCode: @"// 기본 체크박스
var checkbox = new UTKCheckBox();
checkbox.Text = ""약관에 동의합니다"";
checkbox.OnValueChanged += (isChecked) => Debug.Log($""체크: {isChecked}"");
// 상태 설정
checkbox.IsChecked = true;
checkbox.IsIndeterminate = true; // 부분 선택 상태
// 생성자로 생성
var acceptCheckbox = new UTKCheckBox(""이메일 수신 동의"", true);
// 비활성화
checkbox.IsEnabled = false;
// 상태 확인
if (checkbox.IsChecked)
{
Debug.Log(""체크되어 있습니다"");
}
// 토글
checkbox.IsChecked = !checkbox.IsChecked;",
uxmlCode: @"<!-- 네임스페이스 선언 -->
<ui:UXML xmlns:utk=""UVC.UIToolkit"">
<!-- 기본 체크박스 -->
<utk:UTKCheckBox text=""이메일 수신 동의"" />
<!-- 기본값 체크됨 -->
<utk:UTKCheckBox text=""자동 로그인"" is-checked=""true"" />
<!-- 불확정 상태 -->
<utk:UTKCheckBox text=""부분 선택"" is-indeterminate=""true"" />
<!-- 비활성화 -->
<utk:UTKCheckBox text=""필수 동의"" is-enabled=""false"" is-checked=""true"" />
</ui:UXML>");
}
private void InitializeToggleSample(VisualElement root)
{
SetCodeSamples(root,
csharpCode: @"// 기본 토글
var toggle = new UTKToggle();
toggle.label = ""알림 받기""; // Unity Toggle의 label 프로퍼티 (소문자)
toggle.IsOn = true;
toggle.OnValueChanged += (isOn) => Debug.Log($""토글: {isOn}"");
// 생성자로 생성
var darkModeToggle = new UTKToggle(""다크 모드"");
// 상태 설정 (알림 없이)
toggle.SetOn(true, notify: false);
// 상태 설정 (알림 포함)
toggle.SetOn(false, notify: true);
// 비활성화
toggle.IsEnabled = false;
// 상태 확인
if (toggle.IsOn)
{
Debug.Log(""켜져 있습니다"");
}",
uxmlCode: @"<!-- 네임스페이스 선언 -->
<ui:UXML xmlns:utk=""UVC.UIToolkit"">
<!-- 기본 토글 -->
<utk:UTKToggle label=""다크 모드"" />
<!-- 기본값 켜짐 -->
<utk:UTKToggle label=""자동 저장"" is-on=""true"" />
<!-- 비활성화 (꺼짐) -->
<utk:UTKToggle label=""프리미엄 기능"" is-enabled=""false"" />
<!-- 비활성화 (켜짐) -->
<utk:UTKToggle label=""필수 기능"" is-on=""true"" is-enabled=""false"" />
</ui:UXML>");
}
private void InitializeRadioButtonSample(VisualElement root)
{
SetCodeSamples(root,
csharpCode: @"// 라디오 버튼 그룹
var group = new RadioButtonGroup();
var radio1 = new UTKRadioButton { text = ""옵션 1"" };
var radio2 = new UTKRadioButton { text = ""옵션 2"" };
var radio3 = new UTKRadioButton { text = ""옵션 3"" };
group.Add(radio1);
group.Add(radio2);
group.Add(radio3);
// 선택 이벤트
radio1.OnValueChanged += (isSelected) =>
{
if (isSelected) Debug.Log(""옵션 1 선택됨"");
};
// 생성자로 생성
var optionA = new UTKRadioButton(""옵션 A"");
// 프로그램으로 선택
radio2.SetChecked(true, notify: true);
// 비활성화
radio3.IsEnabled = false;
// 현재 선택 확인
if (radio1.IsChecked)
{
Debug.Log(""라디오 1이 선택됨"");
}",
uxmlCode: @"<!-- 네임스페이스 선언 -->
<ui:UXML xmlns:utk=""UVC.UIToolkit"">
<!-- 라디오 버튼 그룹 -->
<ui:RadioButtonGroup>
<utk:UTKRadioButton text=""소형"" />
<utk:UTKRadioButton text=""중형"" is-checked=""true"" />
<utk:UTKRadioButton text=""대형"" />
</ui:RadioButtonGroup>
<!-- 비활성화 옵션 포함 -->
<ui:RadioButtonGroup>
<utk:UTKRadioButton text=""옵션 A"" is-checked=""true"" />
<utk:UTKRadioButton text=""옵션 B"" />
<utk:UTKRadioButton text=""옵션 C"" />
<utk:UTKRadioButton text=""비활성화"" is-enabled=""false"" />
</ui:RadioButtonGroup>
</ui:UXML>");
}
private void InitializeButtonSample(VisualElement root)
{
// Icon Only 버튼 추가
@@ -202,9 +343,12 @@ group1.AddButton(""Option 2"");
group1.AddButton(""Option 3"");
// 선택 이벤트
group1.OnSelectionChanged += (index) =>
group1.OnSelectionChanged += (indices) =>
{
Debug.Log($""선택된 버튼: {index}"");
foreach (var index in indices)
{
Debug.Log($""선택된 버튼: {index}"");
}
};
// Multiple Selection
@@ -214,18 +358,15 @@ group2.AddButton(""B"");
group2.AddButton(""C"");
group2.AddButton(""D"");
group2.OnSelectionChanged += (index) =>
group2.OnSelectionChanged += (indices) =>
{
Debug.Log($""토글된 버튼: {index}"");
Debug.Log($""토글된 버튼: {indices.Count()}"");
};
// 선택된 인덱스 가져오기
var selectedIndex = group1.SelectedIndex; // Single
var selectedIndices = group2.SelectedIndices; // Multiple
// 프로그램으로 선택
group1.SelectButton(1); // 두 번째 버튼 선택
group2.ToggleButton(0); // 첫 번째 버튼 토글
// 선택된 인덱스 가져오기 (Unity 기본 API)
var state = group1.value;
var buffer = new int[state.length];
var activeOptions = state.GetActiveOptions(buffer);
// Disabled
var group3 = new UTKToggleButtonGroup { IsEnabled = false };

View File

@@ -0,0 +1,108 @@
#nullable enable
using System;
using System.Collections.Generic;
using Cysharp.Threading.Tasks;
using UnityEngine;
using UnityEngine.UIElements;
using UVC.UIToolkit;
/// <summary>
/// UTKStyleGuideSample의 Card 카테고리 Initialize 메서드들
/// </summary>
public partial class UTKStyleGuideSample
{
#region Card Initializers
private void InitializeCardSample(VisualElement root)
{
SetCodeSamples(root,
csharpCode: @"// 기본 카드
var card = new UTKCard();
card.Title = ""제목"";
card.Description = ""카드 설명"";
// 콘텐츠 추가
card.Add(new Label(""카드 내용""));
card.Add(new UTKButton(""버튼""));
// 생성자로 생성
var infoCard = new UTKCard(""정보"", ""상세 정보"");
// 헤더만
var headerCard = new UTKCard();
headerCard.Title = ""헤더만 있는 카드"";
// 변형 스타일
card.Variant = UTKCard.CardVariant.Outlined;
card.Variant = UTKCard.CardVariant.Elevated;
// 패딩 설정
card.ContentPadding = 20;",
uxmlCode: @"<!-- 네임스페이스 선언 -->
<ui:UXML xmlns:utk=""UVC.UIToolkit"">
<!-- 기본 카드 -->
<utk:UTKCard title=""제목"" description=""카드 설명"">
<ui:Label text=""카드 내용"" />
</utk:UTKCard>
<!-- 외곽선 스타일 -->
<utk:UTKCard title=""외곽선 카드"" variant=""Outlined"">
<ui:Label text=""내용"" />
</utk:UTKCard>
<!-- 입체 스타일 -->
<utk:UTKCard title=""입체 카드"" variant=""Elevated"">
<ui:Label text=""내용"" />
</utk:UTKCard>
</ui:UXML>");
}
private void InitializePanelSample(VisualElement root)
{
SetCodeSamples(root,
csharpCode: @"// 기본 패널
var panel = new UTKPanel();
panel.Add(new Label(""패널 내용""));
// 제목이 있는 패널
var titlePanel = new UTKPanel();
titlePanel.Title = ""패널 제목"";
titlePanel.Add(new Label(""내용""));
// 변형 스타일
panel.Variant = UTKPanel.PanelVariant.Default;
panel.Variant = UTKPanel.PanelVariant.Outlined;
panel.Variant = UTKPanel.PanelVariant.Elevated;
// 패딩 설정
panel.Padding = 16;",
uxmlCode: @"<!-- 네임스페이스 선언 -->
<ui:UXML xmlns:utk=""UVC.UIToolkit"">
<!-- 기본 패널 -->
<utk:UTKPanel>
<ui:Label text=""패널 내용"" />
</utk:UTKPanel>
<!-- 제목이 있는 패널 -->
<utk:UTKPanel title=""패널 제목"">
<ui:Label text=""내용"" />
</utk:UTKPanel>
<!-- 외곽선 스타일 -->
<utk:UTKPanel variant=""Outlined"">
<ui:Label text=""내용"" />
</utk:UTKPanel>
<!-- 입체 스타일 -->
<utk:UTKPanel variant=""Elevated"">
<ui:Label text=""내용"" />
</utk:UTKPanel>
</ui:UXML>");
}
#endregion
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 280a8792bb1912745ba436c7fe7225e4

View File

@@ -80,6 +80,53 @@ public partial class UTKStyleGuideSample
searchField.OnSubmit += PerformSearch;
searchField.OnBlurred += () => PerformSearch(searchField.Value);
}
SetCodeSamples(root,
csharpCode: @"// 폰트 로드
Font font = UTKMaterialIcons.LoadFont();
// Label에 아이콘 적용
var label = new Label(UTKMaterialIcons.Home);
UTKMaterialIcons.ApplyIconStyle(label);
// 또는 직접 스타일 정의 사용
label.style.unityFontDefinition = UTKMaterialIcons.GetFontDefinition();
// 이름으로 아이콘 조회
string icon = UTKMaterialIcons.GetIcon(""settings"");
// 아이콘 존재 여부 확인
if (UTKMaterialIcons.HasIcon(""search"")) { }
// 전체 아이콘 이름 순회
foreach (var name in UTKMaterialIcons.GetAllIconNames())
{
Debug.Log(name);
}
// 아이콘 총 개수
int count = UTKMaterialIcons.Count;
// 비동기 폰트 로드
Font? fontAsync = await UTKMaterialIcons.LoadFontAsync(cancellationToken);
// 비동기로 아이콘 스타일 적용
await UTKMaterialIcons.ApplyIconStyleAsync(label, cancellationToken);",
uxmlCode: @"<!-- USS 파일에서 폰트 설정 -->
.material-icon {
-unity-font-definition: resource('Fonts/Icons/MaterialSymbolsOutlined');
font-size: 24px;
-unity-text-align: middle-center;
}
<!-- UXML 파일에서 사용 -->
<ui:Label class=""material-icon"" text="""" /> <!-- home 아이콘 -->
<ui:Label class=""material-icon"" text="""" /> <!-- settings 아이콘 -->
<!-- C# 코드에서 UXML Label에 아이콘 적용 -->
<!-- var iconLabel = root.Q<Label>(""my-icon""); -->
<!-- iconLabel.text = UTKMaterialIcons.Settings; -->
<!-- UTKMaterialIcons.ApplyIconStyle(iconLabel); -->");
}
private List<List<string>> CreateIconRowData(List<string> iconNames)
@@ -295,6 +342,61 @@ public partial class UTKStyleGuideSample
searchField.OnSubmit += PerformSearch;
searchField.OnBlurred += () => PerformSearch(searchField.Value);
}
SetCodeSamples(root,
csharpCode: @"// 상수로 리소스 경로 사용
string path = UTKImageIcons.BtnClose16;
// 동기 Sprite 로드 (캐싱됨)
Sprite sprite = UTKImageIcons.LoadSprite(UTKImageIcons.BtnClose16);
// 비동기 Sprite 로드 (캐싱됨)
Sprite? spriteAsync = await UTKImageIcons.LoadSpriteAsync(UTKImageIcons.IconSetting22, cancellationToken);
// 동기 Texture2D 로드 (캐싱됨)
Texture2D texture = UTKImageIcons.LoadTexture(UTKImageIcons.IconSetting22);
// 비동기 Texture2D 로드 (캐싱됨)
Texture2D? textureAsync = await UTKImageIcons.LoadTextureAsync(UTKImageIcons.IconSetting22, cancellationToken);
// 이름으로 Sprite 로드
Sprite icon = UTKImageIcons.LoadSpriteByName(""btn_close_16"");
// 이름으로 비동기 Sprite 로드
Sprite? iconAsync = await UTKImageIcons.LoadSpriteByNameAsync(""btn_close_16"", cancellationToken);
// 이름으로 경로 조회
string iconPath = UTKImageIcons.GetPath(""icon_setting_22"");
// 아이콘 존재 여부 확인
if (UTKImageIcons.HasIcon(""btn_close_16"")) { }
// 전체 아이콘 이름 순회
foreach (var name in UTKImageIcons.GetAllIconNames())
{
Debug.Log(name);
}
// 캐시 클리어
UTKImageIcons.ClearCache();",
uxmlCode: @"<!-- USS 파일에서 이미지 아이콘 설정 -->
.my-icon {
width: 24px;
height: 24px;
background-image: resource('UIToolkit/Images/icon_setting_22');
}
<!-- UXML 파일에서 사용 -->
<VisualElement class=""my-icon"" />
<!-- C# 코드에서 UXML 요소에 이미지 적용 -->
<!-- var iconElement = root.Q<VisualElement>(""my-icon""); -->
<!-- var texture = UTKImageIcons.LoadTextureByName(""icon_setting_22""); -->
<!-- iconElement.style.backgroundImage = new StyleBackground(texture); -->
<!-- Image 요소에서 사용 -->
<!-- var image = root.Q<Image>(""my-image""); -->
<!-- image.sprite = UTKImageIcons.LoadSpriteByName(""btn_close_16""); -->");
}
private List<List<string>> CreateImageIconRowData(List<string> iconNames)
@@ -505,6 +607,58 @@ public partial class UTKStyleGuideSample
imgExternal.Src = sampleUrl;
});
}
SetCodeSamples(root,
csharpCode: @"// 내부 리소스 이미지 로드
var image = new UTKImage();
image.Src = ""UIToolkit/Images/icon_setting_22"";
image.style.width = 100;
image.style.height = 100;
// 외부 URL 이미지 로드
var webImage = new UTKImage();
webImage.Src = ""https://picsum.photos/200"";
webImage.ScaleMode = ScaleMode.ScaleToFit;
// 생성자에서 소스 지정
var profileImage = new UTKImage(""https://api.example.com/avatar/123"");
profileImage.style.width = 64;
profileImage.style.height = 64;
profileImage.style.borderTopLeftRadius = 32;
profileImage.style.borderTopRightRadius = 32;
profileImage.style.borderBottomLeftRadius = 32;
profileImage.style.borderBottomRightRadius = 32;
// 이미지 로드 이벤트 핸들링
image.OnImageLoaded += (texture) => Debug.Log(""이미지 로드 완료"");
image.OnImageFailed += (error) => Debug.LogError($""로드 실패: {error}"");
// 틴트 색상 적용
image.TintColor = Color.red;
// 비동기 로드
await image.LoadAsync(""https://example.com/image.png"", cancellationToken);",
uxmlCode: @"<!-- 네임스페이스 선언 -->
<ui:UXML xmlns:utk=""UVC.UIToolkit"">
<!-- 내부 리소스 이미지 -->
<utk:UTKImage src=""UIToolkit/Images/icon_setting_22""
style=""width: 48px; height: 48px;"" />
<!-- 외부 URL 이미지 -->
<utk:UTKImage src=""https://picsum.photos/200""
style=""width: 200px; height: 150px;""
scale-mode=""ScaleToFit"" />
<!-- 둥근 프로필 이미지 -->
<utk:UTKImage src=""https://api.example.com/avatar""
class=""profile-avatar"" />
<!-- 틴트 색상 적용 -->
<utk:UTKImage src=""UIToolkit/Images/icon_home""
tint-color=""#FF5500"" />
</ui:UXML>");
}
#endregion

View File

@@ -13,6 +13,175 @@ public partial class UTKStyleGuideSample
{
#region Input Initializers
private void InitializeInputFieldSample(VisualElement root)
{
SetCodeSamples(root,
csharpCode: @"// 기본 입력 필드
var input = new UTKInputField();
input.label = ""이름""; // Unity TextField의 label 프로퍼티 (소문자)
input.Placeholder = ""이름을 입력하세요"";
input.OnValueChanged += (value) => Debug.Log($""입력값: {value}"");
// 비밀번호 입력 필드
var password = new UTKInputField();
password.label = ""비밀번호"";
password.isPasswordField = true;
// 검증 오류 표시
input.ErrorMessage = ""이름은 필수입니다."";
input.ErrorMessage = """"; // 오류 제거
// 변형 스타일
input.Variant = UTKInputField.InputFieldVariant.Outlined;
// 이벤트
input.OnFocused += () => Debug.Log(""포커스"");
input.OnBlurred += () => Debug.Log(""포커스 해제"");
input.OnSubmit += (value) => Debug.Log($""제출: {value}"");
// 비활성화
input.IsEnabled = false;
// 읽기 전용
input.isReadOnly = true;
// 여러 줄 입력
input.multiline = true;",
uxmlCode: @"<!-- 네임스페이스 선언 -->
<ui:UXML xmlns:utk=""UVC.UIToolkit"">
<!-- 기본 입력 필드 -->
<utk:UTKInputField label=""이름"" />
<!-- 플레이스홀더 -->
<utk:UTKInputField label=""이메일"" placeholder=""example@email.com"" />
<!-- 비밀번호 필드 -->
<utk:UTKInputField label=""비밀번호"" is-password-field=""true"" />
<!-- 여러 줄 입력 -->
<utk:UTKInputField label=""설명"" multiline=""true"" />
<!-- 비활성화 -->
<utk:UTKInputField label=""읽기전용"" is-enabled=""false"" value=""수정 불가"" />
</ui:UXML>");
}
private void InitializeIntegerFieldSample(VisualElement root)
{
SetCodeSamples(root,
csharpCode: @"// 기본 정수 필드
var intField = new UTKIntegerField(""나이"");
intField.Value = 25;
intField.OnValueChanged += (value) => Debug.Log($""나이: {value}"");
// 범위 제한 (이벤트로 처리)
intField.OnValueChanged += (value) =>
{
if (value < 0) intField.Value = 0;
if (value > 150) intField.Value = 150;
};
// 비활성화
intField.IsEnabled = false;",
uxmlCode: @"<!-- 네임스페이스 선언 -->
<ui:UXML xmlns:utk=""UVC.UIToolkit"">
<!-- 기본 정수 필드 -->
<utk:UTKIntegerField label=""나이"" />
<!-- 기본값 설정 -->
<utk:UTKIntegerField label=""점수"" value=""100"" />
<!-- 비활성화 -->
<utk:UTKIntegerField label=""읽기전용"" is-enabled=""false"" value=""50"" />
</ui:UXML>");
}
private void InitializeLongFieldSample(VisualElement root)
{
SetCodeSamples(root,
csharpCode: @"// 기본 Long 필드
var longField = new UTKLongField(""파일 크기"");
longField.Value = 1073741824; // 1GB
longField.OnValueChanged += (value) => Debug.Log($""크기: {value} bytes"");
// 비활성화
longField.IsEnabled = false;",
uxmlCode: @"<!-- 네임스페이스 선언 -->
<ui:UXML xmlns:utk=""UVC.UIToolkit"">
<!-- 기본 Long 필드 -->
<utk:UTKLongField label=""파일 크기"" />
<!-- 기본값 설정 -->
<utk:UTKLongField label=""큰 숫자"" value=""9223372036854775807"" />
<!-- 비활성화 -->
<utk:UTKLongField label=""읽기전용"" is-enabled=""false"" />
</ui:UXML>");
}
private void InitializeFloatFieldSample(VisualElement root)
{
SetCodeSamples(root,
csharpCode: @"// 기본 Float 필드
var floatField = new UTKFloatField(""속도"");
floatField.Value = 9.8f;
floatField.OnValueChanged += (value) => Debug.Log($""속도: {value}"");
// 범위 제한 (이벤트로 처리)
floatField.OnValueChanged += (value) =>
{
if (value < 0f) floatField.Value = 0f;
if (value > 100f) floatField.Value = 100f;
};
// 비활성화
floatField.IsEnabled = false;",
uxmlCode: @"<!-- 네임스페이스 선언 -->
<ui:UXML xmlns:utk=""UVC.UIToolkit"">
<!-- 기본 Float 필드 -->
<utk:UTKFloatField label=""속도"" />
<!-- 기본값 설정 -->
<utk:UTKFloatField label=""중력"" value=""9.8"" />
<!-- 비활성화 -->
<utk:UTKFloatField label=""읽기전용"" is-enabled=""false"" value=""3.14"" />
</ui:UXML>");
}
private void InitializeDoubleFieldSample(VisualElement root)
{
SetCodeSamples(root,
csharpCode: @"// 기본 Double 필드
var doubleField = new UTKDoubleField(""정밀도"");
doubleField.Value = 3.141592653589793;
doubleField.OnValueChanged += (value) => Debug.Log($""값: {value}"");
// 비활성화
doubleField.IsEnabled = false;",
uxmlCode: @"<!-- 네임스페이스 선언 -->
<ui:UXML xmlns:utk=""UVC.UIToolkit"">
<!-- 기본 Double 필드 -->
<utk:UTKDoubleField label=""정밀도"" />
<!-- 기본값 설정 -->
<utk:UTKDoubleField label=""파이"" value=""3.141592653589793"" />
<!-- 비활성화 -->
<utk:UTKDoubleField label=""읽기전용"" is-enabled=""false"" />
</ui:UXML>");
}
private void InitializeNumberStepperSample(VisualElement root)
{
var disabledRow = root.Q<VisualElement>("stepper-disabled-row");
@@ -82,7 +251,7 @@ positionField.OnValueChanged += (newValue) => Debug.Log($""Position: {newValue}"
// 라벨 없이
var field = new UTKVector2Field();
field.Label = """";
field.label = """";
// 읽기 전용
var readOnlyField = new UTKVector2Field(""ReadOnly"");
@@ -353,5 +522,128 @@ enumField.IsEnabled = false;",
<utk:UTKEnumDropDown name=""enum-dropdown-2"" label=""Choice"" is-enabled=""false"" />");
}
#region Slider Initializers
private void InitializeSliderSample(VisualElement root)
{
SetCodeSamples(root,
csharpCode: @"// 기본 슬라이더
var slider = new UTKSlider();
slider.label = ""볼륨""; // Unity Slider의 label 프로퍼티 (소문자)
slider.lowValue = 0;
slider.highValue = 100;
slider.value = 50;
slider.OnValueChanged += (value) => Debug.Log($""볼륨: {value}"");
// 생성자로 생성
var volumeSlider = new UTKSlider(""볼륨"", 0, 100, 75);
// 정수만 허용
slider.showInputField = true;
// 비활성화
slider.IsEnabled = false;",
uxmlCode: @"<!-- 네임스페이스 선언 -->
<ui:UXML xmlns:utk=""UVC.UIToolkit"">
<!-- 기본 슬라이더 -->
<utk:UTKSlider label=""볼륨"" low-value=""0"" high-value=""100"" value=""50"" />
<!-- 정수만 -->
<utk:UTKSlider label=""레벨"" low-value=""1"" high-value=""10"" value=""5"" whole-numbers=""true"" />
<!-- 비활성화 -->
<utk:UTKSlider label=""잠금"" is-enabled=""false"" value=""30"" />
</ui:UXML>");
}
private void InitializeMinMaxSliderSample(VisualElement root)
{
SetCodeSamples(root,
csharpCode: @"// 기본 MinMax 슬라이더
var minMaxSlider = new UTKMinMaxSlider();
minMaxSlider.label = ""가격 범위""; // Unity MinMaxSlider의 label 프로퍼티
minMaxSlider.lowLimit = 0; // 전체 범위 최소값
minMaxSlider.highLimit = 1000; // 전체 범위 최대값
minMaxSlider.MinValue = 100; // 선택 범위 최소값
minMaxSlider.MaxValue = 500; // 선택 범위 최대값
// 값 변경 이벤트 (Vector2로 반환됨)
minMaxSlider.OnValueChanged += (range) =>
{
Debug.Log($""범위: {range.x} ~ {range.y}"");
};
// 생성자로 생성 (label, lowLimit, highLimit, minValue, maxValue)
var rangeSlider = new UTKMinMaxSlider(""범위"", 0, 100, 20, 80);
// 비활성화
minMaxSlider.IsEnabled = false;",
uxmlCode: @"<!-- 네임스페이스 선언 -->
<ui:UXML xmlns:utk=""UVC.UIToolkit"">
<!-- 기본 MinMax 슬라이더 -->
<utk:UTKMinMaxSlider label=""가격 범위"" min-limit=""0"" max-limit=""1000"" min-value=""100"" max-value=""500"" />
<!-- 비활성화 -->
<utk:UTKMinMaxSlider label=""잠금"" is-enabled=""false"" />
</ui:UXML>");
}
private void InitializeProgressBarSample(VisualElement root)
{
SetCodeSamples(root,
csharpCode: @"// 기본 프로그레스 바
var progressBar = new UTKProgressBar();
progressBar.title = ""다운로드""; // ProgressBar의 title 프로퍼티
progressBar.MinValue = 0; // 또는 lowValue 직접 사용
progressBar.MaxValue = 100; // 또는 highValue 직접 사용
progressBar.Value = 45;
// 생성자로 생성 (title, minValue, maxValue, defaultValue)
var downloadBar = new UTKProgressBar(""다운로드"", 0, 100, 75);
// 진행률 업데이트
progressBar.Value = 75;
// 퍼센트 표시
progressBar.ShowPercentage = true;
// 색상 변형
progressBar.Variant = UTKProgressBar.ProgressBarVariant.Success;
progressBar.Variant = UTKProgressBar.ProgressBarVariant.Warning;
progressBar.Variant = UTKProgressBar.ProgressBarVariant.Danger;
// 비동기 작업 진행률 표시
async UniTask LoadDataAsync()
{
for (int i = 0; i <= 100; i += 10)
{
progressBar.Value = i;
await UniTask.Delay(100);
}
}",
uxmlCode: @"<!-- 네임스페이스 선언 -->
<ui:UXML xmlns:utk=""UVC.UIToolkit"">
<!-- 기본 프로그레스 바 -->
<utk:UTKProgressBar label=""로딩"" low-value=""0"" high-value=""100"" value=""45"" />
<!-- 성공 스타일 -->
<utk:UTKProgressBar label=""완료"" value=""100"" variant=""Success"" />
<!-- 경고 스타일 -->
<utk:UTKProgressBar label=""주의"" value=""75"" variant=""Warning"" />
<!-- 위험 스타일 -->
<utk:UTKProgressBar label=""오류"" value=""30"" variant=""Danger"" />
</ui:UXML>");
}
#endregion
#endregion
}

View File

@@ -87,6 +87,42 @@ var iconOnly = new UTKLabel(UTKMaterialIcons.Home);",
<utk:UTKLabel text=""다음"" material-icon=""arrow_forward"" icon-placement=""Right"" />");
}
private void InitializeHelpBoxSample(VisualElement root)
{
SetCodeSamples(root,
csharpCode: @"// 기본 도움말 박스
var helpBox = new UTKHelpBox();
helpBox.Text = ""이것은 정보 메시지입니다."";
// 생성자로 생성
var infoBox = new UTKHelpBox(""저장이 완료되었습니다."", UTKHelpBox.MessageType.Info);
// 메시지 타입별
var successBox = new UTKHelpBox(""작업 성공!"", UTKHelpBox.MessageType.Success);
var warningBox = new UTKHelpBox(""주의가 필요합니다."", UTKHelpBox.MessageType.Warning);
var errorBox = new UTKHelpBox(""오류가 발생했습니다."", UTKHelpBox.MessageType.Error);
// 메시지 변경
helpBox.Text = ""새로운 메시지"";
helpBox.messageType = UTKHelpBox.MessageType.Warning;",
uxmlCode: @"<!-- 네임스페이스 선언 -->
<ui:UXML xmlns:utk=""UVC.UIToolkit"">
<!-- 기본 정보 -->
<utk:UTKHelpBox text=""이것은 정보 메시지입니다."" message-type=""Info"" />
<!-- 성공 메시지 -->
<utk:UTKHelpBox text=""작업이 성공적으로 완료되었습니다."" message-type=""Success"" />
<!-- 경고 메시지 -->
<utk:UTKHelpBox text=""주의: 이 작업은 되돌릴 수 없습니다."" message-type=""Warning"" />
<!-- 오류 메시지 -->
<utk:UTKHelpBox text=""오류: 파일을 찾을 수 없습니다."" message-type=""Error"" />
</ui:UXML>");
}
#endregion
#region List Initializers
@@ -258,6 +294,49 @@ treeView.selectionChanged += (items) =>
listView.columns["progress"].makeCell = () => new Label();
listView.columns["progress"].bindCell = (e, i) => ((Label)e).text = $"{items[i].Progress}%";
}
SetCodeSamples(root,
csharpCode: @"// 기본 사용법
var listView = new UTKMultiColumnListView();
// 컴럼 추가
listView.columns.Add(new Column { name = ""id"", title = ""ID"", width = 50 });
listView.columns.Add(new Column { name = ""name"", title = ""Name"", width = 150, stretchable = true });
listView.columns.Add(new Column { name = ""status"", title = ""Status"", width = 100 });
listView.columns.Add(new Column { name = ""progress"", title = ""Progress"", width = 80 });
// 데이터 소스 설정
var items = new List<SampleListItem>
{
new() { Id = 1, Name = ""Task Alpha"", Status = ""Active"", Progress = 75 },
new() { Id = 2, Name = ""Task Beta"", Status = ""Pending"", Progress = 30 },
};
listView.itemsSource = items;
listView.fixedItemHeight = 24;
// 각 컴럼에 makeCell과 bindCell 설정
listView.columns[""id""].makeCell = () => new Label();
listView.columns[""id""].bindCell = (e, i) => ((Label)e).text = items[i].Id.ToString();
listView.columns[""name""].makeCell = () => new Label();
listView.columns[""name""].bindCell = (e, i) => ((Label)e).text = items[i].Name;
// 선택 이벤트
listView.OnItemSelected += (index) => Debug.Log($""선택된 행: {index}"");
listView.OnItemDoubleClicked += (index) => Debug.Log($""더블클릭: {index}"");",
uxmlCode: @"<!-- 네임스페이스 선언 -->
<ui:UXML xmlns:utk=""UVC.UIToolkit"">
<!-- 기본 사용 -->
<utk:UTKMultiColumnListView name=""multicolumn-listview-sample"" />
<!-- 스타일 적용 -->
<utk:UTKMultiColumnListView class=""custom-listview"" style=""height: 300px;"" />
</ui:UXML>
<!-- C#에서 컴럼과 데이터 설정 필요 -->");
}
private class SampleTreeItem
@@ -323,6 +402,58 @@ treeView.selectionChanged += (items) =>
treeView.ExpandAll();
}
SetCodeSamples(root,
csharpCode: @"// 기본 사용법
var treeView = new UTKMultiColumnTreeView();
// 컴럼 추가
treeView.columns.Add(new Column { name = ""name"", title = ""Name"", width = 200, stretchable = true });
treeView.columns.Add(new Column { name = ""type"", title = ""Type"", width = 100 });
treeView.columns.Add(new Column { name = ""size"", title = ""Size"", width = 80 });
// 계층적 데이터 생성
var rootItems = new List<TreeViewItemData<SampleTreeItem>>
{
new(1, new SampleTreeItem { Name = ""Documents"", Type = ""Folder"", Size = ""2.5 GB"" },
new List<TreeViewItemData<SampleTreeItem>>
{
new(11, new SampleTreeItem { Name = ""Reports"", Type = ""Folder"", Size = ""500 MB"" },
new List<TreeViewItemData<SampleTreeItem>>
{
new(111, new SampleTreeItem { Name = ""Q1_Report.pdf"", Type = ""PDF"", Size = ""2.3 MB"" }),
}),
}),
};
treeView.SetRootItems(rootItems);
treeView.fixedItemHeight = 22;
// 각 컴럼에 makeCell과 bindCell 설정
treeView.columns[""name""].makeCell = () => new Label();
treeView.columns[""name""].bindCell = (e, i) =>
{
var item = treeView.GetItemDataForIndex<SampleTreeItem>(i);
((Label)e).text = item.Name;
};
// 모든 노드 펼치기
treeView.ExpandAll();
// 선택 이벤트
treeView.OnItemSelected += (index) => Debug.Log($""선택된 항목: {index}"");",
uxmlCode: @"<!-- 네임스페이스 선언 -->
<ui:UXML xmlns:utk=""UVC.UIToolkit"">
<!-- 기본 사용 -->
<utk:UTKMultiColumnTreeView name=""multicolumn-treeview-sample"" />
<!-- 스타일 적용 -->
<utk:UTKMultiColumnTreeView class=""custom-treeview"" style=""height: 300px;"" />
</ui:UXML>
<!-- C#에서 컴럼과 데이터 설정 필요 -->");
}
private void InitializeScrollViewSample(VisualElement root)
@@ -366,6 +497,93 @@ treeView.selectionChanged += (items) =>
}
bothContainer.Add(bothScroll);
}
SetCodeSamples(root,
csharpCode: @"// 기본 스크롤 뷰 (세로)
var scrollView = new UTKScrollView();
scrollView.Add(new Label(""내용 1""));
scrollView.Add(new Label(""내용 2""));
scrollView.Add(new Label(""내용 3""));
// 스크롤 모드 설정
var verticalScroll = new UTKScrollView();
verticalScroll.mode = ScrollViewMode.Vertical; // 세로 스크롤
var horizontalScroll = new UTKScrollView();
horizontalScroll.mode = ScrollViewMode.Horizontal; // 가로 스크롤
horizontalScroll.style.height = 150;
horizontalScroll.style.width = 200;
var bothScroll = new UTKScrollView();
bothScroll.mode = ScrollViewMode.VerticalAndHorizontal; // 양방향 스크롤
// 스크롤 위치 제어
scrollView.scrollOffset = new Vector2(0, 100); // 100px 아래로 스크롤
// 스크롤바 표시 설정
scrollView.verticalScrollerVisibility = ScrollerVisibility.Auto;
scrollView.horizontalScrollerVisibility = ScrollerVisibility.Hidden;",
uxmlCode: @"<!-- 네임스페이스 선언 -->
<ui:UXML xmlns:utk=""UVC.UIToolkit"">
<!-- 기본 스크롤 뷰 -->
<utk:UTKScrollView style=""height: 200px;"">
<ui:Label text=""항목 1"" />
<ui:Label text=""항목 2"" />
<ui:Label text=""항목 3"" />
</utk:UTKScrollView>
<!-- 수직 스크롤만 -->
<utk:UTKScrollView mode=""Vertical"" style=""height: 200px;"" />
<!-- 수평 스크롤만 -->
<utk:UTKScrollView mode=""Horizontal"" style=""width: 200px;"" />
<!-- 양방향 스크롤 -->
<utk:UTKScrollView mode=""VerticalAndHorizontal"" style=""width: 200px; height: 200px;"" />
</ui:UXML>");
}
private void InitializeFoldoutSample(VisualElement root)
{
SetCodeSamples(root,
csharpCode: @"// 기본 폴드아웃
var foldout = new UTKFoldout();
foldout.Text = ""고급 설정"";
foldout.IsExpanded = false;
// 콘텐츠 추가
foldout.Add(new Label(""옵션 1""));
foldout.Add(new Label(""옵션 2""));
foldout.Add(new Label(""옵션 3""));
// 생성자로 생성
var settingsFoldout = new UTKFoldout(""설정"", true); // 기본 펼쳐짐
// 펼침/접힘 이벤트
foldout.OnValueChanged += (isExpanded) => Debug.Log($""펼침: {isExpanded}"");
// 프로그램으로 제어
foldout.IsExpanded = true;
foldout.Toggle();",
uxmlCode: @"<!-- 네임스페이스 선언 -->
<ui:UXML xmlns:utk=""UVC.UIToolkit"">
<!-- 기본 폴드아웃 (접힘) -->
<utk:UTKFoldout text=""고급 설정"">
<ui:Label text=""옵션 1"" />
<ui:Label text=""옵션 2"" />
<ui:Label text=""옵션 3"" />
</utk:UTKFoldout>
<!-- 기본 펼쳐짐 -->
<utk:UTKFoldout text=""자주 사용하는 설정"" is-expanded=""true"">
<ui:Label text=""옵션 A"" />
<ui:Label text=""옵션 B"" />
</utk:UTKFoldout>
</ui:UXML>");
}
#endregion

View File

@@ -261,6 +261,41 @@ public async UniTask SaveDataAsync()
{
UTKTooltipManager.Instance.AttachTooltip(btnLong, "This is a longer tooltip message that demonstrates how the tooltip handles multiple lines of text content.");
}
SetCodeSamples(root,
csharpCode: @"// 1. 초기화 (앱 시작 시 한 번)
UTKTooltipManager.Instance.Initialize(rootVisualElement);
// 2. 버튼에 툴팁 연결
var saveButton = new UTKButton("""", UTKMaterialIcons.Save);
UTKTooltipManager.Instance.AttachTooltip(saveButton, ""저장 (Ctrl+S)"");
// 3. 다국어 키로 툴팁 연결
UTKTooltipManager.Instance.AttachTooltip(settingsButton, ""tooltip_settings"");
// 4. 아이콘 버튼에 툴팁
var deleteBtn = new UTKButton("""", UTKMaterialIcons.Delete) { IconOnly = true };
UTKTooltipManager.Instance.AttachTooltip(deleteBtn, ""삭제"");
// 5. 툴팁 업데이트
UTKTooltipManager.Instance.UpdateTooltip(button, ""새로운 설명"");
// 6. 툴팁 제거
UTKTooltipManager.Instance.DetachTooltip(button);
// 7. 즉시 표시 (특정 위치에)
UTKTooltipManager.Instance.Show(""임시 정보"", new Vector2(100, 200));
// 8. 숨기기
UTKTooltipManager.Instance.Hide();
// 9. 여러 요소에 툴팁 연결
var buttons = new[] { btn1, btn2, btn3 };
var tooltips = new[] { ""버튼 1"", ""버튼 2"", ""버튼 3"" };
for (int i = 0; i < buttons.Length; i++)
{
UTKTooltipManager.Instance.AttachTooltip(buttons[i], tooltips[i]);
}");
}
#endregion

View File

@@ -187,6 +187,58 @@ public partial class UTKStyleGuideSample
accordionWindow.Show();
container.Add(accordionWindow);
SetCodeSamples(root,
csharpCode: @"// 아코디언 리스트 윈도우 생성
var accordionWindow = new UTKAccordionListWindow();
accordionWindow.Title = ""프리펍 라이브러리"";
accordionWindow.ShowCloseButton = true;
var data = new UTKAccordionData();
// 수평 레이아웃 섹션
var settingsSection = new UTKAccordionSectionData
{
Title = ""Settings"",
IsExpanded = true,
LayoutType = UTKAccordionLayoutType.Horizontal,
HorizontalItems = new List<UTKAccordionHorizontalItemData>
{
new UTKAccordionHorizontalItemData
{
Head = UTKAccordionContentSpec.FromImage(UTKMaterialIcons.LibraryAdd),
Content = UTKAccordionContentSpec.FromText(""Graphics"", ""open_graphics""),
Tail = new List<UTKAccordionContentSpec>
{
UTKAccordionContentSpec.FromIconButton(UTKMaterialIcons.Refresh, 12, ""refresh_graphics"", ""새로고침""),
UTKAccordionContentSpec.FromIconButton(UTKMaterialIcons.Settings, 12, ""setting_graphics"", ""설정""),
}
}
}
};
data.Sections.Add(settingsSection);
// 그리드 레이아웃 섹션
var vehiclesSection = new UTKAccordionSectionData
{
Title = ""Vehicles"",
IsExpanded = true,
LayoutType = UTKAccordionLayoutType.Grid,
GridItems = new List<UTKAccordionGridItemData>
{
new UTKAccordionGridItemData
{
Caption = ""Forklift"",
ImagePath = ""Simulator/Images/lib_forklift_400x300"",
PrefabPath = ""Simulator/FreeForkLift/Prefabs/Forklift"",
Tag = ""vehicle""
}
}
};
data.Sections.Add(vehiclesSection);
accordionWindow.SetData(data);
accordionWindow.Show();");
}
private void InitializeComponentListWindowSample(VisualElement root)
@@ -216,6 +268,29 @@ public partial class UTKStyleGuideSample
componentWindow.Show();
container.Add(componentWindow);
SetCodeSamples(root,
csharpCode: @"// 컴포넌트 리스트 윈도우 생성
var componentWindow = new UTKComponentListWindow();
componentWindow.Title = ""모델 리스트"";
componentWindow.ShowCloseButton = true;
// 테마 변경 이벤트 구독
UTKThemeManager.Instance.OnThemeChanged += _ => UTKThemeManager.Instance.ApplyThemeToElement(componentWindow);
// 샘플 데이터
var category1 = new UTKComponentListCategoryData { name = ""캐릭터"", isExpanded = true };
category1.Add(new UTKComponentListItemData { name = ""플레이어"", ExternalKey = ""player_001"", IsVisible = true });
category1.Add(new UTKComponentListItemData { name = ""NPC_01"", ExternalKey = ""npc_001"", IsVisible = true });
category1.Add(new UTKComponentListItemData { name = ""NPC_02"", ExternalKey = ""npc_002"", IsVisible = false });
var category2 = new UTKComponentListCategoryData { name = ""환경"", isExpanded = false };
category2.Add(new UTKComponentListItemData { name = ""나무"", ExternalKey = ""tree_001"", IsVisible = true });
category2.Add(new UTKComponentListItemData { name = ""바위"", ExternalKey = ""rock_001"", IsVisible = true });
var data = new List<UTKComponentListItemDataBase> { category1, category2 };
componentWindow.SetData(data);
componentWindow.Show();");
}
private void InitializeComponentTabListWindowSample(VisualElement root)
@@ -248,6 +323,32 @@ public partial class UTKStyleGuideSample
tabWindow.Show();
container.Add(tabWindow);
SetCodeSamples(root,
csharpCode: @"// 컴포넌트 탭 리스트 윈도우 생성
var tabWindow = new UTKComponentTabListWindow();
tabWindow.Title = ""모델 라이브러리"";
tabWindow.ShowCloseButton = true;
// 테마 변경 이벤트 구독
UTKThemeManager.Instance.OnThemeChanged += _ => UTKThemeManager.Instance.ApplyThemeToElement(tabWindow);
// 샘플 데이터 (카테고리가 탭으로 자동 생성됨)
var category1 = new UTKComponentListCategoryData { name = ""캐릭터"", isExpanded = true };
category1.Add(new UTKComponentListItemData { name = ""플레이어"", IsVisible = true });
category1.Add(new UTKComponentListItemData { name = ""몬스터"", IsVisible = true });
var category2 = new UTKComponentListCategoryData { name = ""환경"", isExpanded = true };
category2.Add(new UTKComponentListItemData { name = ""나무"", IsVisible = true });
category2.Add(new UTKComponentListItemData { name = ""풀"", IsVisible = true });
var category3 = new UTKComponentListCategoryData { name = ""아이템"", isExpanded = true };
category3.Add(new UTKComponentListItemData { name = ""검"", IsVisible = true });
category3.Add(new UTKComponentListItemData { name = ""방패"", IsVisible = true });
var data = new List<UTKComponentListItemDataBase> { category1, category2, category3 };
tabWindow.SetData(data);
tabWindow.Show();");
}
private void InitializeImageListWindowSample(VisualElement root)
@@ -274,6 +375,26 @@ public partial class UTKStyleGuideSample
imageWindow.Show();
container.Add(imageWindow);
SetCodeSamples(root,
csharpCode: @"// 이미지 리스트 윈도우 생성
var imageWindow = new UTKImageListWindow();
imageWindow.Title = ""텍스처 라이브러리"";
imageWindow.ShowCloseButton = true;
// 테마 변경 이벤트 구독
UTKThemeManager.Instance.OnThemeChanged += _ => UTKThemeManager.Instance.ApplyThemeToElement(imageWindow);
// 샘플 데이터
var data = new List<UTKImageListItemData>
{
new UTKImageListItemData { itemName = ""Texture_01"", externalId = ""tex_001"" },
new UTKImageListItemData { itemName = ""Texture_02"", externalId = ""tex_002"" },
new UTKImageListItemData { itemName = ""Texture_03"", externalId = ""tex_003"" },
new UTKImageListItemData { itemName = ""Texture_04"", externalId = ""tex_004"" }
};
imageWindow.SetData(data);
imageWindow.Show();");
}
private void InitializeTreeListWindowSample(VisualElement root)
@@ -306,6 +427,32 @@ public partial class UTKStyleGuideSample
treeWindow.Show();
container.Add(treeWindow);
SetCodeSamples(root,
csharpCode: @"// 트리 리스트 윈도우 생성
var treeWindow = new UTKTreeListWindow();
treeWindow.Title = ""씬 계층 구조"";
treeWindow.ShowCloseButton = true;
// 테마 변경 이벤트 구독
UTKThemeManager.Instance.OnThemeChanged += _ => UTKThemeManager.Instance.ApplyThemeToElement(treeWindow);
// 샘플 데이터
var environment = new UTKTreeListItemData { name = ""Environment"", isExpanded = true };
environment.Add(new UTKTreeListItemData { name = ""Terrain"", ExternalKey = ""terrain_001"", IsVisible = true });
environment.Add(new UTKTreeListItemData { name = ""Trees"", ExternalKey = ""trees_001"", IsVisible = true });
var characters = new UTKTreeListItemData { name = ""Characters"", isExpanded = false };
characters.Add(new UTKTreeListItemData { name = ""Player"", ExternalKey = ""player_001"", IsVisible = true });
characters.Add(new UTKTreeListItemData { name = ""Enemies"", ExternalKey = ""enemies_001"", IsVisible = true });
var rootNode = new UTKTreeListItemData { name = ""Root"", isExpanded = true };
rootNode.Add(environment);
rootNode.Add(characters);
var data = new List<UTKTreeListItemData> { rootNode };
treeWindow.SetData(data);
treeWindow.Show();");
}
#endregion

View File

@@ -414,12 +414,38 @@ public partial class UTKStyleGuideSample : MonoBehaviour
{
switch (controlName)
{
// Button
case "UTKButton":
InitializeButtonSample(root);
break;
case "UTKCheckBox":
InitializeCheckBoxSample(root);
break;
case "UTKToggle":
InitializeToggleSample(root);
break;
case "UTKRadioButton":
InitializeRadioButtonSample(root);
break;
case "UTKToggleButtonGroup":
InitializeToggleButtonGroupSample(root);
break;
// Input
case "UTKInputField":
InitializeInputFieldSample(root);
break;
case "UTKIntegerField":
InitializeIntegerFieldSample(root);
break;
case "UTKLongField":
InitializeLongFieldSample(root);
break;
case "UTKFloatField":
InitializeFloatFieldSample(root);
break;
case "UTKDoubleField":
InitializeDoubleFieldSample(root);
break;
case "UTKNumberStepper":
InitializeNumberStepperSample(root);
break;
@@ -438,15 +464,31 @@ public partial class UTKStyleGuideSample : MonoBehaviour
case "UTKBoundsField":
InitializeBoundsFieldSample(root);
break;
// Slider
case "UTKSlider":
InitializeSliderSample(root);
break;
case "UTKMinMaxSlider":
InitializeMinMaxSliderSample(root);
break;
case "UTKProgressBar":
InitializeProgressBarSample(root);
break;
// Dropdown
case "UTKDropdown":
InitializeDropdownSample(root);
break;
case "UTKEnumDropDown":
InitializeEnumDropDownSample(root);
break;
// Label
case "UTKLabel":
InitializeLabelSample(root);
break;
case "UTKHelpBox":
InitializeHelpBoxSample(root);
break;
// List
case "UTKListView":
InitializeListViewSample(root);
break;
@@ -459,12 +501,24 @@ public partial class UTKStyleGuideSample : MonoBehaviour
case "UTKMultiColumnTreeView":
InitializeMultiColumnTreeViewSample(root);
break;
case "UTKFoldout":
InitializeFoldoutSample(root);
break;
case "UTKScrollView":
InitializeScrollViewSample(root);
break;
// Card
case "UTKCard":
InitializeCardSample(root);
break;
case "UTKPanel":
InitializePanelSample(root);
break;
// Tab
case "UTKTabView":
InitializeTabViewSample(root);
break;
// Modal
case "UTKAlert":
InitializeAlertSample(root);
break;
@@ -474,12 +528,14 @@ public partial class UTKStyleGuideSample : MonoBehaviour
case "UTKTooltip":
InitializeTooltipSample(root);
break;
// Picker
case "UTKColorPicker":
InitializeColorPickerSample(root);
break;
case "UTKDatePicker":
InitializeDatePickerSample(root);
break;
// Icon
case "UTKMaterialIcons":
InitializeUTKMaterialIconsSample(root);
break;
@@ -489,6 +545,7 @@ public partial class UTKStyleGuideSample : MonoBehaviour
case "UTKImage":
InitializeUTKImageSample(root);
break;
// Window
case "UTKAccordionListWindow":
InitializeAccordionListWindowSample(root);
break;