From a7b296ae51542e66d723e5e4e048994fe6c5d0ff Mon Sep 17 00:00:00 2001 From: Eric Mellino Date: Thu, 31 Mar 2016 19:56:48 -0700 Subject: [PATCH] Wrappers for RadioButton() and SetNextWindowPos() * ImGui.RadioButton(string, ref int, int); * ImGui.SetNextWindowPos(Vector2, SetCondition); --- src/ImGui.NET/ImGui.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/ImGui.NET/ImGui.cs b/src/ImGui.NET/ImGui.cs index b02ee4d..89beab7 100644 --- a/src/ImGui.NET/ImGui.cs +++ b/src/ImGui.NET/ImGui.cs @@ -137,6 +137,14 @@ namespace ImGuiNET return ImGuiNative.igCheckbox(label, ref value); } + public static unsafe bool RadioButton(string label, ref int target, int buttonValue) + { + int targetCopy = target; + bool result = ImGuiNative.igRadioButton(label, &targetCopy, buttonValue); + target = targetCopy; + return result; + } + public static bool RadioButtonBool(string label, bool active) { return ImGuiNative.igRadioButtonBool(label, active); @@ -348,6 +356,11 @@ namespace ImGuiNET ImGuiNative.igSetNextWindowSize(size, condition); } + public static void SetNextWindowPos(Vector2 position, SetCondition condition) + { + ImGuiNative.igSetNextWindowPos(position, condition); + } + public static void SetNextWindowPosCenter(SetCondition condition) { ImGuiNative.igSetNextWindowPosCenter(condition);