2026-03-20 17:08:06 +08:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "Panel.h"
|
|
|
|
|
#include "Core/AssetItem.h"
|
|
|
|
|
|
2026-03-24 20:02:38 +08:00
|
|
|
namespace XCEngine {
|
|
|
|
|
namespace Editor {
|
2026-03-20 17:08:06 +08:00
|
|
|
|
|
|
|
|
class ProjectPanel : public Panel {
|
|
|
|
|
public:
|
|
|
|
|
ProjectPanel();
|
|
|
|
|
void Render() override;
|
|
|
|
|
void Initialize(const std::string& projectPath);
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
void RenderAssetItem(const AssetItemPtr& item, int index);
|
|
|
|
|
void CreateNewFolder(const std::string& name);
|
|
|
|
|
bool HandleDrop(const AssetItemPtr& targetFolder);
|
|
|
|
|
|
|
|
|
|
char m_searchBuffer[256] = "";
|
|
|
|
|
bool m_showCreateFolderPopup = false;
|
|
|
|
|
char m_newFolderName[256] = "NewFolder";
|
|
|
|
|
int m_contextMenuIndex = -1;
|
|
|
|
|
std::string m_draggingPath;
|
|
|
|
|
};
|
|
|
|
|
|
2026-03-24 20:02:38 +08:00
|
|
|
}
|
2026-03-20 17:08:06 +08:00
|
|
|
}
|