docs: Update RHI test refactoring status
- Mark P0-1 (Shader) and P0-2 (PipelineState) as completed - Update test coverage matrix - Add changelog v1.1
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#include "Managers/SceneManager.h"
|
||||
#include "Managers/SelectionManager.h"
|
||||
#include "UI/UI.h"
|
||||
#include <XCEngine/Debug/Logger.h>
|
||||
#include <imgui.h>
|
||||
#include <string>
|
||||
|
||||
@@ -9,6 +10,7 @@ namespace XCEngine {
|
||||
namespace Editor {
|
||||
|
||||
InspectorPanel::InspectorPanel() : Panel("Inspector") {
|
||||
Debug::Logger::Get().Debug(Debug::LogCategory::General, "InspectorPanel constructed");
|
||||
m_selectionHandlerId = SelectionManager::Get().OnSelectionChanged.Subscribe([this](uint64_t) {
|
||||
m_selectedGameObject = SelectionManager::Get().GetSelectedEntity();
|
||||
});
|
||||
@@ -19,6 +21,7 @@ InspectorPanel::~InspectorPanel() {
|
||||
}
|
||||
|
||||
void InspectorPanel::Render() {
|
||||
Debug::Logger::Get().Debug(Debug::LogCategory::General, "InspectorPanel::Render START");
|
||||
ImGui::Begin(m_name.c_str(), nullptr, ImGuiWindowFlags_None);
|
||||
|
||||
m_selectedGameObject = SelectionManager::Get().GetSelectedEntity();
|
||||
@@ -31,9 +34,11 @@ void InspectorPanel::Render() {
|
||||
}
|
||||
|
||||
ImGui::End();
|
||||
Debug::Logger::Get().Debug(Debug::LogCategory::General, "InspectorPanel::Render END");
|
||||
}
|
||||
|
||||
void InspectorPanel::RenderGameObject(::XCEngine::Components::GameObject* gameObject) {
|
||||
Debug::Logger::Get().Debug(Debug::LogCategory::General, "RenderGameObject START");
|
||||
char nameBuffer[256];
|
||||
strcpy_s(nameBuffer, gameObject->GetName().c_str());
|
||||
ImGui::InputText("##Name", nameBuffer, sizeof(nameBuffer));
|
||||
@@ -43,6 +48,7 @@ void InspectorPanel::RenderGameObject(::XCEngine::Components::GameObject* gameOb
|
||||
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("Add Component")) {
|
||||
Debug::Logger::Get().Debug(Debug::LogCategory::General, "Add Component BUTTON CLICKED");
|
||||
ImGui::OpenPopup("AddComponent");
|
||||
}
|
||||
|
||||
@@ -52,27 +58,47 @@ void InspectorPanel::RenderGameObject(::XCEngine::Components::GameObject* gameOb
|
||||
for (auto* component : components) {
|
||||
RenderComponent(component, gameObject);
|
||||
}
|
||||
Debug::Logger::Get().Debug(Debug::LogCategory::General, "RenderGameObject END");
|
||||
}
|
||||
|
||||
void InspectorPanel::RenderAddComponentPopup(::XCEngine::Components::GameObject* gameObject) {
|
||||
if (!ImGui::BeginPopup("AddComponent")) {
|
||||
Debug::Logger::Get().Debug(Debug::LogCategory::General, "RenderAddComponentPopup called");
|
||||
|
||||
if (!gameObject) {
|
||||
Debug::Logger::Get().Error(Debug::LogCategory::General, "ERROR: gameObject is nullptr!");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!ImGui::BeginPopup("AddComponent")) {
|
||||
Debug::Logger::Get().Debug(Debug::LogCategory::General, "BeginPopup returned false");
|
||||
return;
|
||||
}
|
||||
|
||||
Debug::Logger::Get().Debug(Debug::LogCategory::General, "BeginPopup succeeded");
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(12.0f, 10.0f));
|
||||
|
||||
ImGui::SeparatorText("Components");
|
||||
|
||||
if (ImGui::MenuItem("Transform", nullptr, false, !gameObject->GetComponent<::XCEngine::Components::TransformComponent>())) {
|
||||
gameObject->AddComponent<::XCEngine::Components::TransformComponent>();
|
||||
bool hasTransform = gameObject->GetComponent<::XCEngine::Components::TransformComponent>() != nullptr;
|
||||
Debug::Logger::Get().Debug(Debug::LogCategory::General, hasTransform ? "Has Transform: yes" : "Has Transform: no");
|
||||
|
||||
Debug::Logger::Get().Debug(Debug::LogCategory::General, "About to check MenuItem condition");
|
||||
if (ImGui::MenuItem("Transform", nullptr, false, !hasTransform)) {
|
||||
Debug::Logger::Get().Debug(Debug::LogCategory::General, "MenuItem CLICKED! Before AddComponent");
|
||||
auto* newComp = gameObject->AddComponent<::XCEngine::Components::TransformComponent>();
|
||||
Debug::Logger::Get().Debug(Debug::LogCategory::General, newComp ? "AddComponent SUCCEEDED" : "AddComponent FAILED");
|
||||
ImGui::CloseCurrentPopup();
|
||||
} else {
|
||||
Debug::Logger::Get().Debug(Debug::LogCategory::General, "MenuItem not clicked (disabled or condition false)");
|
||||
}
|
||||
|
||||
ImGui::SeparatorText("Other");
|
||||
ImGui::TextDisabled("No more components available");
|
||||
|
||||
ImGui::PopStyleVar();
|
||||
Debug::Logger::Get().Debug(Debug::LogCategory::General, "About to EndPopup");
|
||||
ImGui::EndPopup();
|
||||
ImGui::PopStyleVar();
|
||||
Debug::Logger::Get().Debug(Debug::LogCategory::General, "Popup closed");
|
||||
}
|
||||
|
||||
void InspectorPanel::RenderComponent(::XCEngine::Components::Component* component, ::XCEngine::Components::GameObject* gameObject) {
|
||||
|
||||
Reference in New Issue
Block a user