mirror of
https://github.com/recastnavigation/recastnavigation.git
synced 2026-06-08 08:13:49 +00:00
Better layout of Save and Load buttons in both samples
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user