feat: add imgui texture inspector (Thanks claude)

This commit is contained in:
2026-10-11 01:34:49 +02:00
parent 95d1497169
commit 170af2a4e9
18 changed files with 692 additions and 18 deletions
+2
View File
@@ -22,6 +22,7 @@ public:
void customFixedUpdate(float dt) override;
void onWindowResize(int newWidth, int newHeight) override;
void customWindowsMenu() override;
private:
void drawDebugMenuBar();
@@ -49,6 +50,7 @@ private:
bool renderBoxColliders{false};
bool renderQuads{true};
bool renderDebugLines{true};
bool showTestWindow{true};
};
#endif //LIGHTKEEPER_H
+8 -2
View File
@@ -539,8 +539,8 @@ void LightKeeper::customUpdate(float dt)
renderer.setRenderWireframe(!renderer.getRenderWireframe());
}
if (m_params.showDebugUi) {
ImGui::Begin("Test");
if (m_params.showDebugUi && showTestWindow) {
ImGui::Begin("Test", &showTestWindow);
if (ImGui::Button("SPawn ball"))
{
auto sphere = SceneManager::GetInstance().GetCurrentScene().CreateGameObject("Sphere");
@@ -563,6 +563,12 @@ void LightKeeper::customUpdate(float dt)
}
void LightKeeper::customWindowsMenu()
{
ImGui::Separator();
ImGui::MenuItem("Test", nullptr, &showTestWindow);
}
void LightKeeper::drawDebugMenuBar()
{
if (!ImGui::BeginMainMenuBar()) {