Added an overload for MenuItem taking only a label and an enabled state

internals
Eric Mellino 8 years ago
parent fc717612e1
commit 7f1bc8c6f2
  1. 20
      src/ImGui.NET/ImGui.cs

@ -520,13 +520,26 @@ namespace ImGuiNET
ImGuiNative.igSeparator();
}
public static bool MenuItem(string label) => MenuItem(label, string.Empty);
public static bool MenuItem(string label)
{
return MenuItem(label, string.Empty, false, true);
}
public static bool MenuItem(string label, string shortcut)
{
return MenuItem(label, shortcut, false, true);
}
public static bool MenuItem(string label, bool enabled)
{
return MenuItem(label, string.Empty, false, enabled);
}
public static bool MenuItem(string label, string shortcut, bool selected, bool enabled)
{
return ImGuiNative.igMenuItem(label, shortcut, selected, enabled);
}
public static unsafe bool InputText(string label, IntPtr textBuffer, uint bufferSize, InputTextFlags flags, TextEditCallback textEditCallback)
{
return InputText(label, textBuffer, bufferSize, flags, textEditCallback, IntPtr.Zero);
@ -537,11 +550,6 @@ namespace ImGuiNET
return ImGuiNative.igInputText(label, textBuffer, bufferSize, flags, textEditCallback, userData.ToPointer());
}
public static bool MenuItem(string label, string shortcut, bool selected, bool enabled)
{
return ImGuiNative.igMenuItem(label, shortcut, selected, enabled);
}
public static void EndWindow()
{
ImGuiNative.igEnd();

Loading…
Cancel
Save