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

Manages context menus for the asset browser. More...

#include <ContextMenu.h>

Static Public Member Functions

static ContextMenuResult ShowEmptySpaceMenu (const std::filesystem::path &currentPath, bool isGlobal)
 Show context menu for empty space in the browser.
 
static ContextMenuResult ShowAssetMenu (const AssetItem &item, bool isGlobal)
 Show context menu for a specific asset item.
 
static bool ShowScriptCreationDialog (std::string &scriptName, std::string &scriptType)
 Show script creation submenu.
 
static bool ShowRenameDialog (const std::string &currentName, std::string &newName)
 Show rename dialog.
 
static bool ShowFolderCreationDialog (std::string &folderName)
 Show folder creation dialog.
 
static bool ShowDeleteConfirmation (const std::string &itemName, bool isDirectory)
 Show delete confirmation dialog.
 

Detailed Description

Manages context menus for the asset browser.

Member Function Documentation

◆ ShowAssetMenu()

ContextMenuResult Editor::Assets::ContextMenu::ShowAssetMenu ( const AssetItem item,
bool  isGlobal 
)
static

Show context menu for a specific asset item.

Parameters
itemThe asset item
isGlobalWhether this is global assets
Returns
Context menu result

◆ ShowDeleteConfirmation()

bool Editor::Assets::ContextMenu::ShowDeleteConfirmation ( const std::string &  itemName,
bool  isDirectory 
)
static

Show delete confirmation dialog.

Parameters
itemNameName of the item to delete
isDirectoryWhether it's a directory
Returns
True if item should be deleted

◆ ShowEmptySpaceMenu()

ContextMenuResult Editor::Assets::ContextMenu::ShowEmptySpaceMenu ( const std::filesystem::path &  currentPath,
bool  isGlobal 
)
static

Show context menu for empty space in the browser.

Parameters
currentPathCurrent directory path
isGlobalWhether this is global assets
Returns
Context menu result

◆ ShowFolderCreationDialog()

bool Editor::Assets::ContextMenu::ShowFolderCreationDialog ( std::string &  folderName)
static

Show folder creation dialog.

Parameters
folderNameOutput parameter for folder name
Returns
True if folder should be created

◆ ShowRenameDialog()

bool Editor::Assets::ContextMenu::ShowRenameDialog ( const std::string &  currentName,
std::string &  newName 
)
static

Show rename dialog.

Parameters
currentNameCurrent name of the item
newNameOutput parameter for new name
Returns
True if item should be renamed

◆ ShowScriptCreationDialog()

bool Editor::Assets::ContextMenu::ShowScriptCreationDialog ( std::string &  scriptName,
std::string &  scriptType 
)
static

Show script creation submenu.

Parameters
scriptNameOutput parameter for script name
scriptTypeOutput parameter for script type
Returns
True if script should be created

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