Start of material editor

This commit is contained in:
Simon Lübeß
2025-03-03 20:29:35 +01:00
parent 10e8b3c282
commit 6d50208700
12 changed files with 304 additions and 370 deletions
@@ -637,7 +637,10 @@ namespace GlitchyEditor.EditWindows
if (ImGui.IsItemHovered() && ImGui.IsMouseDoubleClicked(.Left))
{
OpenEntry(entry);
if (ImGui.IsKeyDown(.LeftCtrl))
OpenPropertiesWindow(entry);
else
OpenEntry(entry);
}
if (_assetToRename == entry->Path)
@@ -870,12 +873,17 @@ namespace GlitchyEditor.EditWindows
if (ImGui.MenuItem("Properties..."))
{
AssetHandle? assetHandle = fileOrFolder->AssetFile?.AssetConfig?.AssetHandle;
OpenPropertiesWindow(fileOrFolder);
}
}
if (assetHandle != null)
{
new PropertiesWindow(_editor, .Asset(assetHandle.Value));
}
private void OpenPropertiesWindow(TreeNode<AssetNode> fileOrFolder)
{
AssetHandle? assetHandle = fileOrFolder->AssetFile?.AssetConfig?.AssetHandle;
if (assetHandle != null)
{
new PropertiesWindow(_editor, .Asset(assetHandle.Value));
}
}