fixed unselecting entity when cursor goes from ImGui to viewport while click is held

This commit is contained in:
Erris
2026-03-03 09:38:52 +01:00
parent 4a624cfe70
commit 282eeeabda
4 changed files with 7 additions and 15 deletions

View File

@@ -227,15 +227,10 @@ namespace OpenEngine {
auto& ambient = material.ambient_strength;
auto& specular = material.specular_strength;
if (ImGui::SliderFloat4("Albedo", glm::value_ptr(albedo), 0, 1))
material.albedo = albedo;
if (ImGui::SliderFloat("Roughness", &roughness, 0, 1))
material.roughness = roughness;
if (ImGui::SliderFloat("Metallic", &metallic, 0, 1))
material.metallic = metallic;
if (ImGui::SliderFloat("Ambient strength", &ambient, 0, 1))
material.ambient_strength = ambient;
if (ImGui::SliderFloat("Specular strength", &specular, 0, 10))
material.specular_strength = specular;
ImGui::SliderFloat4("Albedo", glm::value_ptr(albedo), 0, 1);
ImGui::SliderFloat("Roughness", &roughness, 0, 1);
ImGui::SliderFloat("Metallic", &metallic, 0, 1);
ImGui::SliderFloat("Ambient strength", &ambient, 0, 1);
ImGui::SliderFloat("Specular strength", &specular, 0, 10);
}
}