24 lines
1.7 KiB
XML
24 lines
1.7 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<UXML xmlns="UnityEngine.UIElements" xmlns:utk="UVC.UIToolkit">
|
|
<Style src="../UTKSampleCommon.uss" />
|
|
|
|
<VisualElement class="utk-sample-container">
|
|
<Label class="utk-sample-desc" text="토스트 알림" />
|
|
|
|
<VisualElement class="utk-sample-section">
|
|
<Label class="utk-sample-section__title" text="Toasts" />
|
|
<VisualElement class="utk-sample-row">
|
|
<utk:UTKButton name="btn-toast-info" text="Info Toast" variant="Primary" />
|
|
<utk:UTKButton name="btn-toast-success" text="Success Toast" variant="Normal" />
|
|
<utk:UTKButton name="btn-toast-warning" text="Warning Toast" variant="Normal" />
|
|
<utk:UTKButton name="btn-toast-error" text="Error Toast" variant="Danger" />
|
|
</VisualElement>
|
|
</VisualElement>
|
|
|
|
<!-- Code Sample -->
|
|
<VisualElement class="utk-code-sample-container">
|
|
<utk:UTKCodeBlock title="C#" code="// 초기화 (root 설정 필요) UTKToast.Initialize(rootVisualElement); // 기본 토스트 UTKToast.Show("저장되었습니다."); // 타입별 토스트 UTKToast.ShowSuccess("성공적으로 완료되었습니다."); UTKToast.ShowError("오류가 발생했습니다."); UTKToast.ShowWarning("주의가 필요합니다."); UTKToast.ShowInfo("정보 메시지"); // 지속시간 설정 (ms) UTKToast.Show("잠시 표시", duration: 2000); // 닫기 버튼 표시 UTKToast.Show("메시지", showCloseButton: true);" />
|
|
</VisualElement>
|
|
</VisualElement>
|
|
</UXML>
|