mirror of
https://github.com/antopilo/Nuake.git
synced 2026-09-15 20:08:54 +03:00
Added Screen space reflections and Editor UI refactoring
This commit is contained in:
48
Editor/src/ComponentsPanel/TransformPanel.h
Normal file
48
Editor/src/ComponentsPanel/TransformPanel.h
Normal file
@@ -0,0 +1,48 @@
|
||||
#pragma once
|
||||
#include "ComponentPanel.h"
|
||||
#include <src/Scene/Entities/ImGuiHelper.h>
|
||||
#include <src/Scene/Components/TransformComponent.h>
|
||||
|
||||
class TransformPanel : ComponentPanel {
|
||||
|
||||
public:
|
||||
TransformPanel() {}
|
||||
|
||||
void Draw(Nuake::Entity entity) override
|
||||
{
|
||||
Nuake::TransformComponent& component = entity.GetComponent<Nuake::TransformComponent>();
|
||||
BeginComponentTable(TRANSFORM, Nuake::TransformComponent);
|
||||
{
|
||||
{
|
||||
ImGui::Text("Translation");
|
||||
ImGui::TableNextColumn();
|
||||
|
||||
ImGuiHelper::DrawVec3("Translation", &component.Translation);
|
||||
ImGui::TableNextColumn();
|
||||
|
||||
ComponentTableReset(component.Translation, Nuake::Vector3(0, 0, 0));
|
||||
}
|
||||
ImGui::TableNextColumn();
|
||||
{
|
||||
ImGui::Text("Rotation");
|
||||
ImGui::TableNextColumn();
|
||||
|
||||
ImGuiHelper::DrawVec3("Rotation", &component.Rotation);
|
||||
ImGui::TableNextColumn();
|
||||
|
||||
ComponentTableReset(component.Rotation, Nuake::Vector3(0, 0, 0));
|
||||
}
|
||||
ImGui::TableNextColumn();
|
||||
{
|
||||
ImGui::Text("Scale");
|
||||
ImGui::TableNextColumn();
|
||||
|
||||
ImGuiHelper::DrawVec3("Scale", &component.Scale);
|
||||
ImGui::TableNextColumn();
|
||||
|
||||
ComponentTableReset(component.Scale, Nuake::Vector3(1, 1, 1));
|
||||
}
|
||||
}
|
||||
EndComponentTable();
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user