Polish shared editor tree context behavior
This commit is contained in:
@@ -109,8 +109,9 @@ void HierarchyPanel::Render() {
|
||||
}
|
||||
|
||||
Actions::HandleHierarchyBackgroundPrimaryClick(*m_context, m_renameState);
|
||||
|
||||
Actions::DrawHierarchyBackgroundContextPopup(*m_context);
|
||||
Actions::RequestHierarchyBackgroundContextPopup(m_backgroundContextMenu);
|
||||
Actions::DrawHierarchyEntityContextPopup(*m_context, m_itemContextMenu);
|
||||
Actions::DrawHierarchyBackgroundContextPopup(*m_context, m_backgroundContextMenu);
|
||||
Actions::DrawHierarchyRootDropTarget(*m_context);
|
||||
}
|
||||
ImGui::PopStyleColor(2);
|
||||
@@ -153,6 +154,10 @@ void HierarchyPanel::RenderEntity(::XCEngine::Components::GameObject* gameObject
|
||||
Actions::HandleHierarchySelectionClick(*m_context, gameObject->GetID(), ImGui::GetIO().KeyCtrl);
|
||||
}
|
||||
|
||||
if (node.secondaryClicked) {
|
||||
Actions::HandleHierarchyItemContextRequest(*m_context, gameObject, m_itemContextMenu);
|
||||
}
|
||||
|
||||
if (node.doubleClicked) {
|
||||
BeginRename(gameObject);
|
||||
}
|
||||
@@ -160,7 +165,6 @@ void HierarchyPanel::RenderEntity(::XCEngine::Components::GameObject* gameObject
|
||||
nodeDefinition.callbacks.onRenderExtras = [this, gameObject]() {
|
||||
Actions::BeginHierarchyEntityDrag(gameObject);
|
||||
Actions::AcceptHierarchyEntityDrop(*m_context, gameObject);
|
||||
Actions::DrawHierarchyEntityContextPopup(*m_context, gameObject);
|
||||
};
|
||||
|
||||
const UI::TreeNodeResult node = UI::DrawTreeNode(
|
||||
|
||||
Reference in New Issue
Block a user