Allow dragging and dropping of Entities in editor

+ New Dictionary Helpers
+ Made ImGui Payloads safer
+ Start of Component drag'n'drop
This commit is contained in:
Simon Lübeß
2023-07-24 23:17:00 +02:00
parent b53ed2d8f2
commit 37197cbdf1
19 changed files with 500 additions and 183 deletions
+20
View File
@@ -70,5 +70,25 @@ namespace GlitchyEngine
delete dictionary;
}
}
public static mixin ClearDictionaryAndReleaseKeys(var dictionary)
{
if (dictionary != null)
{
for (var value in dictionary)
value.key?.ReleaseRef();
dictionary.Clear();
}
}
public static mixin ClearDictionaryAndReleaseValues(var dictionary)
{
if (dictionary != null)
{
for (var value in dictionary)
value.value?.ReleaseRef();
dictionary.Clear();
}
}
}
}