Drag drop Texture

This commit is contained in:
Simon Lübeß
2022-08-13 13:47:58 +02:00
parent 8495c6db28
commit bc1f466d18
3 changed files with 30 additions and 3 deletions
@@ -242,7 +242,11 @@ namespace GlitchyEditor.EditWindows
if (ImGui.BeginDragDropSource())
{
String fullpath = scope $"{_currentDirectory}{Path.DirectorySeparatorChar}{entry.Name}";
// TODO: this is dirty
if (fullpath.StartsWith(ContentDirectory, .OrdinalIgnoreCase))
fullpath.Remove(0, ContentDirectory.Length);
ImGui.SetDragDropPayload("CONTENT_BROWSER_ITEM", fullpath.CStr(), (.)fullpath.Length, .Once);
ImGui.EndDragDropSource();