Crimson Engine 1.0.0
A high-performance C++20 game engine prototype showcasing a custom ECS, Vulkan renderer, and ImGui editor.
Loading...
Searching...
No Matches
Engine::AssetBrowserRegistry Class Reference

Registry for adding custom options and submenu items to the Asset Browser's right-click context menu. More...

#include <AssetBrowserRegistry.hpp>

Classes

struct  Option

Public Types

using ContextMenuCallback = std::function<void(const std::filesystem::path&)>

Static Public Member Functions

static void registerOption (const std::string &labelPath, ContextMenuCallback callback)
 Registers a custom context menu item.
static std::vector< Option > & getOptions ()
 Retrieves all registered custom menu options.

Detailed Description

Registry for adding custom options and submenu items to the Asset Browser's right-click context menu.

Member Typedef Documentation

◆ ContextMenuCallback

using Engine::AssetBrowserRegistry::ContextMenuCallback = std::function<void(const std::filesystem::path&)>

Member Function Documentation

◆ getOptions()

std::vector< Option > & Engine::AssetBrowserRegistry::getOptions ( )
inlinestatic

Retrieves all registered custom menu options.

◆ registerOption()

void Engine::AssetBrowserRegistry::registerOption ( const std::string & labelPath,
ContextMenuCallback callback )
inlinestatic

Registers a custom context menu item.

Parameters
labelPathMenu hierarchy path (e.g. "Create/Script" or "Actions/Validate").
callbackFunction called when the menu item is selected, receiving the folder path.

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