Clean up some UI rendering in solo mesh sample build controls

This commit is contained in:
Graham Pentheny
2025-08-05 13:45:31 -04:00
parent 13f61a5747
commit d4f4d82c4d

View File

@@ -92,27 +92,25 @@ void Sample_SoloMesh::cleanup()
void Sample_SoloMesh::handleSettings()
{
static const char* fileName = "solo_navmesh.bin";
handleCommonSettings();
ImGui::Separator();
ImGui::PushItemWidth(ImGui::GetContentRegionAvail().x);
if (ImGui::Button("Save"))
{
saveAll("solo_navmesh.bin", navMesh);
saveAll(fileName, navMesh);
}
ImGui::SameLine();
if (ImGui::Button("Load"))
{
dtFreeNavMesh(navMesh);
navMesh = loadAll("solo_navmesh.bin");
navMesh = loadAll(fileName);
navQuery->init(navMesh, 2048);
}
ImGui::PopItemWidth();
ImGui::Text("Build Time: %.1fms", totalBuildTimeMs);
ImGui::Separator();
}
void Sample_SoloMesh::handleTools()