Merge pull request #16 from dpethes/master

add TreeNodeEx and related fixes
internals
Eric Mellino 8 years ago committed by GitHub
commit 882f9e54a8
  1. 2
      src/ImGui.NET/ColorTarget.cs
  2. 13
      src/ImGui.NET/ImGui.cs
  3. 6
      src/ImGui.NET/ImGuiNative.cs
  4. 2
      src/ImGui.NET/TreeNodeFlags.cs

@ -9,6 +9,7 @@
TextDisabled,
WindowBg,
ChildWindowBg,
PopupBg,
Border,
BorderShadow,
/// <summary>
@ -49,7 +50,6 @@
PlotHistogram,
PlotHistogramHovered,
TextSelectedBg,
TooltipBg,
/// <summary>
/// darken entire screen when a modal window is active
/// </summary>

@ -1052,14 +1052,14 @@ namespace ImGuiNET
ImGuiNative.igSetTooltip(text);
}
public static void SetNextTreeNodeOpened(bool opened)
public static void SetNextTreeNodeOpen(bool opened)
{
ImGuiNative.igSetNextTreeNodeOpened(opened, SetCondition.Always);
ImGuiNative.igSetNextTreeNodeOpen(opened, SetCondition.Always);
}
public static void SetNextTreeNodeOpened(bool opened, SetCondition setCondition)
public static void SetNextTreeNodeOpen(bool opened, SetCondition setCondition)
{
ImGuiNative.igSetNextTreeNodeOpened(opened, setCondition);
ImGuiNative.igSetNextTreeNodeOpen(opened, setCondition);
}
public static bool TreeNode(string label)
@ -1067,6 +1067,11 @@ namespace ImGuiNET
return ImGuiNative.igTreeNode(label);
}
public static bool TreeNodeEx(string label, TreeNodeFlags flags = 0)
{
return ImGuiNative.igTreeNodeEx(label, flags);
}
public static void TreePop()
{
ImGuiNative.igTreePop();

@ -454,6 +454,10 @@ namespace ImGuiNET
[DllImport(cimguiLib)]
[return: MarshalAs(UnmanagedType.I1)]
public static extern bool igTreeNode(string str_label_id);
[DllImport(cimguiLib)]
[return: MarshalAs(UnmanagedType.I1)]
public static extern bool igTreeNodeEx(string label, TreeNodeFlags flags = 0);
[DllImport(cimguiLib)]
[return: MarshalAs(UnmanagedType.I1)]
@ -470,7 +474,7 @@ namespace ImGuiNET
[DllImport(cimguiLib)]
public static extern void igTreePop();
[DllImport(cimguiLib)]
public static extern void igSetNextTreeNodeOpened(bool opened, SetCondition cond);
public static extern void igSetNextTreeNodeOpen(bool opened, SetCondition cond);
[DllImport(cimguiLib)]
[return: MarshalAs(UnmanagedType.I1)]
public static extern bool igCollapsingHeader(string label, TreeNodeFlags flags = 0);

@ -22,7 +22,7 @@ namespace ImGuiNET
/// </summary>
NoTreePushOnOpen = 1 << 3,
/// <summary>
/// Don't do a TreePush() when open (e.g. for CollapsingHeader) = no extra indent nor pushing on ID stack
/// Don't automatically and temporarily open node when Logging is active (by default logging will automatically open tree nodes)
/// </summary>
NoAutoOpenOnLog = 1 << 4,
/// <summary>

Loading…
Cancel
Save