Unify editor divider and splitter chrome

This commit is contained in:
2026-03-27 21:55:14 +08:00
parent 1ea00a1879
commit a51e0f6f88
11 changed files with 866 additions and 76 deletions

View File

@@ -14,9 +14,24 @@ public:
void Initialize(const std::string& projectPath);
private:
void RenderAssetItem(const AssetItemPtr& item, int index);
struct AssetItemInteraction {
bool clicked = false;
bool contextRequested = false;
bool openRequested = false;
std::string droppedSourcePath;
};
void RenderToolbar();
void RenderFolderTreePane(IProjectManager& manager);
void RenderFolderTreeNode(IProjectManager& manager, const AssetItemPtr& folder, const std::string& currentFolderPath);
void RenderBrowserPane(IProjectManager& manager);
void RenderBrowserHeader(IProjectManager& manager);
AssetItemInteraction RenderAssetItem(const AssetItemPtr& item, bool isSelected);
static bool MatchesSearch(const AssetItemPtr& item, const std::string& search);
static bool IsCurrentTreeBranch(const std::string& currentFolderPath, const std::string& folderPath);
char m_searchBuffer[256] = "";
float m_navigationWidth = UI::ProjectNavigationDefaultWidth();
UI::TextInputPopupState<256> m_createFolderDialog;
UI::DeferredPopupState m_emptyContextMenu;
UI::TargetedPopupState<AssetItemPtr> m_itemContextMenu;