Reworked editor camera

This commit is contained in:
antopilo
2023-03-07 17:26:13 -05:00
parent 10baf5271a
commit 6cbad0e13b
20 changed files with 126 additions and 114 deletions

View File

@@ -0,0 +1,30 @@
#pragma once
#include "ComponentPanel.h"
#include <src/Scene/Components/RigidbodyComponent.h>
#include <src/Core/FileSystem.h>
class RigidbodyPanel : ComponentPanel {
public:
RigidbodyPanel() {}
void Draw(Nuake::Entity entity) override
{
if (!entity.HasComponent<Nuake::RigidBodyComponent>())
return;
auto& component = entity.GetComponent<Nuake::RigidBodyComponent>();
BeginComponentTable(RIGIDBODY, Nuake::RigidBodyComponent);
{
{
ImGui::Text("Mass");
ImGui::TableNextColumn();
ImGui::DragFloat("##Mass", &component.Mass, 0.1f, 0.1f);
ImGui::TableNextColumn();
ComponentTableReset(component.Mass, 0.0f);
}
}
EndComponentTable();
}
};