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:
@@ -228,8 +228,8 @@ class AssetHierarchy
|
||||
{
|
||||
if (File.Exists(fileToMove->AssetFile.AssetConfigPath))
|
||||
{
|
||||
String newConfigPathName = scope .(newPathName);
|
||||
newConfigPathName.Append(AssetFile.ConfigFileExtension);
|
||||
String newConfigPathName = scope .(newPathName);
|
||||
newConfigPathName.Append(AssetFile.ConfigFileExtension);
|
||||
|
||||
if (File.Move(fileToMove->AssetFile.AssetConfigPath, newConfigPathName) case .Err(let error))
|
||||
{
|
||||
|
||||
@@ -490,6 +490,16 @@ namespace GlitchyEditor.EditWindows
|
||||
{
|
||||
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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user