27 DragDropPayload(
const std::filesystem::path &path,
const std::string &type,
bool global)
45 static bool BeginDrag(
const std::filesystem::path &assetPath,
const std::string &assetType,
bool isGlobal);
87 static constexpr const char *DRAG_DROP_ID =
"ASSET_DRAG_DROP";
89 static bool s_isDragging;
97 static bool CreateSceneObjectFromAsset(
const DragDropPayload &payload,
const ImVec2 &position);
105 static bool LoadModelAsset(
const std::filesystem::path &assetPath,
const ImVec2 &position);
112 static bool ApplyTextureAsset(
const std::filesystem::path &assetPath);
119 static bool AttachScriptAsset(
const std::filesystem::path &assetPath);
A panel component responsible for managing and displaying asset resources.
Manages drag and drop operations for assets.
Definition AssetDragDrop.h:36
static bool BeginDrag(const std::filesystem::path &assetPath, const std::string &assetType, bool isGlobal)
Begin a drag operation for an asset.
Definition AssetDragDrop.cpp:21
static void RenderDragPreview()
Render drag preview overlay.
Definition AssetDragDrop.cpp:138
static const DragDropPayload * GetDragPayload()
Get the current drag payload without consuming it.
Definition AssetDragDrop.cpp:89
static bool HandleSceneDrop(const DragDropPayload &payload)
Handle asset drop into scene hierarchy.
Definition AssetDragDrop.cpp:132
static const DragDropPayload * AcceptDrop()
Check if there's an asset being dragged and handle drop.
Definition AssetDragDrop.cpp:42
static bool HandleViewportDrop(const DragDropPayload &payload, const ImVec2 &dropPosition)
Handle asset drop into viewport.
Definition AssetDragDrop.cpp:94
static bool CanAcceptDrop(const std::string &targetType)
Check if we can accept a drop at the current location.
Definition AssetDragDrop.cpp:58
Definition AssetsPanel.cpp:7
Contains information about a dragged asset.
Definition AssetDragDrop.h:20
std::filesystem::path assetPath
Definition AssetDragDrop.h:21
std::string assetType
Definition AssetDragDrop.h:22
std::string fileName
Definition AssetDragDrop.h:23
bool isGlobalAsset
Definition AssetDragDrop.h:24
DragDropPayload()=default
DragDropPayload(const std::filesystem::path &path, const std::string &type, bool global)
Definition AssetDragDrop.h:27