|
|
|
@ -84,99 +84,99 @@ namespace ImGui
|
|
|
|
ImGui::Columns(3);
|
|
|
|
ImGui::Columns(3);
|
|
|
|
ImGui::TextColored(m_displayName.m_color, "Display Name");
|
|
|
|
ImGui::TextColored(m_displayName.m_color, "Display Name");
|
|
|
|
ImGui::NextColumn();
|
|
|
|
ImGui::NextColumn();
|
|
|
|
ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, s_OnText);
|
|
|
|
ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, "%s", s_OnText);
|
|
|
|
ImGui::SameLine();
|
|
|
|
ImGui::SameLine();
|
|
|
|
ImGui::Checkbox("##DisplayNameCB", &m_displayName.m_enabled);
|
|
|
|
ImGui::Checkbox("##DisplayNameCB", &m_displayName.m_enabled);
|
|
|
|
ImGui::NextColumn();
|
|
|
|
ImGui::NextColumn();
|
|
|
|
ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, s_ColorText);
|
|
|
|
ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, "%s", s_ColorText);
|
|
|
|
ImGui::SameLine();
|
|
|
|
ImGui::SameLine();
|
|
|
|
ImGui::ColorEdit4("##DisplayNameCol", reinterpret_cast<float*>(&m_displayName.m_color));
|
|
|
|
ImGui::ColorEdit4("##DisplayNameCol", reinterpret_cast<float*>(&m_displayName.m_color));
|
|
|
|
ImGui::NextColumn();
|
|
|
|
ImGui::NextColumn();
|
|
|
|
|
|
|
|
|
|
|
|
ImGui::TextColored(m_displayChildCount.m_color, "Display Child Count");
|
|
|
|
ImGui::TextColored(m_displayChildCount.m_color, "Display Child Count");
|
|
|
|
ImGui::NextColumn();
|
|
|
|
ImGui::NextColumn();
|
|
|
|
ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, s_OnText);
|
|
|
|
ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, "%s", s_OnText);
|
|
|
|
ImGui::SameLine();
|
|
|
|
ImGui::SameLine();
|
|
|
|
ImGui::Checkbox("##DisplayChildCountCB", &m_displayChildCount.m_enabled);
|
|
|
|
ImGui::Checkbox("##DisplayChildCountCB", &m_displayChildCount.m_enabled);
|
|
|
|
ImGui::NextColumn();
|
|
|
|
ImGui::NextColumn();
|
|
|
|
ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, s_ColorText);
|
|
|
|
ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, "%s", s_ColorText);
|
|
|
|
ImGui::SameLine();
|
|
|
|
ImGui::SameLine();
|
|
|
|
ImGui::ColorEdit4("##DisplayChildCountCol", reinterpret_cast<float*>(&m_displayChildCount.m_color));
|
|
|
|
ImGui::ColorEdit4("##DisplayChildCountCol", reinterpret_cast<float*>(&m_displayChildCount.m_color));
|
|
|
|
ImGui::NextColumn();
|
|
|
|
ImGui::NextColumn();
|
|
|
|
|
|
|
|
|
|
|
|
ImGui::TextColored(m_displayDescentdantCount.m_color, "Display Descendant Count");
|
|
|
|
ImGui::TextColored(m_displayDescentdantCount.m_color, "Display Descendant Count");
|
|
|
|
ImGui::NextColumn();
|
|
|
|
ImGui::NextColumn();
|
|
|
|
ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, s_OnText);
|
|
|
|
ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, "%s", s_OnText);
|
|
|
|
ImGui::SameLine();
|
|
|
|
ImGui::SameLine();
|
|
|
|
ImGui::Checkbox("##DisplayDescendantCountCB", &m_displayDescentdantCount.m_enabled);
|
|
|
|
ImGui::Checkbox("##DisplayDescendantCountCB", &m_displayDescentdantCount.m_enabled);
|
|
|
|
ImGui::NextColumn();
|
|
|
|
ImGui::NextColumn();
|
|
|
|
ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, s_ColorText);
|
|
|
|
ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, "%s", s_ColorText);
|
|
|
|
ImGui::SameLine();
|
|
|
|
ImGui::SameLine();
|
|
|
|
ImGui::ColorEdit4("##DisplayDescendantCountCol", reinterpret_cast<float*>(&m_displayDescentdantCount.m_color));
|
|
|
|
ImGui::ColorEdit4("##DisplayDescendantCountCol", reinterpret_cast<float*>(&m_displayDescentdantCount.m_color));
|
|
|
|
ImGui::NextColumn();
|
|
|
|
ImGui::NextColumn();
|
|
|
|
|
|
|
|
|
|
|
|
ImGui::TextColored(m_displayEntityState.m_color, "Display Entity Status");
|
|
|
|
ImGui::TextColored(m_displayEntityState.m_color, "Display Entity Status");
|
|
|
|
ImGui::NextColumn();
|
|
|
|
ImGui::NextColumn();
|
|
|
|
ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, s_OnText);
|
|
|
|
ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, "%s", s_OnText);
|
|
|
|
ImGui::SameLine();
|
|
|
|
ImGui::SameLine();
|
|
|
|
ImGui::Checkbox("##DisplayEntityStateCB", &m_displayEntityState.m_enabled);
|
|
|
|
ImGui::Checkbox("##DisplayEntityStateCB", &m_displayEntityState.m_enabled);
|
|
|
|
ImGui::NextColumn();
|
|
|
|
ImGui::NextColumn();
|
|
|
|
ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, s_ColorText);
|
|
|
|
ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, "%s", s_ColorText);
|
|
|
|
ImGui::SameLine();
|
|
|
|
ImGui::SameLine();
|
|
|
|
ImGui::ColorEdit4("##DisplayEntityStateCol", reinterpret_cast<float*>(&m_displayEntityState.m_color));
|
|
|
|
ImGui::ColorEdit4("##DisplayEntityStateCol", reinterpret_cast<float*>(&m_displayEntityState.m_color));
|
|
|
|
ImGui::NextColumn();
|
|
|
|
ImGui::NextColumn();
|
|
|
|
|
|
|
|
|
|
|
|
ImGui::TextColored(m_displayParentInfo.m_color, "Display Parent Info");
|
|
|
|
ImGui::TextColored(m_displayParentInfo.m_color, "Display Parent Info");
|
|
|
|
ImGui::NextColumn();
|
|
|
|
ImGui::NextColumn();
|
|
|
|
ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, s_OnText);
|
|
|
|
ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, "%s", s_OnText);
|
|
|
|
ImGui::SameLine();
|
|
|
|
ImGui::SameLine();
|
|
|
|
ImGui::Checkbox("##DisplayParentInfoCB", &m_displayParentInfo.m_enabled);
|
|
|
|
ImGui::Checkbox("##DisplayParentInfoCB", &m_displayParentInfo.m_enabled);
|
|
|
|
ImGui::NextColumn();
|
|
|
|
ImGui::NextColumn();
|
|
|
|
ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, s_ColorText);
|
|
|
|
ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, "%s", s_ColorText);
|
|
|
|
ImGui::SameLine();
|
|
|
|
ImGui::SameLine();
|
|
|
|
ImGui::ColorEdit4("##DisplayParentInfoCol", reinterpret_cast<float*>(&m_displayParentInfo.m_color));
|
|
|
|
ImGui::ColorEdit4("##DisplayParentInfoCol", reinterpret_cast<float*>(&m_displayParentInfo.m_color));
|
|
|
|
ImGui::NextColumn();
|
|
|
|
ImGui::NextColumn();
|
|
|
|
|
|
|
|
|
|
|
|
ImGui::TextColored(m_displayLocalPos.m_color, "Display Local Position");
|
|
|
|
ImGui::TextColored(m_displayLocalPos.m_color, "Display Local Position");
|
|
|
|
ImGui::NextColumn();
|
|
|
|
ImGui::NextColumn();
|
|
|
|
ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, s_OnText);
|
|
|
|
ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, "%s", s_OnText);
|
|
|
|
ImGui::SameLine();
|
|
|
|
ImGui::SameLine();
|
|
|
|
ImGui::Checkbox("##DisplayLocalPosCB", &m_displayLocalPos.m_enabled);
|
|
|
|
ImGui::Checkbox("##DisplayLocalPosCB", &m_displayLocalPos.m_enabled);
|
|
|
|
ImGui::NextColumn();
|
|
|
|
ImGui::NextColumn();
|
|
|
|
ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, s_ColorText);
|
|
|
|
ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, "%s", s_ColorText);
|
|
|
|
ImGui::SameLine();
|
|
|
|
ImGui::SameLine();
|
|
|
|
ImGui::ColorEdit4("##DisplayLocalPosCol", reinterpret_cast<float*>(&m_displayLocalPos.m_color));
|
|
|
|
ImGui::ColorEdit4("##DisplayLocalPosCol", reinterpret_cast<float*>(&m_displayLocalPos.m_color));
|
|
|
|
ImGui::NextColumn();
|
|
|
|
ImGui::NextColumn();
|
|
|
|
|
|
|
|
|
|
|
|
ImGui::TextColored(m_displayLocalRotation.m_color, "Display Local Rotation");
|
|
|
|
ImGui::TextColored(m_displayLocalRotation.m_color, "Display Local Rotation");
|
|
|
|
ImGui::NextColumn();
|
|
|
|
ImGui::NextColumn();
|
|
|
|
ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, s_OnText);
|
|
|
|
ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, "%s", s_OnText);
|
|
|
|
ImGui::SameLine();
|
|
|
|
ImGui::SameLine();
|
|
|
|
ImGui::Checkbox("##DisplayLocalRotationCB", &m_displayLocalRotation.m_enabled);
|
|
|
|
ImGui::Checkbox("##DisplayLocalRotationCB", &m_displayLocalRotation.m_enabled);
|
|
|
|
ImGui::NextColumn();
|
|
|
|
ImGui::NextColumn();
|
|
|
|
ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, s_ColorText);
|
|
|
|
ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, "%s", s_ColorText);
|
|
|
|
ImGui::SameLine();
|
|
|
|
ImGui::SameLine();
|
|
|
|
ImGui::ColorEdit4("##DisplayLocalRotationCol", reinterpret_cast<float*>(&m_displayLocalRotation.m_color));
|
|
|
|
ImGui::ColorEdit4("##DisplayLocalRotationCol", reinterpret_cast<float*>(&m_displayLocalRotation.m_color));
|
|
|
|
ImGui::NextColumn();
|
|
|
|
ImGui::NextColumn();
|
|
|
|
|
|
|
|
|
|
|
|
ImGui::TextColored(m_displayWorldPos.m_color, "Display World Position");
|
|
|
|
ImGui::TextColored(m_displayWorldPos.m_color, "Display World Position");
|
|
|
|
ImGui::NextColumn();
|
|
|
|
ImGui::NextColumn();
|
|
|
|
ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, s_OnText);
|
|
|
|
ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, "%s", s_OnText);
|
|
|
|
ImGui::SameLine();
|
|
|
|
ImGui::SameLine();
|
|
|
|
ImGui::Checkbox("##DisplayWorldPosCB", &m_displayWorldPos.m_enabled);
|
|
|
|
ImGui::Checkbox("##DisplayWorldPosCB", &m_displayWorldPos.m_enabled);
|
|
|
|
ImGui::NextColumn();
|
|
|
|
ImGui::NextColumn();
|
|
|
|
ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, s_ColorText);
|
|
|
|
ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, "%s", s_ColorText);
|
|
|
|
ImGui::SameLine();
|
|
|
|
ImGui::SameLine();
|
|
|
|
ImGui::ColorEdit4("##DisplayWorldPosCol", reinterpret_cast<float*>(&m_displayWorldPos.m_color));
|
|
|
|
ImGui::ColorEdit4("##DisplayWorldPosCol", reinterpret_cast<float*>(&m_displayWorldPos.m_color));
|
|
|
|
ImGui::NextColumn();
|
|
|
|
ImGui::NextColumn();
|
|
|
|
|
|
|
|
|
|
|
|
ImGui::TextColored(m_displayWorldRotation.m_color, "Display World Rotation");
|
|
|
|
ImGui::TextColored(m_displayWorldRotation.m_color, "Display World Rotation");
|
|
|
|
ImGui::NextColumn();
|
|
|
|
ImGui::NextColumn();
|
|
|
|
ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, s_OnText);
|
|
|
|
ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, "%s", s_OnText);
|
|
|
|
ImGui::SameLine();
|
|
|
|
ImGui::SameLine();
|
|
|
|
ImGui::Checkbox("##DisplayWorldRotationCB", &m_displayWorldRotation.m_enabled);
|
|
|
|
ImGui::Checkbox("##DisplayWorldRotationCB", &m_displayWorldRotation.m_enabled);
|
|
|
|
ImGui::NextColumn();
|
|
|
|
ImGui::NextColumn();
|
|
|
|
ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, s_ColorText);
|
|
|
|
ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, "%s", s_ColorText);
|
|
|
|
ImGui::SameLine();
|
|
|
|
ImGui::SameLine();
|
|
|
|
ImGui::ColorEdit4("##DisplayWorldRotationCol", reinterpret_cast<float*>(&m_displayWorldRotation.m_color));
|
|
|
|
ImGui::ColorEdit4("##DisplayWorldRotationCol", reinterpret_cast<float*>(&m_displayWorldRotation.m_color));
|
|
|
|
|
|
|
|
|
|
|
|
@ -508,7 +508,7 @@ namespace ImGui
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (sameLine)
|
|
|
|
else if (sameLine)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (ImGui::TreeNode(childTreeNodeStr.c_str(), childTreeNodeStr.c_str()))
|
|
|
|
if (ImGui::TreeNode(childTreeNodeStr.c_str(), "%s", childTreeNodeStr.c_str()))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ImGuiUpdate_RecursivelyDisplayEntityInfoAndDecendants_DrawDisplayOptions(node, drawInspectButton, drawTargetButton, drawDebugButton, sameLine, drawComponents);
|
|
|
|
ImGuiUpdate_RecursivelyDisplayEntityInfoAndDecendants_DrawDisplayOptions(node, drawInspectButton, drawTargetButton, drawDebugButton, sameLine, drawComponents);
|
|
|
|
|
|
|
|
|
|
|
|
@ -528,7 +528,7 @@ namespace ImGui
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ImGuiUpdate_RecursivelyDisplayEntityInfoAndDecendants_DrawDisplayOptions(node, drawInspectButton, drawTargetButton, drawDebugButton, sameLine, drawComponents);
|
|
|
|
ImGuiUpdate_RecursivelyDisplayEntityInfoAndDecendants_DrawDisplayOptions(node, drawInspectButton, drawTargetButton, drawDebugButton, sameLine, drawComponents);
|
|
|
|
childTreeNodeStr = AZStd::string::format("Children ##%s", childTreeNodeStr.c_str());
|
|
|
|
childTreeNodeStr = AZStd::string::format("Children ##%s", childTreeNodeStr.c_str());
|
|
|
|
if (ImGui::TreeNode(childTreeNodeStr.c_str(), childTreeNodeStr.c_str()))
|
|
|
|
if (ImGui::TreeNode(childTreeNodeStr.c_str(), "%s", childTreeNodeStr.c_str()))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
for (int i = 0; i < node->m_children.size(); i++)
|
|
|
|
for (int i = 0; i < node->m_children.size(); i++)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@ -542,7 +542,7 @@ namespace ImGui
|
|
|
|
else if (!justDrawChildren)
|
|
|
|
else if (!justDrawChildren)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, "->"); ImGui::SameLine();
|
|
|
|
ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, "->"); ImGui::SameLine();
|
|
|
|
ImGui::Text(childTreeNodeStr.c_str());
|
|
|
|
ImGui::Text("%s", childTreeNodeStr.c_str());
|
|
|
|
ImGuiUpdate_RecursivelyDisplayEntityInfoAndDecendants_DrawDisplayOptions(node, drawInspectButton, drawTargetButton, drawDebugButton, sameLine, drawComponents);
|
|
|
|
ImGuiUpdate_RecursivelyDisplayEntityInfoAndDecendants_DrawDisplayOptions(node, drawInspectButton, drawTargetButton, drawDebugButton, sameLine, drawComponents);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -561,7 +561,7 @@ namespace ImGui
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ImGui::SameLine();
|
|
|
|
ImGui::SameLine();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
ImGui::TextColored(m_displayName.m_color, entityName.c_str());
|
|
|
|
ImGui::TextColored(m_displayName.m_color, "%s", entityName.c_str());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Draw EntityViewer Button
|
|
|
|
// Draw EntityViewer Button
|
|
|
|
@ -762,7 +762,7 @@ namespace ImGui
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// Draw collapsible menu for the components set
|
|
|
|
// Draw collapsible menu for the components set
|
|
|
|
AZStd::string uiLabel = AZStd::string::format("Components##%s", node->m_entityId.ToString().c_str());
|
|
|
|
AZStd::string uiLabel = AZStd::string::format("Components##%s", node->m_entityId.ToString().c_str());
|
|
|
|
if (ImGui::TreeNode(uiLabel.c_str(), uiLabel.c_str()))
|
|
|
|
if (ImGui::TreeNode(uiLabel.c_str(), "%s", uiLabel.c_str()))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
AZ::Entity::ComponentArrayType components = entity->GetComponents();
|
|
|
|
AZ::Entity::ComponentArrayType components = entity->GetComponents();
|
|
|
|
// we should sort our array of components based on their names.
|
|
|
|
// we should sort our array of components based on their names.
|
|
|
|
@ -781,7 +781,7 @@ namespace ImGui
|
|
|
|
bool hasDebug = ComponentHasDebug(component->RTTI_GetType());
|
|
|
|
bool hasDebug = ComponentHasDebug(component->RTTI_GetType());
|
|
|
|
// Draw a collapsible menu for each component
|
|
|
|
// Draw a collapsible menu for each component
|
|
|
|
uiLabel = AZStd::string::format("%s##%s", component->RTTI_GetTypeName(), node->m_entityId.ToString().c_str());
|
|
|
|
uiLabel = AZStd::string::format("%s##%s", component->RTTI_GetTypeName(), node->m_entityId.ToString().c_str());
|
|
|
|
if (ImGui::TreeNode(uiLabel.c_str(), uiLabel.c_str()))
|
|
|
|
if (ImGui::TreeNode(uiLabel.c_str(), "%s", uiLabel.c_str()))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (hasDebug)
|
|
|
|
if (hasDebug)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@ -795,7 +795,7 @@ namespace ImGui
|
|
|
|
|
|
|
|
|
|
|
|
// Draw a collapsible menu for all Reflected Properties
|
|
|
|
// Draw a collapsible menu for all Reflected Properties
|
|
|
|
uiLabel = AZStd::string::format("Reflected Properties##%s", node->m_entityId.ToString().c_str());
|
|
|
|
uiLabel = AZStd::string::format("Reflected Properties##%s", node->m_entityId.ToString().c_str());
|
|
|
|
if (ImGui::TreeNode(uiLabel.c_str(), uiLabel.c_str()))
|
|
|
|
if (ImGui::TreeNode(uiLabel.c_str(), "%s", uiLabel.c_str()))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
AZ::SerializeContext *serializeContext = nullptr;
|
|
|
|
AZ::SerializeContext *serializeContext = nullptr;
|
|
|
|
AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext);
|
|
|
|
AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext);
|
|
|
|
@ -820,7 +820,7 @@ namespace ImGui
|
|
|
|
if (hasDebug)
|
|
|
|
if (hasDebug)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
uiLabel = AZStd::string::format("Debug##%s", node->m_entityId.ToString().c_str());
|
|
|
|
uiLabel = AZStd::string::format("Debug##%s", node->m_entityId.ToString().c_str());
|
|
|
|
if (ImGui::TreeNode(uiLabel.c_str(), uiLabel.c_str()))
|
|
|
|
if (ImGui::TreeNode(uiLabel.c_str(), "%s", uiLabel.c_str()))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// Attempt to draw any debug information for this component
|
|
|
|
// Attempt to draw any debug information for this component
|
|
|
|
ImGuiUpdateDebugComponentListenerBus::Event(ImGuiEntComponentId(node->m_entityId, component->RTTI_GetType())
|
|
|
|
ImGuiUpdateDebugComponentListenerBus::Event(ImGuiEntComponentId(node->m_entityId, component->RTTI_GetType())
|
|
|
|
|