new_editor: support between-row hierarchy drag drop

This commit is contained in:
2026-04-23 14:09:28 +08:00
parent e63457c72b
commit 5c0a878aa0
63 changed files with 596 additions and 12 deletions

View File

@@ -463,6 +463,32 @@ bool EditorSceneRuntime::ReparentGameObject(
return reparented;
}
bool EditorSceneRuntime::MoveGameObjectBefore(
std::string_view itemId,
std::string_view targetItemId) {
ResetTransformEditHistory();
const bool moved =
MoveEditorGameObjectBefore(itemId, targetItemId);
if (moved) {
IncrementInspectorRevision();
}
RefreshScene();
return moved;
}
bool EditorSceneRuntime::MoveGameObjectAfter(
std::string_view itemId,
std::string_view targetItemId) {
ResetTransformEditHistory();
const bool moved =
MoveEditorGameObjectAfter(itemId, targetItemId);
if (moved) {
IncrementInspectorRevision();
}
RefreshScene();
return moved;
}
bool EditorSceneRuntime::MoveGameObjectToRoot(std::string_view itemId) {
ResetTransformEditHistory();
const bool moved = MoveEditorGameObjectToRoot(itemId);