added material editing in mesh panel. Renamed mesh component to model component.

This commit is contained in:
a.pilote
2022-07-17 14:15:11 -04:00
parent dbec248d8a
commit 5fb1e376c2
13 changed files with 298 additions and 28 deletions

View File

@@ -4,7 +4,7 @@
#include "ModelResourceInspector.h"
#include <src/Scene/Entities/ImGuiHelper.h>
#include <src/Scene/Components/MeshComponent.h>
#include <src/Scene/Components/ModelComponent.h>
#include <src/Resource/ResourceLoader.h>
#include <src/Core/String.h>
@@ -21,13 +21,14 @@ public:
void Draw(Nuake::Entity entity) override
{
if (!entity.HasComponent<Nuake::MeshComponent>())
using namespace Nuake;
if (!entity.HasComponent<ModelComponent>())
return;
Nuake::MeshComponent& component = entity.GetComponent<Nuake::MeshComponent>();
BeginComponentTable(MESH, Nuake::MeshComponent);
ModelComponent& component = entity.GetComponent<ModelComponent>();
BeginComponentTable(MESH, ModelComponent);
{
ImGui::Text("Mesh");
ImGui::Text("Model");
ImGui::TableNextColumn();
std::string label = std::to_string(component.ModelResource->ID);