feat: add imgui texture inspector (Thanks claude)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user