Voltray Engine Docs
Loading...
Searching...
No Matches
Editor::Assets::IconRenderer Class Reference

Renders visual icons using Dear ImGui drawing primitives. More...

#include <IconRenderer.h>

Static Public Member Functions

static void RenderFileIcon (ImDrawList *drawList, ImVec2 center, float size, const std::string &extension, bool isDirectory, bool isParentDir, bool isSelected=false)
 Render a file icon at the specified position.
 
static void RenderSmallIcon (ImDrawList *drawList, ImVec2 center, const std::string &extension, bool isDirectory)
 Render a small icon for list view.
 
static ImU32 GetFileTypeColor (const std::string &extension, bool isDirectory)
 Get the color scheme for a file type.
 

Detailed Description

Renders visual icons using Dear ImGui drawing primitives.

Member Function Documentation

◆ GetFileTypeColor()

ImU32 Editor::Assets::IconRenderer::GetFileTypeColor ( const std::string &  extension,
bool  isDirectory 
)
static

Get the color scheme for a file type.

Parameters
extensionFile extension
isDirectoryWhether it's a directory
Returns
Primary color for the file type

◆ RenderFileIcon()

void Editor::Assets::IconRenderer::RenderFileIcon ( ImDrawList *  drawList,
ImVec2  center,
float  size,
const std::string &  extension,
bool  isDirectory,
bool  isParentDir,
bool  isSelected = false 
)
static

Render a file icon at the specified position.

Parameters
drawListImGui draw list to render to
centerCenter position for the icon
sizeSize of the icon
extensionFile extension
isDirectoryWhether it's a directory
isParentDirWhether it's a parent directory entry
isSelectedWhether the item is selected

◆ RenderSmallIcon()

void Editor::Assets::IconRenderer::RenderSmallIcon ( ImDrawList *  drawList,
ImVec2  center,
const std::string &  extension,
bool  isDirectory 
)
static

Render a small icon for list view.

Parameters
drawListImGui draw list
centerCenter position
extensionFile extension
isDirectoryWhether it's a directory

The documentation for this class was generated from the following files: