Files
3d-model-renderer/src/app/FileBrowser.h
T
gs5579andDevin AI d842285390 Add OSG/Assimp/ImGui model renderer with PMX/PMD/FBX loading, posing and morphs
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-11-27 09:51:44 +00:00

29 lines
638 B
C++

#pragma once
#include <string>
#include <vector>
namespace mr {
// Minimal ImGui file picker (ImGui has no native file dialog).
class FileBrowser {
public:
FileBrowser();
void open();
// Draws the popup; returns true when a file was chosen (see selectedPath()).
bool draw();
const std::string& selectedPath() const { return selected_; }
private:
void refresh();
std::string currentDir_;
char pathBuffer_[1024] = {};
std::vector<std::pair<std::string, bool>> entries_; // name, isDirectory
std::string selected_;
std::string error_;
bool openRequested_ = false;
};
} // namespace mr