Better layout of Save and Load buttons in both samples

This commit is contained in:
Graham Pentheny
2026-02-02 18:28:47 -05:00
parent 912b7d8ae3
commit 9bee4408c7
2 changed files with 4 additions and 6 deletions

View File

@@ -85,19 +85,19 @@ void Sample_SoloMesh::drawSettingsUI()
drawCommonSettingsUI();
ImGui::PushItemWidth(ImGui::GetContentRegionAvail().x);
if (ImGui::Button("Save"))
{
saveAll(fileName, navMesh);
}
ImGui::SameLine();
if (ImGui::Button("Load"))
{
dtFreeNavMesh(navMesh);
navMesh = loadAll(fileName);
navQuery->init(navMesh, 2048);
}
ImGui::PopItemWidth();
ImGui::Text("Build Time: %.1fms", totalBuildTimeMs);
}

View File

@@ -256,13 +256,13 @@ void Sample_TileMesh::drawSettingsUI()
ImGui::Separator();
ImGui::Indent();
if (ImGui::Button("Save"))
{
Sample::saveAll("all_tiles_navmesh.bin", navMesh);
}
ImGui::SameLine();
if (ImGui::Button("Load"))
{
dtFreeNavMesh(navMesh);
@@ -270,8 +270,6 @@ void Sample_TileMesh::drawSettingsUI()
navQuery->init(navMesh, 2048);
}
ImGui::Unindent();
ImGui::Text("Build Time: %.1fms", totalBuildTimeMs);
ImGui::Separator();