mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 21:01:52 +00:00
Asset Drag'n'Drop preview
This commit is contained in:
@@ -490,6 +490,16 @@ namespace GlitchyEditor.EditWindows
|
|||||||
{
|
{
|
||||||
ImGui.SetDragDropPayload(.ContentBrowserItem, entry->Identifier, (uint64)entry->Identifier.Length, .Once);
|
ImGui.SetDragDropPayload(.ContentBrowserItem, entry->Identifier, (uint64)entry->Identifier.Length, .Once);
|
||||||
|
|
||||||
|
float2 dndIconSize = (ImGui.GetFontSize() * 2.0f).XX;
|
||||||
|
|
||||||
|
ImGui.Image(image, (.)dndIconSize);
|
||||||
|
|
||||||
|
ImGui.SameLine();
|
||||||
|
|
||||||
|
ImGui.SetCursorPosY((dndIconSize.X - ImGui.GetFontSize()) / 2);
|
||||||
|
|
||||||
|
ImGui.Text(entry->Identifier);
|
||||||
|
|
||||||
ImGui.EndDragDropSource();
|
ImGui.EndDragDropSource();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user