From 595adb717c10885aad8e626fdf70609177e25958 Mon Sep 17 00:00:00 2001 From: Joey Pollack Date: Fri, 24 Jun 2022 20:19:03 -0400 Subject: [PATCH] Added TODO markers for testing asset trash --- docs/tasks/editor.todo | 1 + src/run_modes/editor/panels/asset_browser.cpp | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/docs/tasks/editor.todo b/docs/tasks/editor.todo index a61ef69..15e55d4 100644 --- a/docs/tasks/editor.todo +++ b/docs/tasks/editor.todo @@ -8,6 +8,7 @@ Editor: ✔ Reference raw asset files in a "content" folder@high @done (3/3/2022, 3:15:32 PM) ✔ Platform independant file browsing @done (2/8/2022, 4:05:29 PM) ☐ Test the Asset Trashing system @high + ☐ Add ability to browse and restore trashed assets ☐ Scan script files to make sure they don't overwrite globals ☐ Figure out how to make game asset types integrate with editor asset types @critical diff --git a/src/run_modes/editor/panels/asset_browser.cpp b/src/run_modes/editor/panels/asset_browser.cpp index 1533867..6cd4dbc 100644 --- a/src/run_modes/editor/panels/asset_browser.cpp +++ b/src/run_modes/editor/panels/asset_browser.cpp @@ -205,11 +205,18 @@ namespace editor ImGui::Text("%s", (*iter)->GetFileLocation().stem().string().c_str()); ImGui::EndDragDropSource(); } + if (ImGui::IsItemHovered() && ImGui::IsMouseDoubleClicked(ImGuiMouseButton_Left)) { // TODO: Open relevant editor Logger::Info(Editor::LogCat, "Asset double clicked on. Relevant editor should open!"); } + + if (ImGui::IsItemHovered() && ImGui::IsMouseClicked(ImGuiMouseButton_Right)) + { + + // TODO: CONTEXT MENU FOR ITEMS - Test Removing/Trashing + } } DoContentContextMenu();