feat: update editor ui framework and assets
This commit is contained in:
@@ -11,9 +11,16 @@ namespace Editor {
|
||||
|
||||
class ProjectManager : public IProjectManager {
|
||||
public:
|
||||
std::vector<AssetItemPtr>& GetCurrentItems() override;
|
||||
int GetSelectedIndex() const override { return m_selectedIndex; }
|
||||
void SetSelectedIndex(int index) override { m_selectedIndex = index; }
|
||||
const std::vector<AssetItemPtr>& GetCurrentItems() const override;
|
||||
AssetItemPtr GetRootFolder() const override { return m_rootFolder; }
|
||||
AssetItemPtr GetCurrentFolder() const override { return m_path.empty() ? nullptr : m_path.back(); }
|
||||
AssetItemPtr GetSelectedItem() const override;
|
||||
const std::string& GetSelectedItemPath() const override { return m_selectedItemPath; }
|
||||
int GetSelectedIndex() const override;
|
||||
void SetSelectedIndex(int index) override;
|
||||
void SetSelectedItem(const AssetItemPtr& item) override;
|
||||
void ClearSelection() override;
|
||||
int FindCurrentItemIndex(const std::string& fullPath) const override;
|
||||
|
||||
void NavigateToFolder(const AssetItemPtr& folder) override;
|
||||
void NavigateBack() override;
|
||||
@@ -28,21 +35,25 @@ public:
|
||||
void RefreshCurrentFolder() override;
|
||||
|
||||
void CreateFolder(const std::string& name) override;
|
||||
void DeleteItem(int index) override;
|
||||
bool DeleteItem(const std::string& fullPath) override;
|
||||
bool MoveItem(const std::string& sourceFullPath, const std::string& destFolderFullPath) override;
|
||||
|
||||
const std::string& GetProjectPath() const override { return m_projectPath; }
|
||||
|
||||
private:
|
||||
bool BuildPathToFolder(const AssetItemPtr& current, const std::string& fullPath, std::vector<AssetItemPtr>& outPath) const;
|
||||
void RebuildTreePreservingPath();
|
||||
AssetItemPtr FindCurrentItemByPath(const std::string& fullPath) const;
|
||||
void SyncSelection();
|
||||
AssetItemPtr ScanDirectory(const std::wstring& path);
|
||||
AssetItemPtr CreateAssetItem(const std::wstring& path, const std::wstring& nameW, bool isFolder);
|
||||
std::wstring GetCurrentFullPathW() const;
|
||||
|
||||
AssetItemPtr m_rootFolder;
|
||||
std::vector<AssetItemPtr> m_path;
|
||||
int m_selectedIndex = -1;
|
||||
std::string m_selectedItemPath;
|
||||
std::string m_projectPath;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user