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

@ -1052,14 +1052,14 @@ namespace ImGuiNET
ImGuiNative.igSetTooltip(text); 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) public static bool TreeNode(string label)
@ -1067,6 +1067,11 @@ namespace ImGuiNET
return ImGuiNative.igTreeNode(label); return ImGuiNative.igTreeNode(label);
} }
public static bool TreeNodeEx(string label, TreeNodeFlags flags = 0)
{
return ImGuiNative.igTreeNodeEx(label, flags);
}
public static void TreePop() public static void TreePop()
{ {
ImGuiNative.igTreePop(); ImGuiNative.igTreePop();

@ -455,6 +455,10 @@ namespace ImGuiNET
[return: MarshalAs(UnmanagedType.I1)] [return: MarshalAs(UnmanagedType.I1)]
public static extern bool igTreeNode(string str_label_id); 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)] [DllImport(cimguiLib)]
[return: MarshalAs(UnmanagedType.I1)] [return: MarshalAs(UnmanagedType.I1)]
public static extern bool igTreeNodeStr(string str_id, string fmt); public static extern bool igTreeNodeStr(string str_id, string fmt);
@ -470,7 +474,7 @@ namespace ImGuiNET
[DllImport(cimguiLib)] [DllImport(cimguiLib)]
public static extern void igTreePop(); public static extern void igTreePop();
[DllImport(cimguiLib)] [DllImport(cimguiLib)]
public static extern void igSetNextTreeNodeOpened(bool opened, SetCondition cond); public static extern void igSetNextTreeNodeOpen(bool opened, SetCondition cond);
[DllImport(cimguiLib)] [DllImport(cimguiLib)]
[return: MarshalAs(UnmanagedType.I1)] [return: MarshalAs(UnmanagedType.I1)]
public static extern bool igCollapsingHeader(string label, TreeNodeFlags flags = 0); public static extern bool igCollapsingHeader(string label, TreeNodeFlags flags = 0);

@ -22,7 +22,7 @@ namespace ImGuiNET
/// </summary> /// </summary>
NoTreePushOnOpen = 1 << 3, NoTreePushOnOpen = 1 << 3,
/// <summary> /// <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> /// </summary>
NoAutoOpenOnLog = 1 << 4, NoAutoOpenOnLog = 1 << 4,
/// <summary> /// <summary>

Loading…
Cancel
Save