Swap to tree nodes for more compact UX

This commit is contained in:
ackwell 2023-12-21 20:52:14 +11:00
parent 7ef50f7bb4
commit 17e6838422

View file

@ -28,8 +28,9 @@ public partial class ModEditWindow
var ret = false; var ret = false;
for (var i = 0; i < file.Meshes.Length; ++i) if (ImGui.CollapsingHeader($"{file.Meshes.Length} Meshes###meshes"))
ret |= DrawMeshDetails(tab, i, disabled); for (var i = 0; i < file.Meshes.Length; ++i)
ret |= DrawMeshDetails(tab, i, disabled);
ret |= DrawOtherModelDetails(file, disabled); ret |= DrawOtherModelDetails(file, disabled);
@ -38,7 +39,8 @@ public partial class ModEditWindow
private static bool DrawMeshDetails(MdlTab tab, int meshIndex, bool disabled) private static bool DrawMeshDetails(MdlTab tab, int meshIndex, bool disabled)
{ {
if (!ImGui.CollapsingHeader($"Mesh {meshIndex}")) using var meshNode = ImRaii.TreeNode($"Mesh {meshIndex}", ImGuiTreeNodeFlags.DefaultOpen);
if (!meshNode)
return false; return false;
using var id = ImRaii.PushId(meshIndex); using var id = ImRaii.PushId(meshIndex);