This commit is contained in:
2025-12-18 02:24:46 -05:00
parent e896c7f9cc
commit 92d6d90130

View File

@@ -7,11 +7,13 @@
#include <imgui/imgui.h> #include <imgui/imgui.h>
#include "path_.h"
#include "strings.h" #include "strings.h"
#include "types.h" #include "types.h"
using namespace anm2ed::resource; using namespace anm2ed::resource;
using namespace anm2ed::types; using namespace anm2ed::types;
using namespace anm2ed::util;
using namespace glm; using namespace glm;
namespace anm2ed::imgui namespace anm2ed::imgui
@@ -39,8 +41,10 @@ namespace anm2ed::imgui
for (auto [i, file] : std::views::enumerate(recentFiles)) for (auto [i, file] : std::views::enumerate(recentFiles))
{ {
ImGui::PushID((int)i); ImGui::PushID((int)i);
auto label = std::format(FILE_LABEL_FORMAT, file.filename().string(), file.string()); auto fileNameUtf8 = path::to_utf8(file.filename());
if (ImGui::MenuItem(label.c_str())) manager.open(file.string()); auto filePathUtf8 = path::to_utf8(file);
auto label = std::format(FILE_LABEL_FORMAT, fileNameUtf8, filePathUtf8);
if (ImGui::MenuItem(label.c_str())) manager.open(file);
ImGui::PopID(); ImGui::PopID();
} }