9#include "../../system/system_utils.h"
10#include "../../third_party/nfd/nfd.hpp"
29 return std::wstring();
35 return std::wstring();
51 if (
wstr ==
nullptr) {
82 return std::string(
str);
95 for (
size_t i = 0;
i < result.size(); ++
i) {
96 if (result[
i] ==
',') {
114 SYSTEM_LOG <<
"[AIEditorFileDialog] ERROR: Failed to initialize NFD" << std::endl;
115 return std::string();
138 item.name =
"AI Graphs";
175 const char*
error = NFD::GetError();
193 SYSTEM_LOG <<
"[AIEditorFileDialog] ERROR: Failed to initialize NFD" << std::endl;
194 return std::string();
217 item.name =
"AI Graphs";
258 const char*
error = NFD::GetError();
273 SYSTEM_LOG <<
"[AIEditorFileDialog] ERROR: Failed to initialize NFD" << std::endl;
274 return std::string();
302 const char*
error = NFD::GetError();
314 const char*
error = NFD::GetError();
315 if (
error !=
nullptr) {
316 return std::string(
error);
318 return std::string();
Native file dialog wrapper for AI Editor (Phase 1.5)
ComponentTypeID GetComponentTypeID_Static()
static std::string ConvertFiltersToNFD(const std::string &filterList)
Convert comma-separated filter list to NFD format.
static std::string FromNFDString(const char *str)
static std::string OpenFile(const std::string &filterList="json,btree", const std::string &defaultPath="")
Open a native file dialog to select an existing file.
static std::string ToNFDString(const std::string &str)
Convert std::string to native NFD character type.
static std::string OpenFolder(const std::string &defaultPath="")
Open a native folder selection dialog.
static std::string GetLastError()
Get last error message from NFD.
static std::string SaveFile(const std::string &filterList="json,btree", const std::string &defaultPath="", const std::string &defaultName="new_ai_graph.json")
Open a native save file dialog.
< Provides AssetID and INVALID_ASSET_ID