chore: sync workspace state
This commit is contained in:
@@ -15,13 +15,36 @@ public:
|
||||
void Initialize(const std::string& projectPath);
|
||||
|
||||
private:
|
||||
struct AssetDragDropState {
|
||||
bool dragging = false;
|
||||
bool hoveredTarget = false;
|
||||
bool hoveredValidTarget = false;
|
||||
std::string sourcePath;
|
||||
std::string deliveredSourcePath;
|
||||
AssetItemPtr deliveredTarget;
|
||||
|
||||
void Reset() {
|
||||
dragging = false;
|
||||
hoveredTarget = false;
|
||||
hoveredValidTarget = false;
|
||||
sourcePath.clear();
|
||||
deliveredSourcePath.clear();
|
||||
deliveredTarget.reset();
|
||||
}
|
||||
};
|
||||
|
||||
struct AssetItemInteraction {
|
||||
bool clicked = false;
|
||||
bool contextRequested = false;
|
||||
bool openRequested = false;
|
||||
std::string droppedSourcePath;
|
||||
};
|
||||
|
||||
void BeginAssetDragDropFrame();
|
||||
void RegisterFolderDropTarget(IProjectManager& manager, const AssetItemPtr& folder);
|
||||
void FinalizeAssetDragDrop(IProjectManager& manager);
|
||||
void BeginRename(const AssetItemPtr& item);
|
||||
bool CommitRename(IProjectManager& manager);
|
||||
void CancelRename();
|
||||
void RenderToolbar();
|
||||
void RenderFolderTreePane(IProjectManager& manager);
|
||||
void RenderFolderTreeNode(IProjectManager& manager, const AssetItemPtr& folder, const std::string& currentFolderPath);
|
||||
@@ -34,9 +57,10 @@ private:
|
||||
char m_searchBuffer[256] = "";
|
||||
float m_navigationWidth = UI::ProjectNavigationDefaultWidth();
|
||||
UI::TreeViewState m_folderTreeState;
|
||||
UI::TextInputPopupState<256> m_createFolderDialog;
|
||||
UI::InlineTextEditState<std::string, 256> m_renameState;
|
||||
UI::DeferredPopupState m_emptyContextMenu;
|
||||
UI::TargetedPopupState<AssetItemPtr> m_itemContextMenu;
|
||||
AssetDragDropState m_assetDragDropState;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user