단축키, UndoRedo 개발중
This commit is contained in:
@@ -48,9 +48,9 @@ namespace UVC.Studio.Config
|
||||
/// float snapPos = setting.Data.general.snapPosition;
|
||||
///
|
||||
/// // 단축키 설정 접근
|
||||
/// string moveKey = setting.Data.shortcuts.tools.move.key; // "W"
|
||||
/// string moveKey = setting.Data.shortcuts.tools.move.key; // "2"
|
||||
/// string moveLabel = setting.Data.shortcuts.tools.move.label; // "Move Tool"
|
||||
/// string saveKey = setting.Data.shortcuts.menu.saveProject.key; // "Ctrl+S"
|
||||
/// string saveDisplay = setting.Data.shortcuts.menu.saveProject.GetDisplayString(); // "Ctrl+Shift+S"
|
||||
///
|
||||
/// // 설정 변경 후 비동기 저장
|
||||
/// setting.Data.general.gridSize = 2.0f;
|
||||
@@ -112,7 +112,7 @@ namespace UVC.Studio.Config
|
||||
/// {
|
||||
/// // 설정 데이터 접근
|
||||
/// float gridSize = _setting.Data.general.gridSize;
|
||||
/// string moveKey = _setting.Data.shortcuts.tools.move.key;
|
||||
/// string moveDisplay = _setting.Data.shortcuts.tools.move.GetDisplayString();
|
||||
///
|
||||
/// // 설정 변경 및 저장
|
||||
/// _setting.Data.general.gridSize = 2.0f;
|
||||
@@ -415,43 +415,43 @@ namespace UVC.Studio.Config
|
||||
public class MenuShortcuts
|
||||
{
|
||||
/// <summary>새 프로젝트 (File > New Project)</summary>
|
||||
public ShortcutItem newProject = new("Ctrl+N", "File > New Project");
|
||||
public ShortcutItem newProject = new("N", "File > New Project", ctrl: true, shift: true);
|
||||
|
||||
/// <summary>프로젝트 열기 (File > Open Project)</summary>
|
||||
public ShortcutItem openProject = new("Ctrl+O", "File > Open Project");
|
||||
public ShortcutItem openProject = new("O", "File > Open Project", ctrl: true, shift: true);
|
||||
|
||||
/// <summary>프로젝트 저장 (File > Save Project)</summary>
|
||||
public ShortcutItem saveProject = new("Ctrl+S", "File > Save Project");
|
||||
public ShortcutItem saveProject = new("S", "File > Save Project", ctrl: true, shift: true);
|
||||
|
||||
/// <summary>다른 이름으로 저장 (File > Save As...)</summary>
|
||||
public ShortcutItem saveAsProject = new("Ctrl+Shift+S", "File > Save As...");
|
||||
public ShortcutItem saveAsProject = new("S", "File > Save As...", ctrl: true, shift: true, alt: true);
|
||||
|
||||
/// <summary>데이터베이스 삽입 (File > Insert Database)</summary>
|
||||
public ShortcutItem insertDb = new("Ctrl+I", "File > Insert Database");
|
||||
public ShortcutItem insertDb = new("I", "File > Insert Database", ctrl: true, shift: true);
|
||||
|
||||
/// <summary>레이아웃 내보내기 (File > Export > Layout)</summary>
|
||||
public ShortcutItem exportLayout = new("Ctrl+L", "File > Export > Layout");
|
||||
public ShortcutItem exportLayout = new("L", "File > Export > Layout", ctrl: true, shift: true);
|
||||
|
||||
/// <summary>메타데이터 내보내기 (File > Export > Metadata)</summary>
|
||||
public ShortcutItem exportMeta = new("Ctrl+M", "File > Export > Metadata");
|
||||
public ShortcutItem exportMeta = new("M", "File > Export > Metadata", ctrl: true, shift: true);
|
||||
|
||||
/// <summary>glTF 내보내기 (File > Export > glTF)</summary>
|
||||
public ShortcutItem exportGltf = new("Ctrl+G", "File > Export > glTF");
|
||||
public ShortcutItem exportGltf = new("G", "File > Export > glTF", ctrl: true, shift: true);
|
||||
|
||||
/// <summary>실행 취소 (Edit > Undo)</summary>
|
||||
public ShortcutItem undo = new("Ctrl+Z", "Edit > Undo");
|
||||
public ShortcutItem undo = new("Z", "Edit > Undo", ctrl: true, shift: true);
|
||||
|
||||
/// <summary>다시 실행 (Edit > Redo)</summary>
|
||||
public ShortcutItem redo = new("Ctrl+Shift+Z", "Edit > Redo");
|
||||
public ShortcutItem redo = new("Y", "Edit > Redo", ctrl: true, shift: true);
|
||||
|
||||
/// <summary>복제 (Edit > Duplicate)</summary>
|
||||
public ShortcutItem duplicate = new("Ctrl+D", "Edit > Duplicate");
|
||||
public ShortcutItem duplicate = new("D", "Edit > Duplicate", ctrl: true, shift: true);
|
||||
|
||||
/// <summary>삭제 (Edit > Delete)</summary>
|
||||
public ShortcutItem delete = new("Delete", "Edit > Delete");
|
||||
public ShortcutItem delete = new("DELETE", "Edit > Delete", shift: true);
|
||||
|
||||
/// <summary>평면 생성 (Create > Plane)</summary>
|
||||
public ShortcutItem createPlane = new("Ctrl+P", "Create > Plane");
|
||||
public ShortcutItem createPlane = new("V", "Create > Plane", ctrl: true, shift: true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -459,37 +459,36 @@ namespace UVC.Studio.Config
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 에디터 도구 전환에 사용되는 단축키를 정의합니다.
|
||||
/// Unity 에디터의 기본 단축키(Q, W, E, R)와 유사한 구조입니다.
|
||||
/// </remarks>
|
||||
[Serializable]
|
||||
public class ToolShortcuts
|
||||
{
|
||||
/// <summary>선택 도구</summary>
|
||||
public ShortcutItem select = new("Q", "Select Tool");
|
||||
public ShortcutItem select = new("1", "Select Tool");
|
||||
|
||||
/// <summary>이동 도구</summary>
|
||||
public ShortcutItem move = new("W", "Move Tool");
|
||||
public ShortcutItem move = new("2", "Move Tool");
|
||||
|
||||
/// <summary>회전 도구</summary>
|
||||
public ShortcutItem rotate = new("E", "Rotate Tool");
|
||||
public ShortcutItem rotate = new("3", "Rotate Tool");
|
||||
|
||||
/// <summary>스케일 도구</summary>
|
||||
public ShortcutItem scale = new("R", "Scale Tool");
|
||||
public ShortcutItem scale = new("4", "Scale Tool");
|
||||
|
||||
/// <summary>스냅 도구</summary>
|
||||
public ShortcutItem snap = new("S", "Snap Tool");
|
||||
public ShortcutItem snap = new("5", "Snap Tool");
|
||||
|
||||
/// <summary>가이드 도구</summary>
|
||||
public ShortcutItem guide = new("G", "Guide Tool");
|
||||
public ShortcutItem guide = new("6", "Guide Tool");
|
||||
|
||||
/// <summary>노드 도구</summary>
|
||||
public ShortcutItem node = new("N", "Node Tool");
|
||||
public ShortcutItem node = new("7", "Node Tool");
|
||||
|
||||
/// <summary>링크 도구</summary>
|
||||
public ShortcutItem link = new("L", "Link Tool");
|
||||
public ShortcutItem link = new("8", "Link Tool");
|
||||
|
||||
/// <summary>아크 도구</summary>
|
||||
public ShortcutItem arc = new("A", "Arc Tool");
|
||||
public ShortcutItem arc = new("9", "Arc Tool");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -499,13 +498,25 @@ namespace UVC.Studio.Config
|
||||
public class ShortcutItem
|
||||
{
|
||||
/// <summary>
|
||||
/// 단축키 조합 문자열
|
||||
/// 단축키 문자 (1글자, 예: "S", "N", "1")
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 형식: "[Modifier+]Key" (예: "Ctrl+S", "Ctrl+Shift+Z", "Delete", "W")
|
||||
/// </remarks>
|
||||
public string key;
|
||||
|
||||
/// <summary>
|
||||
/// Ctrl 키 사용 여부
|
||||
/// </summary>
|
||||
public bool ctrl;
|
||||
|
||||
/// <summary>
|
||||
/// Shift 키 사용 여부
|
||||
/// </summary>
|
||||
public bool shift;
|
||||
|
||||
/// <summary>
|
||||
/// Alt 키 사용 여부
|
||||
/// </summary>
|
||||
public bool alt;
|
||||
|
||||
/// <summary>
|
||||
/// 단축키 설명 레이블
|
||||
/// </summary>
|
||||
@@ -520,12 +531,32 @@ namespace UVC.Studio.Config
|
||||
/// <summary>
|
||||
/// 단축키 항목 생성
|
||||
/// </summary>
|
||||
/// <param name="key">단축키 조합 (예: "Ctrl+S")</param>
|
||||
/// <param name="key">단축키 문자 (예: "S")</param>
|
||||
/// <param name="label">설명 레이블 (예: "File > Save Project")</param>
|
||||
public ShortcutItem(string key, string label)
|
||||
/// <param name="ctrl">Ctrl 키 사용 여부</param>
|
||||
/// <param name="shift">Shift 키 사용 여부</param>
|
||||
/// <param name="alt">Alt 키 사용 여부</param>
|
||||
public ShortcutItem(string key, string label, bool ctrl = false, bool shift = false, bool alt = false)
|
||||
{
|
||||
this.key = key;
|
||||
this.label = label;
|
||||
this.ctrl = ctrl;
|
||||
this.shift = shift;
|
||||
this.alt = alt;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 단축키 조합 문자열을 반환합니다.
|
||||
/// </summary>
|
||||
/// <returns>표시용 단축키 문자열 (예: "Ctrl+Shift+S")</returns>
|
||||
public string GetDisplayString()
|
||||
{
|
||||
var parts = new System.Collections.Generic.List<string>();
|
||||
if (ctrl) parts.Add("Ctrl");
|
||||
if (shift) parts.Add("Shift");
|
||||
if (alt) parts.Add("Alt");
|
||||
parts.Add(key);
|
||||
return string.Join("+", parts);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user