26 class AssetBrowserPanel {
32 struct AssetBrowserItem {
39 std::filesystem::path filepath;
40 std::filesystem::path filename;
41 AssetType defaultAssetType;
42 std::string defaultAssetName;
44 bool isSubassetListOpen;
45 std::vector<Subasset> subassets;
48 enum class AssetBrowserInspectType {
54 void AddFilePath(
const std::filesystem::directory_entry& file);
57 void SetCurrentPlugin(
const std::string& pluginName);
58 void SetCurrentAssetDirectory(
const std::filesystem::path& path);
59 void SetFilesFromCurrentDirectory();
60 void ProcessFolderClicks(
const std::filesystem::path& path);
61 void ProcessFileClicks(AssetBrowserItem& item);
63 void RenderPathPart(
const std::filesystem::path& path);
64 void RenderBreadcrumbs();
65 void RenderContextMenuFileTypeSpecificEntries(
const std::filesystem::path& path);
66 void RenderAssetContextMenu(
bool isFolder,
const std::filesystem::path& path,
size_t index);
67 void RenderCurrentDirectoryContextMenu();
68 void RenderAssetTemplates(
const std::filesystem::path& path);
69 size_t SortFile(
bool isFolder,
size_t indexToSort);
71 void RenderAllPlugins();
75 void RenderAssets(
float height);
76 void RenderSidebar(
float height);
77 void RenderSidebarSubdirectory(
const std::string& pluginName,
const std::filesystem::directory_entry& entry);
78 void RenderFile(
size_t fileIndex);
80 void AfterCreate(
const std::filesystem::path& path);
82 AssetBrowserInspectType assetBrowserInspectType;
83 std::filesystem::directory_entry currentDirectory;
84 std::string currentPluginName;
88 bool isShowingPanel =
true;
91 bool isRenamingFolder;
93 std::string pathRenameNewName;
94 std::string searchText;
95 std::string searchTextLower;
96 std::vector<std::filesystem::path> folders;
97 std::vector<AssetBrowserItem> files;
98 std::chrono::time_point<std::chrono::system_clock> lastRefreshedAssetsTime;