new_editor: support between-row hierarchy drag drop
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user