Skip to content

Commit

Permalink
Switched PropertyDrawer Fallback to TreeNode from CollapsingHeader
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelsakharov committed Apr 4, 2024
1 parent 64bb2de commit 4421c16
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Prowl.Editor/Drawers/PropertyDrawer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,15 @@ public static bool Draw(string label, ref object value, float width = -1)
var fields = RuntimeUtils.GetSerializableFields(value);
if (fields.Length != 0)
{
if (ImGui.CollapsingHeader(label, ImGuiTreeNodeFlags.None))
if (ImGui.TreeNode(label))
{
ImGui.Indent();
foreach (var field in fields)
changed |= Draw(value, field);
ImGui.Unindent();

changed |= EditorGui.HandleAttributeButtons(value);
ImGui.TreePop();
}
}
}
Expand Down

0 comments on commit 4421c16

Please sign in to comment.