A couple more wrappers for ImGuiNative methods

internals
Eric Mellino 9 years ago
parent 6ab2d0e573
commit 019c7cefb1
  1. 13
      src/ImGui.NET/ImGui.cs
  2. 4
      src/ImGui.NET/ImGuiNative.cs

@ -121,11 +121,24 @@ namespace ImGuiNET
ImGuiNative.igBeginMenuBar(); ImGuiNative.igBeginMenuBar();
} }
public static void CloseCurrentPopup()
{
ImGuiNative.igCloseCurrentPopup();
}
public static bool BeginWindow(string windowTitle, ref bool opened, Vector2 startingSize, WindowFlags flags) public static bool BeginWindow(string windowTitle, ref bool opened, Vector2 startingSize, WindowFlags flags)
{ {
return ImGuiNative.igBegin2(windowTitle, ref opened, startingSize, 1f, flags); return ImGuiNative.igBegin2(windowTitle, ref opened, startingSize, 1f, flags);
} }
public static unsafe bool Checkbox(string label, ref bool value)
{
bool localVal = value;
bool result = ImGuiNative.igCheckbox(label, &localVal);
value = localVal;
return result;
}
public static void EndMenuBar() public static void EndMenuBar()
{ {
ImGuiNative.igEndMenuBar(); ImGuiNative.igEndMenuBar();

@ -265,7 +265,7 @@ namespace ImGuiNET
public static extern void igTextWrapped(string fmt); public static extern void igTextWrapped(string fmt);
[DllImport(cimguiLib)] [DllImport(cimguiLib)]
public static extern void igTextUnformatted(string text, string text_end); public static extern void igTextUnformatted(byte* text, byte* text_end);
[DllImport(cimguiLib)] [DllImport(cimguiLib)]
public static extern void igLabelText(string label, string fmt); public static extern void igLabelText(string label, string fmt);
@ -480,7 +480,7 @@ namespace ImGuiNET
public static extern void igOpenPopup(string str_id); public static extern void igOpenPopup(string str_id);
[DllImport(cimguiLib)] [DllImport(cimguiLib)]
public static extern bool igBeginPopup(string str_id); public static extern bool igBeginPopup(string str_id);
[DllImport(cimguiLib, CharSet=CharSet.Ansi)] [DllImport(cimguiLib, CharSet = CharSet.Ansi)]
public static extern bool igBeginPopupModal(string name, byte* p_opened, WindowFlags extra_flags); public static extern bool igBeginPopupModal(string name, byte* p_opened, WindowFlags extra_flags);
public static bool igBeginPopupModal(string name, WindowFlags extra_flags) public static bool igBeginPopupModal(string name, WindowFlags extra_flags)

Loading…
Cancel
Save