18 ImTextureID folder = 0;
21 ImTextureID texture = 0;
22 ImTextureID scene = 0;
25 ImTextureID audio = 0;
45 std::string
Draw(
const BrowserIcons& icons,
float& thumbnailSize,
bool showBottomBar =
true,
float height = 0.0f);
70 std::filesystem::path m_rootPath;
71 std::filesystem::path m_currentPath;
73 float m_padding = 16.0f;
75 std::filesystem::path m_copiedPath;
78 bool m_renaming =
false;
79 std::filesystem::path m_renamePath;
80 char m_renameBuffer[256] =
"";
82 char m_searchBuffer[256] =
"";
90 ImTextureID
GetIcon(
const std::filesystem::directory_entry& entry,
const BrowserIcons& icons);
AssetBrowser(const std::string &rootPath)
Constructs the AssetBrowser.
std::string Draw(const BrowserIcons &icons, float &thumbnailSize, bool showBottomBar=true, float height=0.0f)
Draws the Asset Browser UI and handles interaction.
void setPadding(float padding)
Sets the padding between asset icons in the browser.
int GetJSONAssetType(const std::string path)
Determines the type of a JSON asset (e.g., scene, material, etc.).
ImTextureID GetIcon(const std::filesystem::directory_entry &entry, const BrowserIcons &icons)
Gets the appropriate icon texture ID for a given directory entry.
std::string getCurrentPath() const
Gets the currently viewed directory path.
std::string GetExtension(const std::string path)
Extracts the file extension from a path.
Structure holding texture IDs for various asset types displayed in the browser.