diff --git a/SHADE_Engine/src/Editor/EditorWindow/Inspector/SHEditorInspector.cpp b/SHADE_Engine/src/Editor/EditorWindow/Inspector/SHEditorInspector.cpp index 35836dc2..3d00ac4b 100644 --- a/SHADE_Engine/src/Editor/EditorWindow/Inspector/SHEditorInspector.cpp +++ b/SHADE_Engine/src/Editor/EditorWindow/Inspector/SHEditorInspector.cpp @@ -18,6 +18,8 @@ #include "ECS_Base/Managers/SHSystemManager.h" #include "AudioSystem/SHAudioSystem.h" +#include "Physics/Components/SHRigidBodyComponent.h" +#include "Physics/Components/SHColliderComponent.h" namespace SHADE { @@ -70,23 +72,28 @@ namespace SHADE { DrawComponent(renderableComponent); } - if(auto testComponent = SHComponentManager::GetComponent_s(eid)) + if(auto colliderComponent = SHComponentManager::GetComponent_s(eid)) { - DrawComponent(testComponent); + DrawComponent(colliderComponent); } + if(auto rigidbodyComponent = SHComponentManager::GetComponent_s(eid)) + { + DrawComponent(rigidbodyComponent); + } + ImGui::Separator(); + // Render Scripts + SHScriptEngine* scriptEngine = static_cast(SHSystemManager::GetSystem()); + scriptEngine->RenderScriptsInInspector(eid); ImGui::Separator(); if(ImGui::BeginMenu(std::format("{} Add Component", ICON_MD_LIBRARY_ADD).data())) { DrawAddComponentButton(eid); DrawAddComponentButton(eid); - DrawAddComponentButton(eid); + DrawAddComponentButton(eid); + DrawAddComponentButton(eid); ImGui::EndMenu(); } - // Render Scripts - SHScriptEngine* scriptEngine = static_cast(SHSystemManager::GetSystem()); - scriptEngine->RenderScriptsInInspector(eid); - } ImGui::End(); } diff --git a/SHADE_Engine/src/Physics/Components/SHRigidBodyComponent.cpp b/SHADE_Engine/src/Physics/Components/SHRigidBodyComponent.cpp index e2cd1e4b..5f961de4 100644 --- a/SHADE_Engine/src/Physics/Components/SHRigidBodyComponent.cpp +++ b/SHADE_Engine/src/Physics/Components/SHRigidBodyComponent.cpp @@ -390,6 +390,13 @@ RTTR_REGISTRATION using namespace SHADE; using namespace rttr; + registration::enumeration("RigidBody Type") + ( + value("Static", SHRigidBodyComponent::Type::STATIC), + value("Dynamic", SHRigidBodyComponent::Type::DYNAMIC), + value("Kinematic", SHRigidBodyComponent::Type::KINEMATIC) + ); + registration::class_("RigidBody Component") .property("Type" , &SHRigidBodyComponent::GetType , &SHRigidBodyComponent::SetType ) .property("Mass" , &SHRigidBodyComponent::GetMass , &SHRigidBodyComponent::SetMass )