From 6ed5f6d943f7efb6383abd95c6015423928e43f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20L=C3=BCbe=C3=9F?= Date: Thu, 26 Jun 2025 18:00:08 +0200 Subject: [PATCH] Added copy filename option to content browser context menu --- .../src/EditWindows/ContentBrowserWindow.bf | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/GlitchyEditor/src/EditWindows/ContentBrowserWindow.bf b/GlitchyEditor/src/EditWindows/ContentBrowserWindow.bf index 288316b..be563ca 100644 --- a/GlitchyEditor/src/EditWindows/ContentBrowserWindow.bf +++ b/GlitchyEditor/src/EditWindows/ContentBrowserWindow.bf @@ -902,15 +902,22 @@ namespace GlitchyEditor.EditWindows ImGui.SetClipboardText(fileOrFolder->Path); } - ImGui.AttachTooltip("Copies the full file path of this asset."); - + ImGui.AttachTooltip(scope $"Copies the full file path of this asset.\n(\"{fileOrFolder->Path}\")"); + + if (ImGui.MenuItem("File name")) + { + ImGui.SetClipboardText(fileOrFolder->Name); + } + + ImGui.AttachTooltip(scope $"Copies the file name of this asset.\n(\"{fileOrFolder->Name}\")"); + if (ImGui.MenuItem("Asset identifier")) { ImGui.SetClipboardText(fileOrFolder->Identifier.FullIdentifier.Ptr); } - ImGui.AttachTooltip("Copies the identifier of this asset."); - + ImGui.AttachTooltip(scope $"Copies the identifier of this asset.\n(\"{fileOrFolder->Identifier.FullIdentifier}\")"); + ImGui.EndMenu(); }