Recast: fix user interface bug

"Pathfind Sliced" was checking on the wrong member variable, and the check for enabling "Set Random End" and "Make Random Points Around" was inverted.
This commit is contained in:
Kawe Mazidjatari 2024-07-10 11:09:30 +02:00
parent 192f5dd326
commit df94ba0314

View File

@ -260,7 +260,7 @@ void NavMeshTesterTool::handleMenu()
ImGui::Unindent();
}
isEnabled = m_straightPathOptions == TOOLMODE_PATHFIND_SLICED;
isEnabled = m_toolMode == TOOLMODE_PATHFIND_SLICED;
if (ImGui::Checkbox("Pathfind Sliced", &isEnabled))
{
@ -324,7 +324,7 @@ void NavMeshTesterTool::handleMenu()
}
}
ImGui::BeginDisabled(m_sposSet);
ImGui::BeginDisabled(!m_sposSet);
if (ImGui::Button("Set Random End"))
{
@ -360,7 +360,7 @@ void NavMeshTesterTool::handleMenu()
}
}
ImGui::BeginDisabled(m_sposSet);
ImGui::BeginDisabled(!m_sposSet);
if (ImGui::Button("Make Random Points Around"))
{