mirror of
https://github.com/antopilo/Nuake.git
synced 2026-09-21 20:08:40 +03:00
Reworked editor camera
This commit is contained in:
30
Editor/src/ComponentsPanel/RigidbodyPanel.h
Normal file
30
Editor/src/ComponentsPanel/RigidbodyPanel.h
Normal 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();
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user