move igBeginPopupModal implementations from ImGuiNative to ImGui

internals
David Pethes 8 years ago
parent e5b1e7c522
commit ec40a94fb6
  1. 18
      src/ImGui.NET/ImGui.cs
  2. 14
      src/ImGui.NET/ImGuiNative.cs

@ -884,22 +884,26 @@ namespace ImGuiNET
public static bool BeginPopupModal(string name)
{
return ImGuiNative.igBeginPopupModal(name, WindowFlags.Default);
return BeginPopupModal(name, WindowFlags.Default);
}
public static bool BeginPopupModal(string name, WindowFlags extraFlags)
public static bool BeginPopupModal(string name, ref bool opened)
{
return ImGuiNative.igBeginPopupModal(name, extraFlags);
return BeginPopupModal(name, ref opened, WindowFlags.Default);
}
public static bool BeginPopupModal(string name, ref bool opened)
public static unsafe bool BeginPopupModal(string name, WindowFlags extra_flags)
{
return ImGuiNative.igBeginPopupModal(name, ref opened, WindowFlags.Default);
return ImGuiNative.igBeginPopupModal(name, null, extra_flags);
}
public static bool BeginPopupModal(string name, ref bool opened, WindowFlags extraFlags)
public static unsafe bool BeginPopupModal(string name, ref bool p_opened, WindowFlags extra_flags)
{
return ImGuiNative.igBeginPopupModal(name, ref opened, extraFlags);
byte value = p_opened ? (byte)1 : (byte)0;
bool result = ImGuiNative.igBeginPopupModal(name, &value, extra_flags);
p_opened = value == 1 ? true : false;
return result;
}
public static bool Selectable(string label, bool isSelected, SelectableFlags flags)

@ -584,20 +584,6 @@ namespace ImGuiNET
[return: MarshalAs(UnmanagedType.I1)]
public static extern bool igBeginPopupModal(string name, byte* p_opened, WindowFlags extra_flags);
public static bool igBeginPopupModal(string name, WindowFlags extra_flags)
{
return igBeginPopupModal(name, null, extra_flags);
}
public static bool igBeginPopupModal(string name, ref bool p_opened, WindowFlags extra_flags)
{
byte value = p_opened ? (byte)1 : (byte)0;
bool result = igBeginPopupModal(name, &value, extra_flags);
p_opened = value == 1 ? true : false;
return result;
}
[DllImport(cimguiLib)]
[return: MarshalAs(UnmanagedType.I1)]
public static extern bool igBeginPopupContextItem(string str_id, int mouse_button);

Loading…
Cancel
Save