Recast: fix level name truncation

Make sure the largest map name fits in the window.
This commit is contained in:
Kawe Mazidjatari 2024-07-09 16:49:49 +02:00
parent 6fd9a5b936
commit 42e2c8d309

View File

@ -990,8 +990,8 @@ int not_main(int argc, char** argv)
// Level selection dialog.
if (showLevels)
{
ImGui::SetNextWindowPos(ImVec2((float)width-10-250-10-200, (float)height-10-900), ImGuiCond_Once);
ImGui::SetNextWindowSize(ImVec2(200.f, 450.f), ImGuiCond_Once);
ImGui::SetNextWindowPos(ImVec2((float)width-10-250-10-250, (float)height-10-900), ImGuiCond_Once);
ImGui::SetNextWindowSize(ImVec2(250.f, 450.f), ImGuiCond_Once);
if (ImGui::Begin("Choose Level", nullptr, baseWindowFlags))
{
vector<string>::const_iterator fileIter = files.begin();
@ -1060,8 +1060,8 @@ int not_main(int argc, char** argv)
// Test cases
if (showTestCases)
{
ImGui::SetNextWindowPos(ImVec2((float)width-10-250-10-200, (float)height-10-900), ImGuiCond_Once);
ImGui::SetNextWindowSize(ImVec2(200.f, 450.f), ImGuiCond_Once);
ImGui::SetNextWindowPos(ImVec2((float)width-10-250-10-250, (float)height-10-900), ImGuiCond_Once);
ImGui::SetNextWindowSize(ImVec2(250.f, 450.f), ImGuiCond_Once);
if (ImGui::Begin("Choose Test To Run", nullptr, baseWindowFlags))
{