UIデザインのカード型への変更とドラッグ移動およびヒエラルキー順ソートの実装 - #11
Open
tfuru wants to merge 3 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
CCK Process Tracer のEditorWindow上の可視化UIをカード型デザインへ刷新し、フレーム(GameObject)単位のドラッグ移動と、Unityヒエラルキー順に合わせた表示順ソートを追加するPRです。
Changes:
- ノード/フレーム描画を丸角カード型に変更し、線の太さ・色をスキンに合わせて調整
- GameObject名ラベルのドラッグでフレーム+配下ノードを一括移動(キャンバス座標変換も追加)
Transform.GetSiblingIndex()ベースでProcessObject表示順をヒエラルキー順にソート
Reviewed changes
Copilot reviewed 19 out of 27 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| Penpot/ui-design.png.meta | UIデザイン素材のUnity meta追加 |
| Penpot/README.md.meta | Penpot用READMEのUnity meta追加 |
| Penpot/README.md | Penpot開発環境メモの追加 |
| Penpot/CCKProcessTracer.penpot.meta | PenpotファイルのUnity meta追加 |
| Penpot.meta | PenpotフォルダのUnity meta追加 |
| Editor/View.cs | Screen→Canvas座標変換API追加 |
| Editor/ProcessObject/ProcessObjectsAligner.cs | フレーム配置にドラッグオフセットを反映 |
| Editor/ProcessObject/ProcessObjectFactory.cs | ProcessObjectをヒエラルキー順にソート |
| Editor/ProcessObject/ProcessObject.cs | ProcessObjectにドラッグオフセット保持を追加 |
| Editor/Node/TriggerNode.cs | TriggerNodeのカード矩形(rect)設定と表示名拡張反映 |
| Editor/Node/NodeFactory.cs | TriggerParamのParameterTypeをKeyへ設定 |
| Editor/Node/NodeDragController.cs.meta | 新規ファイルmeta追加 |
| Editor/Node/NodeDragController.cs | フレーム名ラベルのドラッグ移動制御を追加 |
| Editor/Node/Node.cs | Nodeに描画用rect等を追加 |
| Editor/Node/Key.cs | Key表示名拡張(Target/ParameterType) |
| Editor/Node/GimmickNode.cs | GimmickNodeのカード矩形(rect)設定 |
| Editor/Draw/ObjectFrameDrawer.cs | フレーム描画を丸角塗り+枠線へ刷新 |
| Editor/Draw/ObjectFrame.cs | nameButtonRectを保持してドラッグ判定に利用 |
| Editor/Draw/NodeDrawer.cs.meta | 新規ファイルmeta追加 |
| Editor/Draw/NodeDrawer.cs | ノードのカード背景/枠線/区切り線描画を追加 |
| Editor/Draw/LineDrawer.cs | AAポリライン+太さ指定に対応 |
| Editor/Draw/DrawManager.cs | 描画順をフレーム→ノード→矢印→ボタンに変更 |
| Editor/Draw/ButtonDrawer.cs | ボタンのスタイル/ホバー背景等のUI調整 |
| Editor/Draw/ArrowDrawer.cs | ダーク/ライトテーマ別の線色・太さに対応 |
| Editor/CCKProcessTracer.cs | OnGUIでドラッグ制御呼び出し、ResetViewでdragOffset初期化 |
Files not reviewed (6)
- Editor/Draw/NodeDrawer.cs.meta: Generated file
- Editor/Node/NodeDragController.cs.meta: Generated file
- Penpot.meta: Generated file
- Penpot/CCKProcessTracer.penpot.meta: Generated file
- Penpot/README.md.meta: Generated file
- Penpot/ui-design.png.meta: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| vector3Type, | ||
| } | ||
| public List<Node> afterNodes = new List<Node>(); | ||
| public List<Node> afterNodes = new List<Node>(); |
Comment on lines
22
to
27
| public const float verticalNodeInterval = 20f; | ||
| public Vector2 arrowReceivePosition; | ||
| public Rect rect; | ||
| public Vector2 dragOffset; | ||
|
|
||
| public GimmickNode childGimmickNode; |
Comment on lines
+33
to
+36
| // ヘッダー下部の境界線 | ||
| float nameHeight = 50f; // Node.nameHeight の実値 | ||
| float scaledHeaderHeight = nameHeight * View.scale; | ||
| float borderY = scaledRect.yMin + scaledHeaderHeight; |
Comment on lines
+44
to
+49
| if (node is TriggerNode triggerNode) | ||
| { | ||
| float keyHeight = 25f; // Node.keyHeight の実値 | ||
| for (int i = 0; i < triggerNode.useKeys.Count; i++) | ||
| { | ||
| float keyBorderY = borderY + (keyHeight * (i + 1)) * View.scale; |
| ローカル環境で Penpot インスタンスを起動するには、以下のコマンドを実行します。 | ||
|
|
||
| ```bash | ||
| cd /Volumes/SSD/work/Penpot |
Comment on lines
+1
to
+4
| using UnityEngine; | ||
| using UnityEditor; | ||
|
|
||
| namespace CCKProcessTracer.Editor |
Comment on lines
+32
to
+37
| var style = new GUIStyle(); | ||
| style.alignment = TextAnchor.MiddleLeft; | ||
| style.padding = new RectOffset((int)(10 * View.scale), (int)(10 * View.scale), 0, 0); | ||
| style.fontSize = (int)(12 * View.scale); | ||
| if (style.fontSize < 8) style.fontSize = 8; | ||
|
|
Comment on lines
17
to
+25
| foreach (var f in objectFrames) | ||
| { | ||
| if (!KeyFilter.IsFrameVisible(f.processObject)) | ||
| continue; | ||
|
|
||
| Handles.color = Color.gray; | ||
| Vector2 upLeft = View.ProcessViewPosition(new Vector2(f.rect.xMin, f.rect.yMin)); | ||
| Vector2 downRight = View.ProcessViewPosition(new Vector2(f.rect.xMax, f.rect.yMax)); | ||
|
|
||
| Vector3 upLeft = View.ProcessViewPosition(new Vector2(f.rect.xMin, f.rect.yMin)); | ||
| Vector3 upRight = View.ProcessViewPosition(new Vector2(f.rect.xMax, f.rect.yMin)); | ||
| Vector3 downRight = View.ProcessViewPosition(new Vector2(f.rect.xMax, f.rect.yMax)); | ||
| Vector3 downLeft = View.ProcessViewPosition(new Vector2(f.rect.xMin, f.rect.yMax)); | ||
| Rect scaledRect = new Rect(upLeft.x, upLeft.y, downRight.x - upLeft.x, downRight.y - upLeft.y); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
CCK Process TracerのUIデザインおよび操作性を向上させるため、以下の3つの機能を実装・統合しました。
KeyName - Target, ParameterTypeに拡張。Transform.GetSiblingIndex()を用いた厳密なソート処理を追加。