Manages drag and drop operations for assets.
More...
#include <AssetDragDrop.h>
Manages drag and drop operations for assets.
◆ AcceptDrop()
Check if there's an asset being dragged and handle drop.
- Returns
- Pointer to payload if drop occurred, nullptr otherwise
◆ BeginDrag()
bool Editor::Assets::AssetDragDrop::BeginDrag |
( |
const std::filesystem::path & |
assetPath, |
|
|
const std::string & |
assetType, |
|
|
bool |
isGlobal |
|
) |
| |
|
static |
Begin a drag operation for an asset.
- Parameters
-
assetPath | Path to the asset being dragged |
assetType | Type of the asset (model, texture, script, etc.) |
isGlobal | Whether this is a global asset |
- Returns
- True if drag operation started successfully
◆ CanAcceptDrop()
bool Editor::Assets::AssetDragDrop::CanAcceptDrop |
( |
const std::string & |
targetType | ) |
|
|
static |
Check if we can accept a drop at the current location.
- Parameters
-
targetType | Type of target (viewport, scene, etc.) |
- Returns
- True if drop is valid
◆ GetDragPayload()
Get the current drag payload without consuming it.
- Returns
- Pointer to payload if dragging, nullptr otherwise
◆ HandleSceneDrop()
bool Editor::Assets::AssetDragDrop::HandleSceneDrop |
( |
const DragDropPayload & |
payload | ) |
|
|
static |
Handle asset drop into scene hierarchy.
- Parameters
-
payload | The drag drop payload |
- Returns
- True if drop was handled successfully
◆ HandleViewportDrop()
bool Editor::Assets::AssetDragDrop::HandleViewportDrop |
( |
const DragDropPayload & |
payload, |
|
|
const ImVec2 & |
dropPosition |
|
) |
| |
|
static |
Handle asset drop into viewport.
- Parameters
-
payload | The drag drop payload |
dropPosition | Screen position where drop occurred |
- Returns
- True if drop was handled successfully
◆ RenderDragPreview()
void Editor::Assets::AssetDragDrop::RenderDragPreview |
( |
| ) |
|
|
static |
Render drag preview overlay.
The documentation for this class was generated from the following files: