개발 중
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
// using UnityEngine.UI; // Image 사용을 위해 필요할 수 있으나, 모델 클래스에서는 직접적인 UI 참조를 최소화하는 것이 좋음
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace UVC.UI.Toolbar.Model
|
||||
/// Tooltip = "tooltip_brush_small",
|
||||
/// ClickCommand = new ActionCommand(() => Debug.Log("작은 브러시 선택됨"))
|
||||
/// };
|
||||
/// brushToolButton.SubButtons.Add(smallBrush);
|
||||
/// brushToolButton.SubButtons.AddChild(smallBrush);
|
||||
///
|
||||
/// // 하위 버튼2: 중간 브러시
|
||||
/// var mediumBrush = new ToolbarStandardButton
|
||||
@@ -42,7 +42,7 @@ namespace UVC.UI.Toolbar.Model
|
||||
/// Tooltip = "tooltip_brush_medium",
|
||||
/// ClickCommand = new ActionCommand(() => Debug.Log("중간 브러시 선택됨"))
|
||||
/// };
|
||||
/// brushToolButton.SubButtons.Add(mediumBrush);
|
||||
/// brushToolButton.SubButtons.AddChild(mediumBrush);
|
||||
///
|
||||
/// // 하위 버튼 선택 시 콜백 설정 (선택 사항)
|
||||
/// brushToolButton.OnSubButtonSelected = (selectedSub) =>
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace UVC.UI.Toolbar.Model
|
||||
///
|
||||
/// 사용 흐름:
|
||||
/// 1. Toolbar (또는 유사한 관리 클래스)에서 ToolbarModel의 인스턴스를 생성합니다.
|
||||
/// 2. 다양한 Add[ButtonType] 메서드 또는 AddItem 메서드를 호출하여 툴바 항목 모델들을 생성하고 ToolbarModel에 추가합니다.
|
||||
/// 2. 다양한 AddChild[ButtonType] 메서드 또는 AddItem 메서드를 호출하여 툴바 항목 모델들을 생성하고 ToolbarModel에 추가합니다.
|
||||
/// 3. 설정이 완료된 ToolbarModel 객체를 ToolbarView의 Initialize 메서드에 전달하여 UI를 렌더링하도록 합니다.
|
||||
/// </remarks>
|
||||
/// <example>
|
||||
@@ -62,7 +62,7 @@ namespace UVC.UI.Toolbar.Model
|
||||
/// <summary>
|
||||
/// 툴바에 추가된 모든 항목(IToolbarItem)들의 리스트입니다.
|
||||
/// 이 리스트의 순서대로 툴바에 항목들이 표시됩니다.
|
||||
/// 외부에서는 읽기만 가능하도록 private set으로 설정되어 있으며, 항목 추가는 AddItem 또는 Add[ButtonType] 메서드를 통해 이루어집니다.
|
||||
/// 외부에서는 읽기만 가능하도록 private set으로 설정되어 있으며, 항목 추가는 AddItem 또는 AddChild[ButtonType] 메서드를 통해 이루어집니다.
|
||||
/// </summary>
|
||||
public System.Collections.Generic.List<IToolbarItem> Items { get; private set; }
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace UVC.UI.Toolbar.Model
|
||||
@@ -30,7 +30,7 @@ namespace UVC.UI.Toolbar.Model
|
||||
/// // if (!_radioGroups.TryGetValue(radioButton.GroupName, out var group))
|
||||
/// // {
|
||||
/// // group = new ToolbarRadioButtonGroup();
|
||||
/// // _radioGroups.Add(radioButton.GroupName, group);
|
||||
/// // _radioGroups.AddChild(radioButton.GroupName, group);
|
||||
/// // }
|
||||
/// // group.RegisterButton(radioButton); // 라디오 버튼을 그룹에 등록
|
||||
/// // radioButton.RadioGroup = group; // 버튼에 그룹 참조 설정
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UVC.UI.Toolbar.Model;
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace UVC.UI.Toolbar.View
|
||||
/// // ToolbarView 내에서 이 프로세서가 사용되는 방식 (간략화된 예시):
|
||||
/// // 1. ToolbarModel로부터 ToolbarExpandableButton 객체를 가져옵니다.
|
||||
/// // ToolbarExpandableButton expandableModel = new ToolbarExpandableButton { Text = "Brush", ... };
|
||||
/// // expandableModel.SubButtons.Add(new ToolbarStandardButton { Text = "Small Brush", ... });
|
||||
/// // expandableModel.SubButtons.AddChild(new ToolbarStandardButton { Text = "Small Brush", ... });
|
||||
///
|
||||
/// // 2. ToolbarView는 해당 모델 타입에 맞는 Processor를 찾습니다.
|
||||
/// // IButtonViewProcessor processor = GetButtonViewProcessor(typeof(ToolbarExpandableButton));
|
||||
|
||||
Reference in New Issue
Block a user