diff --git a/src/CodeGenerator/Program.cs b/src/CodeGenerator/Program.cs index 5711383..8b89c68 100644 --- a/src/CodeGenerator/Program.cs +++ b/src/CodeGenerator/Program.cs @@ -218,7 +218,7 @@ namespace CodeGenerator }).Where(od => od != null).ToArray(); return new FunctionDefinition(name, overloads); - }).ToArray(); + }).OrderBy(fd => fd.Name).ToArray(); foreach (EnumDefinition ed in enums) { diff --git a/src/ImGui.NET/Generated/GlyphRangesBuilder.gen.cs b/src/ImGui.NET/Generated/GlyphRangesBuilder.gen.cs index b715d6a..404e0be 100644 --- a/src/ImGui.NET/Generated/GlyphRangesBuilder.gen.cs +++ b/src/ImGui.NET/Generated/GlyphRangesBuilder.gen.cs @@ -18,9 +18,14 @@ namespace ImGuiNET public static implicit operator GlyphRangesBuilder* (GlyphRangesBuilderPtr wrappedPtr) => wrappedPtr.NativePtr; public static implicit operator GlyphRangesBuilderPtr(IntPtr nativePtr) => new GlyphRangesBuilderPtr(nativePtr); public ImVector UsedChars => new ImVector(NativePtr->UsedChars); - public void SetBit(int n) + public void AddChar(ushort c) { - ImGuiNative.GlyphRangesBuilder_SetBit(NativePtr, n); + ImGuiNative.GlyphRangesBuilder_AddChar(NativePtr, c); + } + public void AddRanges(IntPtr ranges) + { + ushort* native_ranges = (ushort*)ranges.ToPointer(); + ImGuiNative.GlyphRangesBuilder_AddRanges(NativePtr, native_ranges); } public void AddText(string text) { @@ -40,11 +45,6 @@ namespace ImGuiNET byte* native_text_end = null; ImGuiNative.GlyphRangesBuilder_AddText(NativePtr, native_text, native_text_end); } - public void AddRanges(IntPtr ranges) - { - ushort* native_ranges = (ushort*)ranges.ToPointer(); - ImGuiNative.GlyphRangesBuilder_AddRanges(NativePtr, native_ranges); - } public void BuildRanges(out ImVector out_ranges) { fixed (ImVector* native_out_ranges = &out_ranges) @@ -57,9 +57,9 @@ namespace ImGuiNET byte ret = ImGuiNative.GlyphRangesBuilder_GetBit(NativePtr, n); return ret != 0; } - public void AddChar(ushort c) + public void SetBit(int n) { - ImGuiNative.GlyphRangesBuilder_AddChar(NativePtr, c); + ImGuiNative.GlyphRangesBuilder_SetBit(NativePtr, n); } } } diff --git a/src/ImGui.NET/Generated/ImColor.gen.cs b/src/ImGui.NET/Generated/ImColor.gen.cs index 024e1bd..2f10795 100644 --- a/src/ImGui.NET/Generated/ImColor.gen.cs +++ b/src/ImGui.NET/Generated/ImColor.gen.cs @@ -18,15 +18,6 @@ namespace ImGuiNET public static implicit operator ImColor* (ImColorPtr wrappedPtr) => wrappedPtr.NativePtr; public static implicit operator ImColorPtr(IntPtr nativePtr) => new ImColorPtr(nativePtr); public ref Vector4 Value => ref Unsafe.AsRef(&NativePtr->Value); - public void SetHSV(float h, float s, float v) - { - float a = 1.0f; - ImGuiNative.ImColor_SetHSV(NativePtr, h, s, v, a); - } - public void SetHSV(float h, float s, float v, float a) - { - ImGuiNative.ImColor_SetHSV(NativePtr, h, s, v, a); - } public ImColor HSV(float h, float s, float v) { float a = 1.0f; @@ -38,5 +29,14 @@ namespace ImGuiNET ImColor ret = ImGuiNative.ImColor_HSV(NativePtr, h, s, v, a); return ret; } + public void SetHSV(float h, float s, float v) + { + float a = 1.0f; + ImGuiNative.ImColor_SetHSV(NativePtr, h, s, v, a); + } + public void SetHSV(float h, float s, float v, float a) + { + ImGuiNative.ImColor_SetHSV(NativePtr, h, s, v, a); + } } } diff --git a/src/ImGui.NET/Generated/ImDrawData.gen.cs b/src/ImGui.NET/Generated/ImDrawData.gen.cs index 94a9488..2275daf 100644 --- a/src/ImGui.NET/Generated/ImDrawData.gen.cs +++ b/src/ImGui.NET/Generated/ImDrawData.gen.cs @@ -30,17 +30,17 @@ namespace ImGuiNET public ref int TotalVtxCount => ref Unsafe.AsRef(&NativePtr->TotalVtxCount); public ref Vector2 DisplayPos => ref Unsafe.AsRef(&NativePtr->DisplayPos); public ref Vector2 DisplaySize => ref Unsafe.AsRef(&NativePtr->DisplaySize); - public void ScaleClipRects(Vector2 sc) + public void Clear() { - ImGuiNative.ImDrawData_ScaleClipRects(NativePtr, sc); + ImGuiNative.ImDrawData_Clear(NativePtr); } public void DeIndexAllBuffers() { ImGuiNative.ImDrawData_DeIndexAllBuffers(NativePtr); } - public void Clear() + public void ScaleClipRects(Vector2 sc) { - ImGuiNative.ImDrawData_Clear(NativePtr); + ImGuiNative.ImDrawData_ScaleClipRects(NativePtr, sc); } } } diff --git a/src/ImGui.NET/Generated/ImDrawList.gen.cs b/src/ImGui.NET/Generated/ImDrawList.gen.cs index 72686f6..7909fc8 100644 --- a/src/ImGui.NET/Generated/ImDrawList.gen.cs +++ b/src/ImGui.NET/Generated/ImDrawList.gen.cs @@ -46,114 +46,154 @@ namespace ImGuiNET public ref int _ChannelsCurrent => ref Unsafe.AsRef(&NativePtr->_ChannelsCurrent); public ref int _ChannelsCount => ref Unsafe.AsRef(&NativePtr->_ChannelsCount); public ImPtrVector _Channels => new ImPtrVector(NativePtr->_Channels, Unsafe.SizeOf()); - public void ChannelsSetCurrent(int channel_index) + public void AddBezierCurve(Vector2 pos0, Vector2 cp0, Vector2 cp1, Vector2 pos1, uint col, float thickness) { - ImGuiNative.ImDrawList_ChannelsSetCurrent(NativePtr, channel_index); + int num_segments = 0; + ImGuiNative.ImDrawList_AddBezierCurve(NativePtr, pos0, cp0, cp1, pos1, col, thickness, num_segments); } - public void ChannelsSplit(int channels_count) + public void AddBezierCurve(Vector2 pos0, Vector2 cp0, Vector2 cp1, Vector2 pos1, uint col, float thickness, int num_segments) { - ImGuiNative.ImDrawList_ChannelsSplit(NativePtr, channels_count); + ImGuiNative.ImDrawList_AddBezierCurve(NativePtr, pos0, cp0, cp1, pos1, col, thickness, num_segments); } - public void AddQuad(Vector2 a, Vector2 b, Vector2 c, Vector2 d, uint col) + public void AddCallback(IntPtr callback, IntPtr callback_data) { + void* native_callback_data = (void*)callback_data.ToPointer(); + ImGuiNative.ImDrawList_AddCallback(NativePtr, callback, native_callback_data); + } + public void AddCircle(Vector2 centre, float radius, uint col) + { + int num_segments = 12; float thickness = 1.0f; - ImGuiNative.ImDrawList_AddQuad(NativePtr, a, b, c, d, col, thickness); + ImGuiNative.ImDrawList_AddCircle(NativePtr, centre, radius, col, num_segments, thickness); } - public void AddQuad(Vector2 a, Vector2 b, Vector2 c, Vector2 d, uint col, float thickness) + public void AddCircle(Vector2 centre, float radius, uint col, int num_segments) { - ImGuiNative.ImDrawList_AddQuad(NativePtr, a, b, c, d, col, thickness); + float thickness = 1.0f; + ImGuiNative.ImDrawList_AddCircle(NativePtr, centre, radius, col, num_segments, thickness); } - public void AddPolyline(ref Vector2 points, int num_points, uint col, bool closed, float thickness) + public void AddCircle(Vector2 centre, float radius, uint col, int num_segments, float thickness) + { + ImGuiNative.ImDrawList_AddCircle(NativePtr, centre, radius, col, num_segments, thickness); + } + public void AddCircleFilled(Vector2 centre, float radius, uint col) + { + int num_segments = 12; + ImGuiNative.ImDrawList_AddCircleFilled(NativePtr, centre, radius, col, num_segments); + } + public void AddCircleFilled(Vector2 centre, float radius, uint col, int num_segments) + { + ImGuiNative.ImDrawList_AddCircleFilled(NativePtr, centre, radius, col, num_segments); + } + public void AddConvexPolyFilled(ref Vector2 points, int num_points, uint col) { - byte native_closed = closed ? (byte)1 : (byte)0; fixed (Vector2* native_points = &points) { - ImGuiNative.ImDrawList_AddPolyline(NativePtr, native_points, num_points, col, native_closed, thickness); + ImGuiNative.ImDrawList_AddConvexPolyFilled(NativePtr, native_points, num_points, col); } } - public void PopClipRect() + public void AddDrawCmd() { - ImGuiNative.ImDrawList_PopClipRect(NativePtr); + ImGuiNative.ImDrawList_AddDrawCmd(NativePtr); } - public void PushClipRect(Vector2 clip_rect_min, Vector2 clip_rect_max) + public void AddImage(IntPtr user_texture_id, Vector2 a, Vector2 b) { - byte intersect_with_current_clip_rect = 0; - ImGuiNative.ImDrawList_PushClipRect(NativePtr, clip_rect_min, clip_rect_max, intersect_with_current_clip_rect); + Vector2 uv_a = new Vector2(); + Vector2 uv_b = new Vector2(1, 1); + uint col = 0xFFFFFFFF; + ImGuiNative.ImDrawList_AddImage(NativePtr, user_texture_id, a, b, uv_a, uv_b, col); } - public void PushClipRect(Vector2 clip_rect_min, Vector2 clip_rect_max, bool intersect_with_current_clip_rect) + public void AddImage(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 uv_a) { - byte native_intersect_with_current_clip_rect = intersect_with_current_clip_rect ? (byte)1 : (byte)0; - ImGuiNative.ImDrawList_PushClipRect(NativePtr, clip_rect_min, clip_rect_max, native_intersect_with_current_clip_rect); + Vector2 uv_b = new Vector2(1, 1); + uint col = 0xFFFFFFFF; + ImGuiNative.ImDrawList_AddImage(NativePtr, user_texture_id, a, b, uv_a, uv_b, col); } - public void PathBezierCurveTo(Vector2 p1, Vector2 p2, Vector2 p3) + public void AddImage(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 uv_a, Vector2 uv_b) { - int num_segments = 0; - ImGuiNative.ImDrawList_PathBezierCurveTo(NativePtr, p1, p2, p3, num_segments); + uint col = 0xFFFFFFFF; + ImGuiNative.ImDrawList_AddImage(NativePtr, user_texture_id, a, b, uv_a, uv_b, col); } - public void PathBezierCurveTo(Vector2 p1, Vector2 p2, Vector2 p3, int num_segments) + public void AddImage(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 uv_a, Vector2 uv_b, uint col) { - ImGuiNative.ImDrawList_PathBezierCurveTo(NativePtr, p1, p2, p3, num_segments); + ImGuiNative.ImDrawList_AddImage(NativePtr, user_texture_id, a, b, uv_a, uv_b, col); } - public void UpdateTextureID() + public void AddImageQuad(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 c, Vector2 d) { - ImGuiNative.ImDrawList_UpdateTextureID(NativePtr); + Vector2 uv_a = new Vector2(); + Vector2 uv_b = new Vector2(1, 0); + Vector2 uv_c = new Vector2(1, 1); + Vector2 uv_d = new Vector2(0, 1); + uint col = 0xFFFFFFFF; + ImGuiNative.ImDrawList_AddImageQuad(NativePtr, user_texture_id, a, b, c, d, uv_a, uv_b, uv_c, uv_d, col); } - public void Clear() + public void AddImageQuad(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 c, Vector2 d, Vector2 uv_a) { - ImGuiNative.ImDrawList_Clear(NativePtr); + Vector2 uv_b = new Vector2(1, 0); + Vector2 uv_c = new Vector2(1, 1); + Vector2 uv_d = new Vector2(0, 1); + uint col = 0xFFFFFFFF; + ImGuiNative.ImDrawList_AddImageQuad(NativePtr, user_texture_id, a, b, c, d, uv_a, uv_b, uv_c, uv_d, col); } - public void AddBezierCurve(Vector2 pos0, Vector2 cp0, Vector2 cp1, Vector2 pos1, uint col, float thickness) + public void AddImageQuad(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 c, Vector2 d, Vector2 uv_a, Vector2 uv_b) { - int num_segments = 0; - ImGuiNative.ImDrawList_AddBezierCurve(NativePtr, pos0, cp0, cp1, pos1, col, thickness, num_segments); + Vector2 uv_c = new Vector2(1, 1); + Vector2 uv_d = new Vector2(0, 1); + uint col = 0xFFFFFFFF; + ImGuiNative.ImDrawList_AddImageQuad(NativePtr, user_texture_id, a, b, c, d, uv_a, uv_b, uv_c, uv_d, col); } - public void AddBezierCurve(Vector2 pos0, Vector2 cp0, Vector2 cp1, Vector2 pos1, uint col, float thickness, int num_segments) + public void AddImageQuad(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 c, Vector2 d, Vector2 uv_a, Vector2 uv_b, Vector2 uv_c) { - ImGuiNative.ImDrawList_AddBezierCurve(NativePtr, pos0, cp0, cp1, pos1, col, thickness, num_segments); + Vector2 uv_d = new Vector2(0, 1); + uint col = 0xFFFFFFFF; + ImGuiNative.ImDrawList_AddImageQuad(NativePtr, user_texture_id, a, b, c, d, uv_a, uv_b, uv_c, uv_d, col); } - public void PushTextureID(IntPtr texture_id) + public void AddImageQuad(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 c, Vector2 d, Vector2 uv_a, Vector2 uv_b, Vector2 uv_c, Vector2 uv_d) { - ImGuiNative.ImDrawList_PushTextureID(NativePtr, texture_id); + uint col = 0xFFFFFFFF; + ImGuiNative.ImDrawList_AddImageQuad(NativePtr, user_texture_id, a, b, c, d, uv_a, uv_b, uv_c, uv_d, col); } - public void AddRectFilled(Vector2 a, Vector2 b, uint col) + public void AddImageQuad(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 c, Vector2 d, Vector2 uv_a, Vector2 uv_b, Vector2 uv_c, Vector2 uv_d, uint col) { - float rounding = 0.0f; - int rounding_corners_flags = (int)ImDrawCornerFlags.All; - ImGuiNative.ImDrawList_AddRectFilled(NativePtr, a, b, col, rounding, rounding_corners_flags); + ImGuiNative.ImDrawList_AddImageQuad(NativePtr, user_texture_id, a, b, c, d, uv_a, uv_b, uv_c, uv_d, col); } - public void AddRectFilled(Vector2 a, Vector2 b, uint col, float rounding) + public void AddImageRounded(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 uv_a, Vector2 uv_b, uint col, float rounding) { - int rounding_corners_flags = (int)ImDrawCornerFlags.All; - ImGuiNative.ImDrawList_AddRectFilled(NativePtr, a, b, col, rounding, rounding_corners_flags); + int rounding_corners = (int)ImDrawCornerFlags.All; + ImGuiNative.ImDrawList_AddImageRounded(NativePtr, user_texture_id, a, b, uv_a, uv_b, col, rounding, rounding_corners); } - public void AddRectFilled(Vector2 a, Vector2 b, uint col, float rounding, int rounding_corners_flags) + public void AddImageRounded(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 uv_a, Vector2 uv_b, uint col, float rounding, int rounding_corners) { - ImGuiNative.ImDrawList_AddRectFilled(NativePtr, a, b, col, rounding, rounding_corners_flags); + ImGuiNative.ImDrawList_AddImageRounded(NativePtr, user_texture_id, a, b, uv_a, uv_b, col, rounding, rounding_corners); } - public void AddDrawCmd() + public void AddLine(Vector2 a, Vector2 b, uint col) { - ImGuiNative.ImDrawList_AddDrawCmd(NativePtr); + float thickness = 1.0f; + ImGuiNative.ImDrawList_AddLine(NativePtr, a, b, col, thickness); } - public void UpdateClipRect() + public void AddLine(Vector2 a, Vector2 b, uint col, float thickness) { - ImGuiNative.ImDrawList_UpdateClipRect(NativePtr); + ImGuiNative.ImDrawList_AddLine(NativePtr, a, b, col, thickness); } - public void PrimVtx(Vector2 pos, Vector2 uv, uint col) + public void AddPolyline(ref Vector2 points, int num_points, uint col, bool closed, float thickness) { - ImGuiNative.ImDrawList_PrimVtx(NativePtr, pos, uv, col); + byte native_closed = closed ? (byte)1 : (byte)0; + fixed (Vector2* native_points = &points) + { + ImGuiNative.ImDrawList_AddPolyline(NativePtr, native_points, num_points, col, native_closed, thickness); + } } - public void PrimRect(Vector2 a, Vector2 b, uint col) + public void AddQuad(Vector2 a, Vector2 b, Vector2 c, Vector2 d, uint col) { - ImGuiNative.ImDrawList_PrimRect(NativePtr, a, b, col); + float thickness = 1.0f; + ImGuiNative.ImDrawList_AddQuad(NativePtr, a, b, c, d, col, thickness); } - public void ClearFreeMemory() + public void AddQuad(Vector2 a, Vector2 b, Vector2 c, Vector2 d, uint col, float thickness) { - ImGuiNative.ImDrawList_ClearFreeMemory(NativePtr); + ImGuiNative.ImDrawList_AddQuad(NativePtr, a, b, c, d, col, thickness); } - public ImDrawListPtr CloneOutput() + public void AddQuadFilled(Vector2 a, Vector2 b, Vector2 c, Vector2 d, uint col) { - ImDrawList* ret = ImGuiNative.ImDrawList_CloneOutput(NativePtr); - return new ImDrawListPtr(ret); + ImGuiNative.ImDrawList_AddQuadFilled(NativePtr, a, b, c, d, col); } public void AddRect(Vector2 a, Vector2 b, uint col) { @@ -177,238 +217,198 @@ namespace ImGuiNET { ImGuiNative.ImDrawList_AddRect(NativePtr, a, b, col, rounding, rounding_corners_flags, thickness); } - public void AddCallback(IntPtr callback, IntPtr callback_data) - { - void* native_callback_data = (void*)callback_data.ToPointer(); - ImGuiNative.ImDrawList_AddCallback(NativePtr, callback, native_callback_data); - } - public void PathRect(Vector2 rect_min, Vector2 rect_max) + public void AddRectFilled(Vector2 a, Vector2 b, uint col) { float rounding = 0.0f; int rounding_corners_flags = (int)ImDrawCornerFlags.All; - ImGuiNative.ImDrawList_PathRect(NativePtr, rect_min, rect_max, rounding, rounding_corners_flags); + ImGuiNative.ImDrawList_AddRectFilled(NativePtr, a, b, col, rounding, rounding_corners_flags); } - public void PathRect(Vector2 rect_min, Vector2 rect_max, float rounding) + public void AddRectFilled(Vector2 a, Vector2 b, uint col, float rounding) { int rounding_corners_flags = (int)ImDrawCornerFlags.All; - ImGuiNative.ImDrawList_PathRect(NativePtr, rect_min, rect_max, rounding, rounding_corners_flags); + ImGuiNative.ImDrawList_AddRectFilled(NativePtr, a, b, col, rounding, rounding_corners_flags); } - public void PathRect(Vector2 rect_min, Vector2 rect_max, float rounding, int rounding_corners_flags) + public void AddRectFilled(Vector2 a, Vector2 b, uint col, float rounding, int rounding_corners_flags) { - ImGuiNative.ImDrawList_PathRect(NativePtr, rect_min, rect_max, rounding, rounding_corners_flags); + ImGuiNative.ImDrawList_AddRectFilled(NativePtr, a, b, col, rounding, rounding_corners_flags); } - public void PathArcToFast(Vector2 centre, float radius, int a_min_of_12, int a_max_of_12) + public void AddRectFilledMultiColor(Vector2 a, Vector2 b, uint col_upr_left, uint col_upr_right, uint col_bot_right, uint col_bot_left) { - ImGuiNative.ImDrawList_PathArcToFast(NativePtr, centre, radius, a_min_of_12, a_max_of_12); + ImGuiNative.ImDrawList_AddRectFilledMultiColor(NativePtr, a, b, col_upr_left, col_upr_right, col_bot_right, col_bot_left); } - public void PathStroke(uint col, bool closed) + public void AddTriangle(Vector2 a, Vector2 b, Vector2 c, uint col) { - byte native_closed = closed ? (byte)1 : (byte)0; float thickness = 1.0f; - ImGuiNative.ImDrawList_PathStroke(NativePtr, col, native_closed, thickness); + ImGuiNative.ImDrawList_AddTriangle(NativePtr, a, b, c, col, thickness); } - public void PathStroke(uint col, bool closed, float thickness) + public void AddTriangle(Vector2 a, Vector2 b, Vector2 c, uint col, float thickness) { - byte native_closed = closed ? (byte)1 : (byte)0; - ImGuiNative.ImDrawList_PathStroke(NativePtr, col, native_closed, thickness); + ImGuiNative.ImDrawList_AddTriangle(NativePtr, a, b, c, col, thickness); } - public void PathFillConvex(uint col) + public void AddTriangleFilled(Vector2 a, Vector2 b, Vector2 c, uint col) { - ImGuiNative.ImDrawList_PathFillConvex(NativePtr, col); + ImGuiNative.ImDrawList_AddTriangleFilled(NativePtr, a, b, c, col); } - public void PathLineToMergeDuplicate(Vector2 pos) + public void ChannelsMerge() { - ImGuiNative.ImDrawList_PathLineToMergeDuplicate(NativePtr, pos); + ImGuiNative.ImDrawList_ChannelsMerge(NativePtr); } - public void PathArcTo(Vector2 centre, float radius, float a_min, float a_max) + public void ChannelsSetCurrent(int channel_index) { - int num_segments = 10; - ImGuiNative.ImDrawList_PathArcTo(NativePtr, centre, radius, a_min, a_max, num_segments); + ImGuiNative.ImDrawList_ChannelsSetCurrent(NativePtr, channel_index); } - public void PathArcTo(Vector2 centre, float radius, float a_min, float a_max, int num_segments) + public void ChannelsSplit(int channels_count) { - ImGuiNative.ImDrawList_PathArcTo(NativePtr, centre, radius, a_min, a_max, num_segments); + ImGuiNative.ImDrawList_ChannelsSplit(NativePtr, channels_count); } - public void AddConvexPolyFilled(ref Vector2 points, int num_points, uint col) + public void Clear() { - fixed (Vector2* native_points = &points) - { - ImGuiNative.ImDrawList_AddConvexPolyFilled(NativePtr, native_points, num_points, col); - } + ImGuiNative.ImDrawList_Clear(NativePtr); } - public void AddImageQuad(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 c, Vector2 d) + public void ClearFreeMemory() { - Vector2 uv_a = new Vector2(); - Vector2 uv_b = new Vector2(1, 0); - Vector2 uv_c = new Vector2(1, 1); - Vector2 uv_d = new Vector2(0, 1); - uint col = 0xFFFFFFFF; - ImGuiNative.ImDrawList_AddImageQuad(NativePtr, user_texture_id, a, b, c, d, uv_a, uv_b, uv_c, uv_d, col); + ImGuiNative.ImDrawList_ClearFreeMemory(NativePtr); } - public void AddImageQuad(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 c, Vector2 d, Vector2 uv_a) + public ImDrawListPtr CloneOutput() { - Vector2 uv_b = new Vector2(1, 0); - Vector2 uv_c = new Vector2(1, 1); - Vector2 uv_d = new Vector2(0, 1); - uint col = 0xFFFFFFFF; - ImGuiNative.ImDrawList_AddImageQuad(NativePtr, user_texture_id, a, b, c, d, uv_a, uv_b, uv_c, uv_d, col); + ImDrawList* ret = ImGuiNative.ImDrawList_CloneOutput(NativePtr); + return new ImDrawListPtr(ret); } - public void AddImageQuad(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 c, Vector2 d, Vector2 uv_a, Vector2 uv_b) + public Vector2 GetClipRectMax() { - Vector2 uv_c = new Vector2(1, 1); - Vector2 uv_d = new Vector2(0, 1); - uint col = 0xFFFFFFFF; - ImGuiNative.ImDrawList_AddImageQuad(NativePtr, user_texture_id, a, b, c, d, uv_a, uv_b, uv_c, uv_d, col); + Vector2 ret = ImGuiNative.ImDrawList_GetClipRectMax(NativePtr); + return ret; } - public void AddImageQuad(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 c, Vector2 d, Vector2 uv_a, Vector2 uv_b, Vector2 uv_c) + public Vector2 GetClipRectMin() { - Vector2 uv_d = new Vector2(0, 1); - uint col = 0xFFFFFFFF; - ImGuiNative.ImDrawList_AddImageQuad(NativePtr, user_texture_id, a, b, c, d, uv_a, uv_b, uv_c, uv_d, col); + Vector2 ret = ImGuiNative.ImDrawList_GetClipRectMin(NativePtr); + return ret; } - public void AddImageQuad(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 c, Vector2 d, Vector2 uv_a, Vector2 uv_b, Vector2 uv_c, Vector2 uv_d) + public void PathArcTo(Vector2 centre, float radius, float a_min, float a_max) { - uint col = 0xFFFFFFFF; - ImGuiNative.ImDrawList_AddImageQuad(NativePtr, user_texture_id, a, b, c, d, uv_a, uv_b, uv_c, uv_d, col); + int num_segments = 10; + ImGuiNative.ImDrawList_PathArcTo(NativePtr, centre, radius, a_min, a_max, num_segments); } - public void AddImageQuad(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 c, Vector2 d, Vector2 uv_a, Vector2 uv_b, Vector2 uv_c, Vector2 uv_d, uint col) + public void PathArcTo(Vector2 centre, float radius, float a_min, float a_max, int num_segments) { - ImGuiNative.ImDrawList_AddImageQuad(NativePtr, user_texture_id, a, b, c, d, uv_a, uv_b, uv_c, uv_d, col); + ImGuiNative.ImDrawList_PathArcTo(NativePtr, centre, radius, a_min, a_max, num_segments); } - public void AddImage(IntPtr user_texture_id, Vector2 a, Vector2 b) + public void PathArcToFast(Vector2 centre, float radius, int a_min_of_12, int a_max_of_12) { - Vector2 uv_a = new Vector2(); - Vector2 uv_b = new Vector2(1, 1); - uint col = 0xFFFFFFFF; - ImGuiNative.ImDrawList_AddImage(NativePtr, user_texture_id, a, b, uv_a, uv_b, col); + ImGuiNative.ImDrawList_PathArcToFast(NativePtr, centre, radius, a_min_of_12, a_max_of_12); } - public void AddImage(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 uv_a) + public void PathBezierCurveTo(Vector2 p1, Vector2 p2, Vector2 p3) { - Vector2 uv_b = new Vector2(1, 1); - uint col = 0xFFFFFFFF; - ImGuiNative.ImDrawList_AddImage(NativePtr, user_texture_id, a, b, uv_a, uv_b, col); + int num_segments = 0; + ImGuiNative.ImDrawList_PathBezierCurveTo(NativePtr, p1, p2, p3, num_segments); } - public void AddImage(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 uv_a, Vector2 uv_b) + public void PathBezierCurveTo(Vector2 p1, Vector2 p2, Vector2 p3, int num_segments) { - uint col = 0xFFFFFFFF; - ImGuiNative.ImDrawList_AddImage(NativePtr, user_texture_id, a, b, uv_a, uv_b, col); + ImGuiNative.ImDrawList_PathBezierCurveTo(NativePtr, p1, p2, p3, num_segments); } - public void AddImage(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 uv_a, Vector2 uv_b, uint col) + public void PathClear() { - ImGuiNative.ImDrawList_AddImage(NativePtr, user_texture_id, a, b, uv_a, uv_b, col); + ImGuiNative.ImDrawList_PathClear(NativePtr); } - public void AddCircleFilled(Vector2 centre, float radius, uint col) + public void PathFillConvex(uint col) { - int num_segments = 12; - ImGuiNative.ImDrawList_AddCircleFilled(NativePtr, centre, radius, col, num_segments); + ImGuiNative.ImDrawList_PathFillConvex(NativePtr, col); } - public void AddCircleFilled(Vector2 centre, float radius, uint col, int num_segments) + public void PathLineTo(Vector2 pos) { - ImGuiNative.ImDrawList_AddCircleFilled(NativePtr, centre, radius, col, num_segments); + ImGuiNative.ImDrawList_PathLineTo(NativePtr, pos); } - public void AddCircle(Vector2 centre, float radius, uint col) + public void PathLineToMergeDuplicate(Vector2 pos) { - int num_segments = 12; - float thickness = 1.0f; - ImGuiNative.ImDrawList_AddCircle(NativePtr, centre, radius, col, num_segments, thickness); + ImGuiNative.ImDrawList_PathLineToMergeDuplicate(NativePtr, pos); } - public void AddCircle(Vector2 centre, float radius, uint col, int num_segments) + public void PathRect(Vector2 rect_min, Vector2 rect_max) { - float thickness = 1.0f; - ImGuiNative.ImDrawList_AddCircle(NativePtr, centre, radius, col, num_segments, thickness); + float rounding = 0.0f; + int rounding_corners_flags = (int)ImDrawCornerFlags.All; + ImGuiNative.ImDrawList_PathRect(NativePtr, rect_min, rect_max, rounding, rounding_corners_flags); } - public void AddCircle(Vector2 centre, float radius, uint col, int num_segments, float thickness) + public void PathRect(Vector2 rect_min, Vector2 rect_max, float rounding) { - ImGuiNative.ImDrawList_AddCircle(NativePtr, centre, radius, col, num_segments, thickness); + int rounding_corners_flags = (int)ImDrawCornerFlags.All; + ImGuiNative.ImDrawList_PathRect(NativePtr, rect_min, rect_max, rounding, rounding_corners_flags); } - public void AddTriangleFilled(Vector2 a, Vector2 b, Vector2 c, uint col) + public void PathRect(Vector2 rect_min, Vector2 rect_max, float rounding, int rounding_corners_flags) { - ImGuiNative.ImDrawList_AddTriangleFilled(NativePtr, a, b, c, col); + ImGuiNative.ImDrawList_PathRect(NativePtr, rect_min, rect_max, rounding, rounding_corners_flags); } - public void AddTriangle(Vector2 a, Vector2 b, Vector2 c, uint col) + public void PathStroke(uint col, bool closed) { + byte native_closed = closed ? (byte)1 : (byte)0; float thickness = 1.0f; - ImGuiNative.ImDrawList_AddTriangle(NativePtr, a, b, c, col, thickness); - } - public void AddTriangle(Vector2 a, Vector2 b, Vector2 c, uint col, float thickness) - { - ImGuiNative.ImDrawList_AddTriangle(NativePtr, a, b, c, col, thickness); - } - public void AddQuadFilled(Vector2 a, Vector2 b, Vector2 c, Vector2 d, uint col) - { - ImGuiNative.ImDrawList_AddQuadFilled(NativePtr, a, b, c, d, col); - } - public void PrimReserve(int idx_count, int vtx_count) - { - ImGuiNative.ImDrawList_PrimReserve(NativePtr, idx_count, vtx_count); + ImGuiNative.ImDrawList_PathStroke(NativePtr, col, native_closed, thickness); } - public void AddRectFilledMultiColor(Vector2 a, Vector2 b, uint col_upr_left, uint col_upr_right, uint col_bot_right, uint col_bot_left) + public void PathStroke(uint col, bool closed, float thickness) { - ImGuiNative.ImDrawList_AddRectFilledMultiColor(NativePtr, a, b, col_upr_left, col_upr_right, col_bot_right, col_bot_left); + byte native_closed = closed ? (byte)1 : (byte)0; + ImGuiNative.ImDrawList_PathStroke(NativePtr, col, native_closed, thickness); } - public void AddLine(Vector2 a, Vector2 b, uint col) + public void PopClipRect() { - float thickness = 1.0f; - ImGuiNative.ImDrawList_AddLine(NativePtr, a, b, col, thickness); + ImGuiNative.ImDrawList_PopClipRect(NativePtr); } - public void AddLine(Vector2 a, Vector2 b, uint col, float thickness) + public void PopTextureID() { - ImGuiNative.ImDrawList_AddLine(NativePtr, a, b, col, thickness); + ImGuiNative.ImDrawList_PopTextureID(NativePtr); } - public Vector2 GetClipRectMin() + public void PrimQuadUV(Vector2 a, Vector2 b, Vector2 c, Vector2 d, Vector2 uv_a, Vector2 uv_b, Vector2 uv_c, Vector2 uv_d, uint col) { - Vector2 ret = ImGuiNative.ImDrawList_GetClipRectMin(NativePtr); - return ret; + ImGuiNative.ImDrawList_PrimQuadUV(NativePtr, a, b, c, d, uv_a, uv_b, uv_c, uv_d, col); } - public void PopTextureID() + public void PrimRect(Vector2 a, Vector2 b, uint col) { - ImGuiNative.ImDrawList_PopTextureID(NativePtr); + ImGuiNative.ImDrawList_PrimRect(NativePtr, a, b, col); } - public void PrimWriteVtx(Vector2 pos, Vector2 uv, uint col) + public void PrimRectUV(Vector2 a, Vector2 b, Vector2 uv_a, Vector2 uv_b, uint col) { - ImGuiNative.ImDrawList_PrimWriteVtx(NativePtr, pos, uv, col); + ImGuiNative.ImDrawList_PrimRectUV(NativePtr, a, b, uv_a, uv_b, col); } - public Vector2 GetClipRectMax() + public void PrimReserve(int idx_count, int vtx_count) { - Vector2 ret = ImGuiNative.ImDrawList_GetClipRectMax(NativePtr); - return ret; + ImGuiNative.ImDrawList_PrimReserve(NativePtr, idx_count, vtx_count); } - public void AddImageRounded(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 uv_a, Vector2 uv_b, uint col, float rounding) + public void PrimVtx(Vector2 pos, Vector2 uv, uint col) { - int rounding_corners = (int)ImDrawCornerFlags.All; - ImGuiNative.ImDrawList_AddImageRounded(NativePtr, user_texture_id, a, b, uv_a, uv_b, col, rounding, rounding_corners); + ImGuiNative.ImDrawList_PrimVtx(NativePtr, pos, uv, col); } - public void AddImageRounded(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 uv_a, Vector2 uv_b, uint col, float rounding, int rounding_corners) + public void PrimWriteIdx(ushort idx) { - ImGuiNative.ImDrawList_AddImageRounded(NativePtr, user_texture_id, a, b, uv_a, uv_b, col, rounding, rounding_corners); + ImGuiNative.ImDrawList_PrimWriteIdx(NativePtr, idx); } - public void PrimQuadUV(Vector2 a, Vector2 b, Vector2 c, Vector2 d, Vector2 uv_a, Vector2 uv_b, Vector2 uv_c, Vector2 uv_d, uint col) + public void PrimWriteVtx(Vector2 pos, Vector2 uv, uint col) { - ImGuiNative.ImDrawList_PrimQuadUV(NativePtr, a, b, c, d, uv_a, uv_b, uv_c, uv_d, col); + ImGuiNative.ImDrawList_PrimWriteVtx(NativePtr, pos, uv, col); } - public void PathClear() + public void PushClipRect(Vector2 clip_rect_min, Vector2 clip_rect_max) { - ImGuiNative.ImDrawList_PathClear(NativePtr); + byte intersect_with_current_clip_rect = 0; + ImGuiNative.ImDrawList_PushClipRect(NativePtr, clip_rect_min, clip_rect_max, intersect_with_current_clip_rect); } - public void PrimWriteIdx(ushort idx) + public void PushClipRect(Vector2 clip_rect_min, Vector2 clip_rect_max, bool intersect_with_current_clip_rect) { - ImGuiNative.ImDrawList_PrimWriteIdx(NativePtr, idx); + byte native_intersect_with_current_clip_rect = intersect_with_current_clip_rect ? (byte)1 : (byte)0; + ImGuiNative.ImDrawList_PushClipRect(NativePtr, clip_rect_min, clip_rect_max, native_intersect_with_current_clip_rect); } public void PushClipRectFullScreen() { ImGuiNative.ImDrawList_PushClipRectFullScreen(NativePtr); } - public void ChannelsMerge() + public void PushTextureID(IntPtr texture_id) { - ImGuiNative.ImDrawList_ChannelsMerge(NativePtr); + ImGuiNative.ImDrawList_PushTextureID(NativePtr, texture_id); } - public void PathLineTo(Vector2 pos) + public void UpdateClipRect() { - ImGuiNative.ImDrawList_PathLineTo(NativePtr, pos); + ImGuiNative.ImDrawList_UpdateClipRect(NativePtr); } - public void PrimRectUV(Vector2 a, Vector2 b, Vector2 uv_a, Vector2 uv_b, uint col) + public void UpdateTextureID() { - ImGuiNative.ImDrawList_PrimRectUV(NativePtr, a, b, uv_a, uv_b, col); + ImGuiNative.ImDrawList_UpdateTextureID(NativePtr); } } } diff --git a/src/ImGui.NET/Generated/ImFont.gen.cs b/src/ImGui.NET/Generated/ImFont.gen.cs index 5ce765f..2e6a6c2 100644 --- a/src/ImGui.NET/Generated/ImFont.gen.cs +++ b/src/ImGui.NET/Generated/ImFont.gen.cs @@ -48,9 +48,9 @@ namespace ImGuiNET public ref float Descent => ref Unsafe.AsRef(&NativePtr->Descent); public ref bool DirtyLookupTables => ref Unsafe.AsRef(&NativePtr->DirtyLookupTables); public ref int MetricsTotalSurface => ref Unsafe.AsRef(&NativePtr->MetricsTotalSurface); - public void GrowIndex(int new_size) + public void AddGlyph(ushort c, float x0, float y0, float x1, float y1, float u0, float v0, float u1, float v1, float advance_x) { - ImGuiNative.ImFont_GrowIndex(NativePtr, new_size); + ImGuiNative.ImFont_AddGlyph(NativePtr, c, x0, y0, x1, y1, u0, v0, u1, v1, advance_x); } public void AddRemapChar(ushort dst, ushort src) { @@ -62,51 +62,51 @@ namespace ImGuiNET byte native_overwrite_dst = overwrite_dst ? (byte)1 : (byte)0; ImGuiNative.ImFont_AddRemapChar(NativePtr, dst, src, native_overwrite_dst); } - public void AddGlyph(ushort c, float x0, float y0, float x1, float y1, float u0, float v0, float u1, float v1, float advance_x) + public void BuildLookupTable() { - ImGuiNative.ImFont_AddGlyph(NativePtr, c, x0, y0, x1, y1, u0, v0, u1, v1, advance_x); + ImGuiNative.ImFont_BuildLookupTable(NativePtr); } - public ImFontGlyphPtr FindGlyphNoFallback(ushort c) + public void ClearOutputData() { - ImFontGlyph* ret = ImGuiNative.ImFont_FindGlyphNoFallback(NativePtr, c); + ImGuiNative.ImFont_ClearOutputData(NativePtr); + } + public ImFontGlyphPtr FindGlyph(ushort c) + { + ImFontGlyph* ret = ImGuiNative.ImFont_FindGlyph(NativePtr, c); return new ImFontGlyphPtr(ret); } - public bool IsLoaded() + public ImFontGlyphPtr FindGlyphNoFallback(ushort c) { - byte ret = ImGuiNative.ImFont_IsLoaded(NativePtr); - return ret != 0; + ImFontGlyph* ret = ImGuiNative.ImFont_FindGlyphNoFallback(NativePtr, c); + return new ImFontGlyphPtr(ret); } public float GetCharAdvance(ushort c) { float ret = ImGuiNative.ImFont_GetCharAdvance(NativePtr, c); return ret; } - public void SetFallbackChar(ushort c) - { - ImGuiNative.ImFont_SetFallbackChar(NativePtr, c); - } - public void RenderChar(ImDrawListPtr draw_list, float size, Vector2 pos, uint col, ushort c) + public string GetDebugName() { - ImDrawList* native_draw_list = draw_list.NativePtr; - ImGuiNative.ImFont_RenderChar(NativePtr, native_draw_list, size, pos, col, c); + byte* ret = ImGuiNative.ImFont_GetDebugName(NativePtr); + return Util.StringFromPtr(ret); } - public ImFontGlyphPtr FindGlyph(ushort c) + public void GrowIndex(int new_size) { - ImFontGlyph* ret = ImGuiNative.ImFont_FindGlyph(NativePtr, c); - return new ImFontGlyphPtr(ret); + ImGuiNative.ImFont_GrowIndex(NativePtr, new_size); } - public string GetDebugName() + public bool IsLoaded() { - byte* ret = ImGuiNative.ImFont_GetDebugName(NativePtr); - return Util.StringFromPtr(ret); + byte ret = ImGuiNative.ImFont_IsLoaded(NativePtr); + return ret != 0; } - public void BuildLookupTable() + public void RenderChar(ImDrawListPtr draw_list, float size, Vector2 pos, uint col, ushort c) { - ImGuiNative.ImFont_BuildLookupTable(NativePtr); + ImDrawList* native_draw_list = draw_list.NativePtr; + ImGuiNative.ImFont_RenderChar(NativePtr, native_draw_list, size, pos, col, c); } - public void ClearOutputData() + public void SetFallbackChar(ushort c) { - ImGuiNative.ImFont_ClearOutputData(NativePtr); + ImGuiNative.ImFont_SetFallbackChar(NativePtr, c); } } } diff --git a/src/ImGui.NET/Generated/ImFontAtlas.gen.cs b/src/ImGui.NET/Generated/ImFontAtlas.gen.cs index 441eaf6..16d8ae7 100644 --- a/src/ImGui.NET/Generated/ImFontAtlas.gen.cs +++ b/src/ImGui.NET/Generated/ImFontAtlas.gen.cs @@ -46,9 +46,101 @@ namespace ImGuiNET public ImVector CustomRects => new ImVector(NativePtr->CustomRects); public ImPtrVector ConfigData => new ImPtrVector(NativePtr->ConfigData, Unsafe.SizeOf()); public RangeAccessor CustomRectIds => new RangeAccessor(NativePtr->CustomRectIds, 1); - public void ClearFonts() + public int AddCustomRectFontGlyph(ImFontPtr font, ushort id, int width, int height, float advance_x) { - ImGuiNative.ImFontAtlas_ClearFonts(NativePtr); + ImFont* native_font = font.NativePtr; + Vector2 offset = new Vector2(); + int ret = ImGuiNative.ImFontAtlas_AddCustomRectFontGlyph(NativePtr, native_font, id, width, height, advance_x, offset); + return ret; + } + public int AddCustomRectFontGlyph(ImFontPtr font, ushort id, int width, int height, float advance_x, Vector2 offset) + { + ImFont* native_font = font.NativePtr; + int ret = ImGuiNative.ImFontAtlas_AddCustomRectFontGlyph(NativePtr, native_font, id, width, height, advance_x, offset); + return ret; + } + public int AddCustomRectRegular(uint id, int width, int height) + { + int ret = ImGuiNative.ImFontAtlas_AddCustomRectRegular(NativePtr, id, width, height); + return ret; + } + public ImFontPtr AddFont(ImFontConfigPtr font_cfg) + { + ImFontConfig* native_font_cfg = font_cfg.NativePtr; + ImFont* ret = ImGuiNative.ImFontAtlas_AddFont(NativePtr, native_font_cfg); + return new ImFontPtr(ret); + } + public ImFontPtr AddFontDefault() + { + ImFontConfig* font_cfg = null; + ImFont* ret = ImGuiNative.ImFontAtlas_AddFontDefault(NativePtr, font_cfg); + return new ImFontPtr(ret); + } + public ImFontPtr AddFontDefault(ImFontConfigPtr font_cfg) + { + ImFontConfig* native_font_cfg = font_cfg.NativePtr; + ImFont* ret = ImGuiNative.ImFontAtlas_AddFontDefault(NativePtr, native_font_cfg); + return new ImFontPtr(ret); + } + public ImFontPtr AddFontFromFileTTF(string filename, float size_pixels) + { + byte* native_filename; + if (filename != null) + { + int filename_byteCount = Encoding.UTF8.GetByteCount(filename); + byte* native_filename_stackBytes = stackalloc byte[filename_byteCount + 1]; + native_filename = native_filename_stackBytes; + fixed (char* filename_ptr = filename) + { + int native_filename_offset = Encoding.UTF8.GetBytes(filename_ptr, filename.Length, native_filename, filename_byteCount); + native_filename[native_filename_offset] = 0; + } + } + else { native_filename = null; } + ImFontConfig* font_cfg = null; + ushort* glyph_ranges = null; + ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromFileTTF(NativePtr, native_filename, size_pixels, font_cfg, glyph_ranges); + return new ImFontPtr(ret); + } + public ImFontPtr AddFontFromFileTTF(string filename, float size_pixels, ImFontConfigPtr font_cfg) + { + byte* native_filename; + if (filename != null) + { + int filename_byteCount = Encoding.UTF8.GetByteCount(filename); + byte* native_filename_stackBytes = stackalloc byte[filename_byteCount + 1]; + native_filename = native_filename_stackBytes; + fixed (char* filename_ptr = filename) + { + int native_filename_offset = Encoding.UTF8.GetBytes(filename_ptr, filename.Length, native_filename, filename_byteCount); + native_filename[native_filename_offset] = 0; + } + } + else { native_filename = null; } + ImFontConfig* native_font_cfg = font_cfg.NativePtr; + ushort* glyph_ranges = null; + ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromFileTTF(NativePtr, native_filename, size_pixels, native_font_cfg, glyph_ranges); + return new ImFontPtr(ret); + } + public ImFontPtr AddFontFromFileTTF(string filename, float size_pixels, ImFontConfigPtr font_cfg, IntPtr glyph_ranges) + { + byte* native_filename; + if (filename != null) + { + int filename_byteCount = Encoding.UTF8.GetByteCount(filename); + byte* native_filename_stackBytes = stackalloc byte[filename_byteCount + 1]; + native_filename = native_filename_stackBytes; + fixed (char* filename_ptr = filename) + { + int native_filename_offset = Encoding.UTF8.GetBytes(filename_ptr, filename.Length, native_filename, filename_byteCount); + native_filename[native_filename_offset] = 0; + } + } + else { native_filename = null; } + ImFontConfig* native_font_cfg = font_cfg.NativePtr; + ushort* native_glyph_ranges = (ushort*)glyph_ranges.ToPointer(); + ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromFileTTF(NativePtr, native_filename, size_pixels, native_font_cfg, native_glyph_ranges); + return new ImFontPtr(ret); } public ImFontPtr AddFontFromMemoryCompressedBase85TTF(string compressed_font_data_base85, float size_pixels) { @@ -110,82 +202,6 @@ namespace ImGuiNET ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryCompressedBase85TTF(NativePtr, native_compressed_font_data_base85, size_pixels, native_font_cfg, native_glyph_ranges); return new ImFontPtr(ret); } - public bool Build() - { - byte ret = ImGuiNative.ImFontAtlas_Build(NativePtr); - return ret != 0; - } - public ImFontPtr AddFont(ImFontConfigPtr font_cfg) - { - ImFontConfig* native_font_cfg = font_cfg.NativePtr; - ImFont* ret = ImGuiNative.ImFontAtlas_AddFont(NativePtr, native_font_cfg); - return new ImFontPtr(ret); - } - public void CalcCustomRectUV(ref CustomRect rect, out Vector2 out_uv_min, out Vector2 out_uv_max) - { - fixed (CustomRect* native_rect = &rect) - { - fixed (Vector2* native_out_uv_min = &out_uv_min) - { - fixed (Vector2* native_out_uv_max = &out_uv_max) - { - ImGuiNative.ImFontAtlas_CalcCustomRectUV(NativePtr, native_rect, native_out_uv_min, native_out_uv_max); - } - } - } - } - public CustomRect* GetCustomRectByIndex(int index) - { - CustomRect* ret = ImGuiNative.ImFontAtlas_GetCustomRectByIndex(NativePtr, index); - return ret; - } - public int AddCustomRectRegular(uint id, int width, int height) - { - int ret = ImGuiNative.ImFontAtlas_AddCustomRectRegular(NativePtr, id, width, height); - return ret; - } - public bool IsBuilt() - { - byte ret = ImGuiNative.ImFontAtlas_IsBuilt(NativePtr); - return ret != 0; - } - public IntPtr GetGlyphRangesThai() - { - ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesThai(NativePtr); - return (IntPtr)ret; - } - public IntPtr GetGlyphRangesCyrillic() - { - ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesCyrillic(NativePtr); - return (IntPtr)ret; - } - public IntPtr GetGlyphRangesChineseSimplifiedCommon() - { - ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesChineseSimplifiedCommon(NativePtr); - return (IntPtr)ret; - } - public IntPtr GetGlyphRangesChineseFull() - { - ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesChineseFull(NativePtr); - return (IntPtr)ret; - } - public IntPtr GetGlyphRangesDefault() - { - ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesDefault(NativePtr); - return (IntPtr)ret; - } - public void SetTexID(IntPtr id) - { - ImGuiNative.ImFontAtlas_SetTexID(NativePtr, id); - } - public void ClearTexData() - { - ImGuiNative.ImFontAtlas_ClearTexData(NativePtr); - } - public void Clear() - { - ImGuiNative.ImFontAtlas_Clear(NativePtr); - } public ImFontPtr AddFontFromMemoryCompressedTTF(IntPtr compressed_font_data, int compressed_font_size, float size_pixels) { void* native_compressed_font_data = (void*)compressed_font_data.ToPointer(); @@ -234,83 +250,97 @@ namespace ImGuiNET ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryTTF(NativePtr, native_font_data, font_size, size_pixels, native_font_cfg, native_glyph_ranges); return new ImFontPtr(ret); } - public ImFontPtr AddFontFromFileTTF(string filename, float size_pixels) + public bool Build() { - byte* native_filename; - if (filename != null) - { - int filename_byteCount = Encoding.UTF8.GetByteCount(filename); - byte* native_filename_stackBytes = stackalloc byte[filename_byteCount + 1]; - native_filename = native_filename_stackBytes; - fixed (char* filename_ptr = filename) - { - int native_filename_offset = Encoding.UTF8.GetBytes(filename_ptr, filename.Length, native_filename, filename_byteCount); - native_filename[native_filename_offset] = 0; - } - } - else { native_filename = null; } - ImFontConfig* font_cfg = null; - ushort* glyph_ranges = null; - ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromFileTTF(NativePtr, native_filename, size_pixels, font_cfg, glyph_ranges); - return new ImFontPtr(ret); + byte ret = ImGuiNative.ImFontAtlas_Build(NativePtr); + return ret != 0; } - public ImFontPtr AddFontFromFileTTF(string filename, float size_pixels, ImFontConfigPtr font_cfg) + public void CalcCustomRectUV(ref CustomRect rect, out Vector2 out_uv_min, out Vector2 out_uv_max) { - byte* native_filename; - if (filename != null) + fixed (CustomRect* native_rect = &rect) { - int filename_byteCount = Encoding.UTF8.GetByteCount(filename); - byte* native_filename_stackBytes = stackalloc byte[filename_byteCount + 1]; - native_filename = native_filename_stackBytes; - fixed (char* filename_ptr = filename) + fixed (Vector2* native_out_uv_min = &out_uv_min) { - int native_filename_offset = Encoding.UTF8.GetBytes(filename_ptr, filename.Length, native_filename, filename_byteCount); - native_filename[native_filename_offset] = 0; + fixed (Vector2* native_out_uv_max = &out_uv_max) + { + ImGuiNative.ImFontAtlas_CalcCustomRectUV(NativePtr, native_rect, native_out_uv_min, native_out_uv_max); + } } } - else { native_filename = null; } - ImFontConfig* native_font_cfg = font_cfg.NativePtr; - ushort* glyph_ranges = null; - ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromFileTTF(NativePtr, native_filename, size_pixels, native_font_cfg, glyph_ranges); - return new ImFontPtr(ret); } - public ImFontPtr AddFontFromFileTTF(string filename, float size_pixels, ImFontConfigPtr font_cfg, IntPtr glyph_ranges) + public void Clear() { - byte* native_filename; - if (filename != null) - { - int filename_byteCount = Encoding.UTF8.GetByteCount(filename); - byte* native_filename_stackBytes = stackalloc byte[filename_byteCount + 1]; - native_filename = native_filename_stackBytes; - fixed (char* filename_ptr = filename) - { - int native_filename_offset = Encoding.UTF8.GetBytes(filename_ptr, filename.Length, native_filename, filename_byteCount); - native_filename[native_filename_offset] = 0; - } - } - else { native_filename = null; } - ImFontConfig* native_font_cfg = font_cfg.NativePtr; - ushort* native_glyph_ranges = (ushort*)glyph_ranges.ToPointer(); - ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromFileTTF(NativePtr, native_filename, size_pixels, native_font_cfg, native_glyph_ranges); - return new ImFontPtr(ret); + ImGuiNative.ImFontAtlas_Clear(NativePtr); } - public ImFontPtr AddFontDefault() + public void ClearFonts() { - ImFontConfig* font_cfg = null; - ImFont* ret = ImGuiNative.ImFontAtlas_AddFontDefault(NativePtr, font_cfg); - return new ImFontPtr(ret); + ImGuiNative.ImFontAtlas_ClearFonts(NativePtr); } - public ImFontPtr AddFontDefault(ImFontConfigPtr font_cfg) + public void ClearInputData() { - ImFontConfig* native_font_cfg = font_cfg.NativePtr; - ImFont* ret = ImGuiNative.ImFontAtlas_AddFontDefault(NativePtr, native_font_cfg); - return new ImFontPtr(ret); + ImGuiNative.ImFontAtlas_ClearInputData(NativePtr); + } + public void ClearTexData() + { + ImGuiNative.ImFontAtlas_ClearTexData(NativePtr); + } + public CustomRect* GetCustomRectByIndex(int index) + { + CustomRect* ret = ImGuiNative.ImFontAtlas_GetCustomRectByIndex(NativePtr, index); + return ret; + } + public IntPtr GetGlyphRangesChineseFull() + { + ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesChineseFull(NativePtr); + return (IntPtr)ret; + } + public IntPtr GetGlyphRangesChineseSimplifiedCommon() + { + ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesChineseSimplifiedCommon(NativePtr); + return (IntPtr)ret; + } + public IntPtr GetGlyphRangesCyrillic() + { + ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesCyrillic(NativePtr); + return (IntPtr)ret; + } + public IntPtr GetGlyphRangesDefault() + { + ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesDefault(NativePtr); + return (IntPtr)ret; } public IntPtr GetGlyphRangesJapanese() { ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesJapanese(NativePtr); return (IntPtr)ret; } + public IntPtr GetGlyphRangesKorean() + { + ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesKorean(NativePtr); + return (IntPtr)ret; + } + public IntPtr GetGlyphRangesThai() + { + ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesThai(NativePtr); + return (IntPtr)ret; + } + public bool GetMouseCursorTexData(ImGuiMouseCursor cursor, out Vector2 out_offset, out Vector2 out_size, out Vector2 out_uv_border, out Vector2 out_uv_fill) + { + fixed (Vector2* native_out_offset = &out_offset) + { + fixed (Vector2* native_out_size = &out_size) + { + fixed (Vector2* native_out_uv_border = &out_uv_border) + { + fixed (Vector2* native_out_uv_fill = &out_uv_fill) + { + byte ret = ImGuiNative.ImFontAtlas_GetMouseCursorTexData(NativePtr, cursor, native_out_offset, native_out_size, native_out_uv_border, native_out_uv_fill); + return ret != 0; + } + } + } + } + } public void GetTexDataAsAlpha8(out byte* out_pixels, out int out_width, out int out_height) { int* out_bytes_per_pixel = null; @@ -341,32 +371,6 @@ namespace ImGuiNET } } } - public void ClearInputData() - { - ImGuiNative.ImFontAtlas_ClearInputData(NativePtr); - } - public bool GetMouseCursorTexData(ImGuiMouseCursor cursor, out Vector2 out_offset, out Vector2 out_size, out Vector2 out_uv_border, out Vector2 out_uv_fill) - { - fixed (Vector2* native_out_offset = &out_offset) - { - fixed (Vector2* native_out_size = &out_size) - { - fixed (Vector2* native_out_uv_border = &out_uv_border) - { - fixed (Vector2* native_out_uv_fill = &out_uv_fill) - { - byte ret = ImGuiNative.ImFontAtlas_GetMouseCursorTexData(NativePtr, cursor, native_out_offset, native_out_size, native_out_uv_border, native_out_uv_fill); - return ret != 0; - } - } - } - } - } - public IntPtr GetGlyphRangesKorean() - { - ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesKorean(NativePtr); - return (IntPtr)ret; - } public void GetTexDataAsRGBA32(out byte* out_pixels, out int out_width, out int out_height) { int* out_bytes_per_pixel = null; @@ -397,18 +401,14 @@ namespace ImGuiNET } } } - public int AddCustomRectFontGlyph(ImFontPtr font, ushort id, int width, int height, float advance_x) + public bool IsBuilt() { - ImFont* native_font = font.NativePtr; - Vector2 offset = new Vector2(); - int ret = ImGuiNative.ImFontAtlas_AddCustomRectFontGlyph(NativePtr, native_font, id, width, height, advance_x, offset); - return ret; + byte ret = ImGuiNative.ImFontAtlas_IsBuilt(NativePtr); + return ret != 0; } - public int AddCustomRectFontGlyph(ImFontPtr font, ushort id, int width, int height, float advance_x, Vector2 offset) + public void SetTexID(IntPtr id) { - ImFont* native_font = font.NativePtr; - int ret = ImGuiNative.ImFontAtlas_AddCustomRectFontGlyph(NativePtr, native_font, id, width, height, advance_x, offset); - return ret; + ImGuiNative.ImFontAtlas_SetTexID(NativePtr, id); } } } diff --git a/src/ImGui.NET/Generated/ImGui.gen.cs b/src/ImGui.NET/Generated/ImGui.gen.cs index 28a413c..d36a33a 100644 --- a/src/ImGui.NET/Generated/ImGui.gen.cs +++ b/src/ImGui.NET/Generated/ImGui.gen.cs @@ -7,237 +7,248 @@ namespace ImGuiNET { public static unsafe partial class ImGui { - public static float GetFrameHeight() - { - float ret = ImGuiNative.igGetFrameHeight(); - return ret; - } - public static IntPtr CreateContext() - { - ImFontAtlas* shared_font_atlas = null; - IntPtr ret = ImGuiNative.igCreateContext(shared_font_atlas); - return ret; - } - public static IntPtr CreateContext(ImFontAtlasPtr shared_font_atlas) + public static ImGuiPayloadPtr AcceptDragDropPayload(string type) { - ImFontAtlas* native_shared_font_atlas = shared_font_atlas.NativePtr; - IntPtr ret = ImGuiNative.igCreateContext(native_shared_font_atlas); - return ret; + byte* native_type; + if (type != null) + { + int type_byteCount = Encoding.UTF8.GetByteCount(type); + byte* native_type_stackBytes = stackalloc byte[type_byteCount + 1]; + native_type = native_type_stackBytes; + fixed (char* type_ptr = type) + { + int native_type_offset = Encoding.UTF8.GetBytes(type_ptr, type.Length, native_type, type_byteCount); + native_type[native_type_offset] = 0; + } + } + else { native_type = null; } + ImGuiDragDropFlags flags = 0; + ImGuiPayload* ret = ImGuiNative.igAcceptDragDropPayload(native_type, flags); + return new ImGuiPayloadPtr(ret); } - public static void TextUnformatted(string text) + public static ImGuiPayloadPtr AcceptDragDropPayload(string type, ImGuiDragDropFlags flags) { - byte* native_text; - if (text != null) + byte* native_type; + if (type != null) { - int text_byteCount = Encoding.UTF8.GetByteCount(text); - byte* native_text_stackBytes = stackalloc byte[text_byteCount + 1]; - native_text = native_text_stackBytes; - fixed (char* text_ptr = text) + int type_byteCount = Encoding.UTF8.GetByteCount(type); + byte* native_type_stackBytes = stackalloc byte[type_byteCount + 1]; + native_type = native_type_stackBytes; + fixed (char* type_ptr = type) { - int native_text_offset = Encoding.UTF8.GetBytes(text_ptr, text.Length, native_text, text_byteCount); - native_text[native_text_offset] = 0; + int native_type_offset = Encoding.UTF8.GetBytes(type_ptr, type.Length, native_type, type_byteCount); + native_type[native_type_offset] = 0; } } - else { native_text = null; } - byte* native_text_end = null; - ImGuiNative.igTextUnformatted(native_text, native_text_end); + else { native_type = null; } + ImGuiPayload* ret = ImGuiNative.igAcceptDragDropPayload(native_type, flags); + return new ImGuiPayloadPtr(ret); } - public static void PopFont() + public static void AlignTextToFramePadding() { - ImGuiNative.igPopFont(); + ImGuiNative.igAlignTextToFramePadding(); } - public static bool Combo(string label, ref int current_item, string[] items, int items_count) + public static bool ArrowButton(string str_id, ImGuiDir dir) { - byte* native_label; - if (label != null) + byte* native_str_id; + if (str_id != null) { - int label_byteCount = Encoding.UTF8.GetByteCount(label); - byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; - native_label = native_label_stackBytes; - fixed (char* label_ptr = label) + int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + fixed (char* str_id_ptr = str_id) { - int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); - native_label[native_label_offset] = 0; + int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; } } - else { native_label = null; } - int* items_byteCounts = stackalloc int[items.Length]; - int items_byteCount = 0; - for (int i = 0; i < items.Length; i++) - { - string s = items[i]; - items_byteCounts[i] = Encoding.UTF8.GetByteCount(s); - items_byteCount += items_byteCounts[i] + 1; - } - byte* native_items_data = stackalloc byte[items_byteCount]; - int offset = 0; - for (int i = 0; i < items.Length; i++) + else { native_str_id = null; } + byte ret = ImGuiNative.igArrowButton(native_str_id, dir); + return ret != 0; + } + public static bool Begin(string name) + { + byte* native_name; + if (name != null) { - string s = items[i]; - fixed (char* sPtr = s) + int name_byteCount = Encoding.UTF8.GetByteCount(name); + byte* native_name_stackBytes = stackalloc byte[name_byteCount + 1]; + native_name = native_name_stackBytes; + fixed (char* name_ptr = name) { - offset += Encoding.UTF8.GetBytes(sPtr, s.Length, native_items_data + offset, items_byteCounts[i]); - native_items_data[offset] = 0; - offset += 1; + int native_name_offset = Encoding.UTF8.GetBytes(name_ptr, name.Length, native_name, name_byteCount); + native_name[native_name_offset] = 0; } } - byte** native_items = stackalloc byte*[items.Length]; - offset = 0; - for (int i = 0; i < items.Length; i++) - { - native_items[i] = &native_items_data[offset]; - offset += items_byteCounts[i] + 1; - } - int popup_max_height_in_items = -1; - fixed (int* native_current_item = ¤t_item) - { - byte ret = ImGuiNative.igCombo(native_label, native_current_item, native_items, items_count, popup_max_height_in_items); - return ret != 0; - } + else { native_name = null; } + byte* p_open = null; + ImGuiWindowFlags flags = 0; + byte ret = ImGuiNative.igBegin(native_name, p_open, flags); + return ret != 0; } - public static bool Combo(string label, ref int current_item, string[] items, int items_count, int popup_max_height_in_items) + public static bool Begin(string name, ref bool p_open) { - byte* native_label; - if (label != null) + byte* native_name; + if (name != null) { - int label_byteCount = Encoding.UTF8.GetByteCount(label); - byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; - native_label = native_label_stackBytes; - fixed (char* label_ptr = label) + int name_byteCount = Encoding.UTF8.GetByteCount(name); + byte* native_name_stackBytes = stackalloc byte[name_byteCount + 1]; + native_name = native_name_stackBytes; + fixed (char* name_ptr = name) { - int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); - native_label[native_label_offset] = 0; + int native_name_offset = Encoding.UTF8.GetBytes(name_ptr, name.Length, native_name, name_byteCount); + native_name[native_name_offset] = 0; } } - else { native_label = null; } - int* items_byteCounts = stackalloc int[items.Length]; - int items_byteCount = 0; - for (int i = 0; i < items.Length; i++) - { - string s = items[i]; - items_byteCounts[i] = Encoding.UTF8.GetByteCount(s); - items_byteCount += items_byteCounts[i] + 1; - } - byte* native_items_data = stackalloc byte[items_byteCount]; - int offset = 0; - for (int i = 0; i < items.Length; i++) + else { native_name = null; } + byte native_p_open_val = p_open ? (byte)1 : (byte)0; + byte* native_p_open = &native_p_open_val; + ImGuiWindowFlags flags = 0; + byte ret = ImGuiNative.igBegin(native_name, native_p_open, flags); + p_open = native_p_open_val != 0; + return ret != 0; + } + public static bool Begin(string name, ref bool p_open, ImGuiWindowFlags flags) + { + byte* native_name; + if (name != null) { - string s = items[i]; - fixed (char* sPtr = s) + int name_byteCount = Encoding.UTF8.GetByteCount(name); + byte* native_name_stackBytes = stackalloc byte[name_byteCount + 1]; + native_name = native_name_stackBytes; + fixed (char* name_ptr = name) { - offset += Encoding.UTF8.GetBytes(sPtr, s.Length, native_items_data + offset, items_byteCounts[i]); - native_items_data[offset] = 0; - offset += 1; + int native_name_offset = Encoding.UTF8.GetBytes(name_ptr, name.Length, native_name, name_byteCount); + native_name[native_name_offset] = 0; } } - byte** native_items = stackalloc byte*[items.Length]; - offset = 0; - for (int i = 0; i < items.Length; i++) - { - native_items[i] = &native_items_data[offset]; - offset += items_byteCounts[i] + 1; - } - fixed (int* native_current_item = ¤t_item) - { - byte ret = ImGuiNative.igCombo(native_label, native_current_item, native_items, items_count, popup_max_height_in_items); - return ret != 0; - } + else { native_name = null; } + byte native_p_open_val = p_open ? (byte)1 : (byte)0; + byte* native_p_open = &native_p_open_val; + byte ret = ImGuiNative.igBegin(native_name, native_p_open, flags); + p_open = native_p_open_val != 0; + return ret != 0; } - public static bool Combo(string label, ref int current_item, string items_separated_by_zeros) + public static bool BeginChild(string str_id) { - byte* native_label; - if (label != null) + byte* native_str_id; + if (str_id != null) { - int label_byteCount = Encoding.UTF8.GetByteCount(label); - byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; - native_label = native_label_stackBytes; - fixed (char* label_ptr = label) + int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + fixed (char* str_id_ptr = str_id) { - int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); - native_label[native_label_offset] = 0; + int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; } } - else { native_label = null; } - byte* native_items_separated_by_zeros; - if (items_separated_by_zeros != null) + else { native_str_id = null; } + Vector2 size = new Vector2(); + byte border = 0; + ImGuiWindowFlags flags = 0; + byte ret = ImGuiNative.igBeginChild(native_str_id, size, border, flags); + return ret != 0; + } + public static bool BeginChild(string str_id, Vector2 size) + { + byte* native_str_id; + if (str_id != null) { - int items_separated_by_zeros_byteCount = Encoding.UTF8.GetByteCount(items_separated_by_zeros); - byte* native_items_separated_by_zeros_stackBytes = stackalloc byte[items_separated_by_zeros_byteCount + 1]; - native_items_separated_by_zeros = native_items_separated_by_zeros_stackBytes; - fixed (char* items_separated_by_zeros_ptr = items_separated_by_zeros) + int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + fixed (char* str_id_ptr = str_id) { - int native_items_separated_by_zeros_offset = Encoding.UTF8.GetBytes(items_separated_by_zeros_ptr, items_separated_by_zeros.Length, native_items_separated_by_zeros, items_separated_by_zeros_byteCount); - native_items_separated_by_zeros[native_items_separated_by_zeros_offset] = 0; + int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; } } - else { native_items_separated_by_zeros = null; } - int popup_max_height_in_items = -1; - fixed (int* native_current_item = ¤t_item) - { - byte ret = ImGuiNative.igComboStr(native_label, native_current_item, native_items_separated_by_zeros, popup_max_height_in_items); - return ret != 0; - } + else { native_str_id = null; } + byte border = 0; + ImGuiWindowFlags flags = 0; + byte ret = ImGuiNative.igBeginChild(native_str_id, size, border, flags); + return ret != 0; } - public static bool Combo(string label, ref int current_item, string items_separated_by_zeros, int popup_max_height_in_items) + public static bool BeginChild(string str_id, Vector2 size, bool border) { - byte* native_label; - if (label != null) + byte* native_str_id; + if (str_id != null) { - int label_byteCount = Encoding.UTF8.GetByteCount(label); - byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; - native_label = native_label_stackBytes; - fixed (char* label_ptr = label) + int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + fixed (char* str_id_ptr = str_id) { - int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); - native_label[native_label_offset] = 0; + int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; } } - else { native_label = null; } - byte* native_items_separated_by_zeros; - if (items_separated_by_zeros != null) + else { native_str_id = null; } + byte native_border = border ? (byte)1 : (byte)0; + ImGuiWindowFlags flags = 0; + byte ret = ImGuiNative.igBeginChild(native_str_id, size, native_border, flags); + return ret != 0; + } + public static bool BeginChild(string str_id, Vector2 size, bool border, ImGuiWindowFlags flags) + { + byte* native_str_id; + if (str_id != null) { - int items_separated_by_zeros_byteCount = Encoding.UTF8.GetByteCount(items_separated_by_zeros); - byte* native_items_separated_by_zeros_stackBytes = stackalloc byte[items_separated_by_zeros_byteCount + 1]; - native_items_separated_by_zeros = native_items_separated_by_zeros_stackBytes; - fixed (char* items_separated_by_zeros_ptr = items_separated_by_zeros) + int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + fixed (char* str_id_ptr = str_id) { - int native_items_separated_by_zeros_offset = Encoding.UTF8.GetBytes(items_separated_by_zeros_ptr, items_separated_by_zeros.Length, native_items_separated_by_zeros, items_separated_by_zeros_byteCount); - native_items_separated_by_zeros[native_items_separated_by_zeros_offset] = 0; + int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; } } - else { native_items_separated_by_zeros = null; } - fixed (int* native_current_item = ¤t_item) - { - byte ret = ImGuiNative.igComboStr(native_label, native_current_item, native_items_separated_by_zeros, popup_max_height_in_items); - return ret != 0; - } + else { native_str_id = null; } + byte native_border = border ? (byte)1 : (byte)0; + byte ret = ImGuiNative.igBeginChild(native_str_id, size, native_border, flags); + return ret != 0; } - public static void CaptureKeyboardFromApp() + public static bool BeginChild(uint id) { - byte capture = 1; - ImGuiNative.igCaptureKeyboardFromApp(capture); + Vector2 size = new Vector2(); + byte border = 0; + ImGuiWindowFlags flags = 0; + byte ret = ImGuiNative.igBeginChildID(id, size, border, flags); + return ret != 0; } - public static void CaptureKeyboardFromApp(bool capture) + public static bool BeginChild(uint id, Vector2 size) { - byte native_capture = capture ? (byte)1 : (byte)0; - ImGuiNative.igCaptureKeyboardFromApp(native_capture); + byte border = 0; + ImGuiWindowFlags flags = 0; + byte ret = ImGuiNative.igBeginChildID(id, size, border, flags); + return ret != 0; } - public static bool IsWindowFocused() + public static bool BeginChild(uint id, Vector2 size, bool border) { - ImGuiFocusedFlags flags = 0; - byte ret = ImGuiNative.igIsWindowFocused(flags); + byte native_border = border ? (byte)1 : (byte)0; + ImGuiWindowFlags flags = 0; + byte ret = ImGuiNative.igBeginChildID(id, size, native_border, flags); return ret != 0; } - public static bool IsWindowFocused(ImGuiFocusedFlags flags) + public static bool BeginChild(uint id, Vector2 size, bool border, ImGuiWindowFlags flags) { - byte ret = ImGuiNative.igIsWindowFocused(flags); + byte native_border = border ? (byte)1 : (byte)0; + byte ret = ImGuiNative.igBeginChildID(id, size, native_border, flags); return ret != 0; } - public static void Render() + public static bool BeginChildFrame(uint id, Vector2 size) { - ImGuiNative.igRender(); + ImGuiWindowFlags flags = 0; + byte ret = ImGuiNative.igBeginChildFrame(id, size, flags); + return ret != 0; } - public static bool DragFloat4(string label, ref Vector4 v) + public static bool BeginChildFrame(uint id, Vector2 size, ImGuiWindowFlags flags) + { + byte ret = ImGuiNative.igBeginChildFrame(id, size, flags); + return ret != 0; + } + public static bool BeginCombo(string label, string preview_value) { byte* native_label; if (label != null) @@ -252,26 +263,24 @@ namespace ImGuiNET } } else { native_label = null; } - float v_speed = 1.0f; - float v_min = 0.0f; - float v_max = 0.0f; - byte* native_format; - int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = "%.3f") + byte* native_preview_value; + if (preview_value != null) + { + int preview_value_byteCount = Encoding.UTF8.GetByteCount(preview_value); + byte* native_preview_value_stackBytes = stackalloc byte[preview_value_byteCount + 1]; + native_preview_value = native_preview_value_stackBytes; + fixed (char* preview_value_ptr = preview_value) { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; + int native_preview_value_offset = Encoding.UTF8.GetBytes(preview_value_ptr, preview_value.Length, native_preview_value, preview_value_byteCount); + native_preview_value[native_preview_value_offset] = 0; } - float power = 1.0f; - fixed (Vector4* native_v = &v) - { - byte ret = ImGuiNative.igDragFloat4(native_label, native_v, v_speed, v_min, v_max, native_format, power); - return ret != 0; } + else { native_preview_value = null; } + ImGuiComboFlags flags = 0; + byte ret = ImGuiNative.igBeginCombo(native_label, native_preview_value, flags); + return ret != 0; } - public static bool DragFloat4(string label, ref Vector4 v, float v_speed) + public static bool BeginCombo(string label, string preview_value, ImGuiComboFlags flags) { byte* native_label; if (label != null) @@ -286,25 +295,48 @@ namespace ImGuiNET } } else { native_label = null; } - float v_min = 0.0f; - float v_max = 0.0f; - byte* native_format; - int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = "%.3f") + byte* native_preview_value; + if (preview_value != null) + { + int preview_value_byteCount = Encoding.UTF8.GetByteCount(preview_value); + byte* native_preview_value_stackBytes = stackalloc byte[preview_value_byteCount + 1]; + native_preview_value = native_preview_value_stackBytes; + fixed (char* preview_value_ptr = preview_value) { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; + int native_preview_value_offset = Encoding.UTF8.GetBytes(preview_value_ptr, preview_value.Length, native_preview_value, preview_value_byteCount); + native_preview_value[native_preview_value_offset] = 0; } - float power = 1.0f; - fixed (Vector4* native_v = &v) - { - byte ret = ImGuiNative.igDragFloat4(native_label, native_v, v_speed, v_min, v_max, native_format, power); - return ret != 0; } + else { native_preview_value = null; } + byte ret = ImGuiNative.igBeginCombo(native_label, native_preview_value, flags); + return ret != 0; } - public static bool DragFloat4(string label, ref Vector4 v, float v_speed, float v_min) + public static bool BeginDragDropSource() + { + ImGuiDragDropFlags flags = 0; + byte ret = ImGuiNative.igBeginDragDropSource(flags); + return ret != 0; + } + public static bool BeginDragDropSource(ImGuiDragDropFlags flags) + { + byte ret = ImGuiNative.igBeginDragDropSource(flags); + return ret != 0; + } + public static bool BeginDragDropTarget() + { + byte ret = ImGuiNative.igBeginDragDropTarget(); + return ret != 0; + } + public static void BeginGroup() + { + ImGuiNative.igBeginGroup(); + } + public static bool BeginMainMenuBar() + { + byte ret = ImGuiNative.igBeginMainMenuBar(); + return ret != 0; + } + public static bool BeginMenu(string label) { byte* native_label; if (label != null) @@ -319,24 +351,11 @@ namespace ImGuiNET } } else { native_label = null; } - float v_max = 0.0f; - byte* native_format; - int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = "%.3f") - { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; - } - float power = 1.0f; - fixed (Vector4* native_v = &v) - { - byte ret = ImGuiNative.igDragFloat4(native_label, native_v, v_speed, v_min, v_max, native_format, power); - return ret != 0; - } + byte enabled = 1; + byte ret = ImGuiNative.igBeginMenu(native_label, enabled); + return ret != 0; } - public static bool DragFloat4(string label, ref Vector4 v, float v_speed, float v_min, float v_max) + public static bool BeginMenu(string label, bool enabled) { byte* native_label; if (label != null) @@ -351,229 +370,295 @@ namespace ImGuiNET } } else { native_label = null; } - byte* native_format; - int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = "%.3f") + byte native_enabled = enabled ? (byte)1 : (byte)0; + byte ret = ImGuiNative.igBeginMenu(native_label, native_enabled); + return ret != 0; + } + public static bool BeginMenuBar() + { + byte ret = ImGuiNative.igBeginMenuBar(); + return ret != 0; + } + public static bool BeginPopup(string str_id) + { + byte* native_str_id; + if (str_id != null) + { + int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + fixed (char* str_id_ptr = str_id) { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; + int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; } - float power = 1.0f; - fixed (Vector4* native_v = &v) - { - byte ret = ImGuiNative.igDragFloat4(native_label, native_v, v_speed, v_min, v_max, native_format, power); - return ret != 0; } + else { native_str_id = null; } + ImGuiWindowFlags flags = 0; + byte ret = ImGuiNative.igBeginPopup(native_str_id, flags); + return ret != 0; } - public static bool DragFloat4(string label, ref Vector4 v, float v_speed, float v_min, float v_max, string format) + public static bool BeginPopup(string str_id, ImGuiWindowFlags flags) { - byte* native_label; - if (label != null) + byte* native_str_id; + if (str_id != null) { - int label_byteCount = Encoding.UTF8.GetByteCount(label); - byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; - native_label = native_label_stackBytes; - fixed (char* label_ptr = label) + int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + fixed (char* str_id_ptr = str_id) { - int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); - native_label[native_label_offset] = 0; + int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; } } - else { native_label = null; } - byte* native_format; - if (format != null) - { - int format_byteCount = Encoding.UTF8.GetByteCount(format); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = format) - { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; - } - } - else { native_format = null; } - float power = 1.0f; - fixed (Vector4* native_v = &v) - { - byte ret = ImGuiNative.igDragFloat4(native_label, native_v, v_speed, v_min, v_max, native_format, power); - return ret != 0; - } + else { native_str_id = null; } + byte ret = ImGuiNative.igBeginPopup(native_str_id, flags); + return ret != 0; } - public static bool DragFloat4(string label, ref Vector4 v, float v_speed, float v_min, float v_max, string format, float power) + public static bool BeginPopupContextItem() { - byte* native_label; - if (label != null) + byte* native_str_id = null; + int mouse_button = 1; + byte ret = ImGuiNative.igBeginPopupContextItem(native_str_id, mouse_button); + return ret != 0; + } + public static bool BeginPopupContextItem(string str_id) + { + byte* native_str_id; + if (str_id != null) { - int label_byteCount = Encoding.UTF8.GetByteCount(label); - byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; - native_label = native_label_stackBytes; - fixed (char* label_ptr = label) + int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + fixed (char* str_id_ptr = str_id) { - int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); - native_label[native_label_offset] = 0; + int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; } } - else { native_label = null; } - byte* native_format; - if (format != null) + else { native_str_id = null; } + int mouse_button = 1; + byte ret = ImGuiNative.igBeginPopupContextItem(native_str_id, mouse_button); + return ret != 0; + } + public static bool BeginPopupContextItem(string str_id, int mouse_button) + { + byte* native_str_id; + if (str_id != null) { - int format_byteCount = Encoding.UTF8.GetByteCount(format); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = format) + int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + fixed (char* str_id_ptr = str_id) { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; + int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; } } - else { native_format = null; } - fixed (Vector4* native_v = &v) - { - byte ret = ImGuiNative.igDragFloat4(native_label, native_v, v_speed, v_min, v_max, native_format, power); - return ret != 0; - } + else { native_str_id = null; } + byte ret = ImGuiNative.igBeginPopupContextItem(native_str_id, mouse_button); + return ret != 0; } - public static bool IsMousePosValid() + public static bool BeginPopupContextVoid() { - Vector2* mouse_pos = null; - byte ret = ImGuiNative.igIsMousePosValid(mouse_pos); + byte* native_str_id = null; + int mouse_button = 1; + byte ret = ImGuiNative.igBeginPopupContextVoid(native_str_id, mouse_button); return ret != 0; } - public static bool IsMousePosValid(ref Vector2 mouse_pos) + public static bool BeginPopupContextVoid(string str_id) { - fixed (Vector2* native_mouse_pos = &mouse_pos) + byte* native_str_id; + if (str_id != null) { - byte ret = ImGuiNative.igIsMousePosValid(native_mouse_pos); - return ret != 0; + int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + fixed (char* str_id_ptr = str_id) + { + int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } } + else { native_str_id = null; } + int mouse_button = 1; + byte ret = ImGuiNative.igBeginPopupContextVoid(native_str_id, mouse_button); + return ret != 0; } - public static Vector2 GetCursorScreenPos() - { - Vector2 ret = ImGuiNative.igGetCursorScreenPos(); - return ret; - } - public static bool DebugCheckVersionAndDataLayout(string version_str, uint sz_io, uint sz_style, uint sz_vec2, uint sz_vec4, uint sz_drawvert) + public static bool BeginPopupContextVoid(string str_id, int mouse_button) { - byte* native_version_str; - if (version_str != null) + byte* native_str_id; + if (str_id != null) { - int version_str_byteCount = Encoding.UTF8.GetByteCount(version_str); - byte* native_version_str_stackBytes = stackalloc byte[version_str_byteCount + 1]; - native_version_str = native_version_str_stackBytes; - fixed (char* version_str_ptr = version_str) + int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + fixed (char* str_id_ptr = str_id) { - int native_version_str_offset = Encoding.UTF8.GetBytes(version_str_ptr, version_str.Length, native_version_str, version_str_byteCount); - native_version_str[native_version_str_offset] = 0; + int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; } } - else { native_version_str = null; } - byte ret = ImGuiNative.igDebugCheckVersionAndDataLayout(native_version_str, sz_io, sz_style, sz_vec2, sz_vec4, sz_drawvert); + else { native_str_id = null; } + byte ret = ImGuiNative.igBeginPopupContextVoid(native_str_id, mouse_button); return ret != 0; } - public static void SetScrollHere() - { - float center_y_ratio = 0.5f; - ImGuiNative.igSetScrollHere(center_y_ratio); - } - public static void SetScrollHere(float center_y_ratio) - { - ImGuiNative.igSetScrollHere(center_y_ratio); - } - public static void SetScrollY(float scroll_y) - { - ImGuiNative.igSetScrollY(scroll_y); - } - public static void Dummy(Vector2 size) - { - ImGuiNative.igDummy(size); - } - public static void SetColorEditOptions(ImGuiColorEditFlags flags) - { - ImGuiNative.igSetColorEditOptions(flags); - } - public static ImGuiStoragePtr GetStateStorage() - { - ImGuiStorage* ret = ImGuiNative.igGetStateStorage(); - return new ImGuiStoragePtr(ret); - } - public static void SetScrollFromPosY(float pos_y) - { - float center_y_ratio = 0.5f; - ImGuiNative.igSetScrollFromPosY(pos_y, center_y_ratio); - } - public static void SetScrollFromPosY(float pos_y, float center_y_ratio) + public static bool BeginPopupContextWindow() { - ImGuiNative.igSetScrollFromPosY(pos_y, center_y_ratio); + byte* native_str_id = null; + int mouse_button = 1; + byte also_over_items = 1; + byte ret = ImGuiNative.igBeginPopupContextWindow(native_str_id, mouse_button, also_over_items); + return ret != 0; } - public static bool InputInt2(string label, ref int v) + public static bool BeginPopupContextWindow(string str_id) { - byte* native_label; - if (label != null) + byte* native_str_id; + if (str_id != null) { - int label_byteCount = Encoding.UTF8.GetByteCount(label); - byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; - native_label = native_label_stackBytes; - fixed (char* label_ptr = label) + int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + fixed (char* str_id_ptr = str_id) { - int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); - native_label[native_label_offset] = 0; + int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; } } - else { native_label = null; } - ImGuiInputTextFlags extra_flags = 0; - fixed (int* native_v = &v) - { - byte ret = ImGuiNative.igInputInt2(native_label, native_v, extra_flags); - return ret != 0; - } + else { native_str_id = null; } + int mouse_button = 1; + byte also_over_items = 1; + byte ret = ImGuiNative.igBeginPopupContextWindow(native_str_id, mouse_button, also_over_items); + return ret != 0; } - public static bool InputInt2(string label, ref int v, ImGuiInputTextFlags extra_flags) + public static bool BeginPopupContextWindow(string str_id, int mouse_button) { - byte* native_label; - if (label != null) + byte* native_str_id; + if (str_id != null) { - int label_byteCount = Encoding.UTF8.GetByteCount(label); - byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; - native_label = native_label_stackBytes; - fixed (char* label_ptr = label) + int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + fixed (char* str_id_ptr = str_id) { - int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); - native_label[native_label_offset] = 0; + int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; } } - else { native_label = null; } - fixed (int* native_v = &v) - { - byte ret = ImGuiNative.igInputInt2(native_label, native_v, extra_flags); - return ret != 0; - } - } - public static Vector4* GetStyleColorVec4(ImGuiCol idx) - { - Vector4* ret = ImGuiNative.igGetStyleColorVec4(idx); - return ret; - } - public static bool IsMouseHoveringRect(Vector2 r_min, Vector2 r_max) - { - byte clip = 1; - byte ret = ImGuiNative.igIsMouseHoveringRect(r_min, r_max, clip); + else { native_str_id = null; } + byte also_over_items = 1; + byte ret = ImGuiNative.igBeginPopupContextWindow(native_str_id, mouse_button, also_over_items); return ret != 0; } - public static bool IsMouseHoveringRect(Vector2 r_min, Vector2 r_max, bool clip) + public static bool BeginPopupContextWindow(string str_id, int mouse_button, bool also_over_items) { - byte native_clip = clip ? (byte)1 : (byte)0; - byte ret = ImGuiNative.igIsMouseHoveringRect(r_min, r_max, native_clip); + byte* native_str_id; + if (str_id != null) + { + int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + fixed (char* str_id_ptr = str_id) + { + int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + } + else { native_str_id = null; } + byte native_also_over_items = also_over_items ? (byte)1 : (byte)0; + byte ret = ImGuiNative.igBeginPopupContextWindow(native_str_id, mouse_button, native_also_over_items); return ret != 0; } - public static string GetClipboardText() + public static bool BeginPopupModal(string name) { - byte* ret = ImGuiNative.igGetClipboardText(); - return Util.StringFromPtr(ret); + byte* native_name; + if (name != null) + { + int name_byteCount = Encoding.UTF8.GetByteCount(name); + byte* native_name_stackBytes = stackalloc byte[name_byteCount + 1]; + native_name = native_name_stackBytes; + fixed (char* name_ptr = name) + { + int native_name_offset = Encoding.UTF8.GetBytes(name_ptr, name.Length, native_name, name_byteCount); + native_name[native_name_offset] = 0; + } + } + else { native_name = null; } + byte* p_open = null; + ImGuiWindowFlags flags = 0; + byte ret = ImGuiNative.igBeginPopupModal(native_name, p_open, flags); + return ret != 0; } - public static bool DragFloat3(string label, ref Vector3 v) + public static bool BeginPopupModal(string name, ref bool p_open) + { + byte* native_name; + if (name != null) + { + int name_byteCount = Encoding.UTF8.GetByteCount(name); + byte* native_name_stackBytes = stackalloc byte[name_byteCount + 1]; + native_name = native_name_stackBytes; + fixed (char* name_ptr = name) + { + int native_name_offset = Encoding.UTF8.GetBytes(name_ptr, name.Length, native_name, name_byteCount); + native_name[native_name_offset] = 0; + } + } + else { native_name = null; } + byte native_p_open_val = p_open ? (byte)1 : (byte)0; + byte* native_p_open = &native_p_open_val; + ImGuiWindowFlags flags = 0; + byte ret = ImGuiNative.igBeginPopupModal(native_name, native_p_open, flags); + p_open = native_p_open_val != 0; + return ret != 0; + } + public static bool BeginPopupModal(string name, ref bool p_open, ImGuiWindowFlags flags) + { + byte* native_name; + if (name != null) + { + int name_byteCount = Encoding.UTF8.GetByteCount(name); + byte* native_name_stackBytes = stackalloc byte[name_byteCount + 1]; + native_name = native_name_stackBytes; + fixed (char* name_ptr = name) + { + int native_name_offset = Encoding.UTF8.GetBytes(name_ptr, name.Length, native_name, name_byteCount); + native_name[native_name_offset] = 0; + } + } + else { native_name = null; } + byte native_p_open_val = p_open ? (byte)1 : (byte)0; + byte* native_p_open = &native_p_open_val; + byte ret = ImGuiNative.igBeginPopupModal(native_name, native_p_open, flags); + p_open = native_p_open_val != 0; + return ret != 0; + } + public static void BeginTooltip() + { + ImGuiNative.igBeginTooltip(); + } + public static void Bullet() + { + ImGuiNative.igBullet(); + } + public static void BulletText(string fmt) + { + byte* native_fmt; + if (fmt != null) + { + int fmt_byteCount = Encoding.UTF8.GetByteCount(fmt); + byte* native_fmt_stackBytes = stackalloc byte[fmt_byteCount + 1]; + native_fmt = native_fmt_stackBytes; + fixed (char* fmt_ptr = fmt) + { + int native_fmt_offset = Encoding.UTF8.GetBytes(fmt_ptr, fmt.Length, native_fmt, fmt_byteCount); + native_fmt[native_fmt_offset] = 0; + } + } + else { native_fmt = null; } + ImGuiNative.igBulletText(native_fmt); + } + public static bool Button(string label) { byte* native_label; if (label != null) @@ -588,26 +673,11 @@ namespace ImGuiNET } } else { native_label = null; } - float v_speed = 1.0f; - float v_min = 0.0f; - float v_max = 0.0f; - byte* native_format; - int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = "%.3f") - { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; - } - float power = 1.0f; - fixed (Vector3* native_v = &v) - { - byte ret = ImGuiNative.igDragFloat3(native_label, native_v, v_speed, v_min, v_max, native_format, power); - return ret != 0; - } + Vector2 size = new Vector2(); + byte ret = ImGuiNative.igButton(native_label, size); + return ret != 0; } - public static bool DragFloat3(string label, ref Vector3 v, float v_speed) + public static bool Button(string label, Vector2 size) { byte* native_label; if (label != null) @@ -622,25 +692,56 @@ namespace ImGuiNET } } else { native_label = null; } - float v_min = 0.0f; - float v_max = 0.0f; - byte* native_format; - int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = "%.3f") + byte ret = ImGuiNative.igButton(native_label, size); + return ret != 0; + } + public static float CalcItemWidth() + { + float ret = ImGuiNative.igCalcItemWidth(); + return ret; + } + public static Vector2 CalcTextSize(string text) + { + byte* native_text; + if (text != null) + { + int text_byteCount = Encoding.UTF8.GetByteCount(text); + byte* native_text_stackBytes = stackalloc byte[text_byteCount + 1]; + native_text = native_text_stackBytes; + fixed (char* text_ptr = text) { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; + int native_text_offset = Encoding.UTF8.GetBytes(text_ptr, text.Length, native_text, text_byteCount); + native_text[native_text_offset] = 0; } - float power = 1.0f; - fixed (Vector3* native_v = &v) - { - byte ret = ImGuiNative.igDragFloat3(native_label, native_v, v_speed, v_min, v_max, native_format, power); - return ret != 0; } + else { native_text = null; } + byte* native_text_end = null; + byte hide_text_after_double_hash = 0; + float wrap_width = -1.0f; + Vector2 ret = ImGuiNative.igCalcTextSize(native_text, native_text_end, hide_text_after_double_hash, wrap_width); + return ret; } - public static bool DragFloat3(string label, ref Vector3 v, float v_speed, float v_min) + public static void CaptureKeyboardFromApp() + { + byte capture = 1; + ImGuiNative.igCaptureKeyboardFromApp(capture); + } + public static void CaptureKeyboardFromApp(bool capture) + { + byte native_capture = capture ? (byte)1 : (byte)0; + ImGuiNative.igCaptureKeyboardFromApp(native_capture); + } + public static void CaptureMouseFromApp() + { + byte capture = 1; + ImGuiNative.igCaptureMouseFromApp(capture); + } + public static void CaptureMouseFromApp(bool capture) + { + byte native_capture = capture ? (byte)1 : (byte)0; + ImGuiNative.igCaptureMouseFromApp(native_capture); + } + public static bool Checkbox(string label, ref bool v) { byte* native_label; if (label != null) @@ -655,24 +756,13 @@ namespace ImGuiNET } } else { native_label = null; } - float v_max = 0.0f; - byte* native_format; - int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = "%.3f") - { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; - } - float power = 1.0f; - fixed (Vector3* native_v = &v) - { - byte ret = ImGuiNative.igDragFloat3(native_label, native_v, v_speed, v_min, v_max, native_format, power); - return ret != 0; - } + byte native_v_val = v ? (byte)1 : (byte)0; + byte* native_v = &native_v_val; + byte ret = ImGuiNative.igCheckbox(native_label, native_v); + v = native_v_val != 0; + return ret != 0; } - public static bool DragFloat3(string label, ref Vector3 v, float v_speed, float v_min, float v_max) + public static bool CheckboxFlags(string label, ref uint flags, uint flags_value) { byte* native_label; if (label != null) @@ -687,23 +777,17 @@ namespace ImGuiNET } } else { native_label = null; } - byte* native_format; - int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = "%.3f") - { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; - } - float power = 1.0f; - fixed (Vector3* native_v = &v) + fixed (uint* native_flags = &flags) { - byte ret = ImGuiNative.igDragFloat3(native_label, native_v, v_speed, v_min, v_max, native_format, power); + byte ret = ImGuiNative.igCheckboxFlags(native_label, native_flags, flags_value); return ret != 0; } } - public static bool DragFloat3(string label, ref Vector3 v, float v_speed, float v_min, float v_max, string format) + public static void CloseCurrentPopup() + { + ImGuiNative.igCloseCurrentPopup(); + } + public static bool CollapsingHeader(string label) { byte* native_label; if (label != null) @@ -718,27 +802,29 @@ namespace ImGuiNET } } else { native_label = null; } - byte* native_format; - if (format != null) + ImGuiTreeNodeFlags flags = 0; + byte ret = ImGuiNative.igCollapsingHeader(native_label, flags); + return ret != 0; + } + public static bool CollapsingHeader(string label, ImGuiTreeNodeFlags flags) + { + byte* native_label; + if (label != null) { - int format_byteCount = Encoding.UTF8.GetByteCount(format); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = format) + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + fixed (char* label_ptr = label) { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; } } - else { native_format = null; } - float power = 1.0f; - fixed (Vector3* native_v = &v) - { - byte ret = ImGuiNative.igDragFloat3(native_label, native_v, v_speed, v_min, v_max, native_format, power); - return ret != 0; - } + else { native_label = null; } + byte ret = ImGuiNative.igCollapsingHeader(native_label, flags); + return ret != 0; } - public static bool DragFloat3(string label, ref Vector3 v, float v_speed, float v_min, float v_max, string format, float power) + public static bool CollapsingHeader(string label, ref bool p_open) { byte* native_label; if (label != null) @@ -753,136 +839,128 @@ namespace ImGuiNET } } else { native_label = null; } - byte* native_format; - if (format != null) - { - int format_byteCount = Encoding.UTF8.GetByteCount(format); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = format) - { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; - } - } - else { native_format = null; } - fixed (Vector3* native_v = &v) - { - byte ret = ImGuiNative.igDragFloat3(native_label, native_v, v_speed, v_min, v_max, native_format, power); - return ret != 0; - } + byte native_p_open_val = p_open ? (byte)1 : (byte)0; + byte* native_p_open = &native_p_open_val; + ImGuiTreeNodeFlags flags = 0; + byte ret = ImGuiNative.igCollapsingHeaderBoolPtr(native_label, native_p_open, flags); + p_open = native_p_open_val != 0; + return ret != 0; } - public static void Value(string prefix, bool b) + public static bool CollapsingHeader(string label, ref bool p_open, ImGuiTreeNodeFlags flags) { - byte* native_prefix; - if (prefix != null) + byte* native_label; + if (label != null) { - int prefix_byteCount = Encoding.UTF8.GetByteCount(prefix); - byte* native_prefix_stackBytes = stackalloc byte[prefix_byteCount + 1]; - native_prefix = native_prefix_stackBytes; - fixed (char* prefix_ptr = prefix) + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + fixed (char* label_ptr = label) { - int native_prefix_offset = Encoding.UTF8.GetBytes(prefix_ptr, prefix.Length, native_prefix, prefix_byteCount); - native_prefix[native_prefix_offset] = 0; + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; } } - else { native_prefix = null; } - byte native_b = b ? (byte)1 : (byte)0; - ImGuiNative.igValueBool(native_prefix, native_b); + else { native_label = null; } + byte native_p_open_val = p_open ? (byte)1 : (byte)0; + byte* native_p_open = &native_p_open_val; + byte ret = ImGuiNative.igCollapsingHeaderBoolPtr(native_label, native_p_open, flags); + p_open = native_p_open_val != 0; + return ret != 0; } - public static void Value(string prefix, int v) + public static bool ColorButton(string desc_id, Vector4 col) { - byte* native_prefix; - if (prefix != null) + byte* native_desc_id; + if (desc_id != null) { - int prefix_byteCount = Encoding.UTF8.GetByteCount(prefix); - byte* native_prefix_stackBytes = stackalloc byte[prefix_byteCount + 1]; - native_prefix = native_prefix_stackBytes; - fixed (char* prefix_ptr = prefix) + int desc_id_byteCount = Encoding.UTF8.GetByteCount(desc_id); + byte* native_desc_id_stackBytes = stackalloc byte[desc_id_byteCount + 1]; + native_desc_id = native_desc_id_stackBytes; + fixed (char* desc_id_ptr = desc_id) { - int native_prefix_offset = Encoding.UTF8.GetBytes(prefix_ptr, prefix.Length, native_prefix, prefix_byteCount); - native_prefix[native_prefix_offset] = 0; + int native_desc_id_offset = Encoding.UTF8.GetBytes(desc_id_ptr, desc_id.Length, native_desc_id, desc_id_byteCount); + native_desc_id[native_desc_id_offset] = 0; } } - else { native_prefix = null; } - ImGuiNative.igValueInt(native_prefix, v); + else { native_desc_id = null; } + ImGuiColorEditFlags flags = 0; + Vector2 size = new Vector2(); + byte ret = ImGuiNative.igColorButton(native_desc_id, col, flags, size); + return ret != 0; } - public static void Value(string prefix, uint v) + public static bool ColorButton(string desc_id, Vector4 col, ImGuiColorEditFlags flags) { - byte* native_prefix; - if (prefix != null) + byte* native_desc_id; + if (desc_id != null) { - int prefix_byteCount = Encoding.UTF8.GetByteCount(prefix); - byte* native_prefix_stackBytes = stackalloc byte[prefix_byteCount + 1]; - native_prefix = native_prefix_stackBytes; - fixed (char* prefix_ptr = prefix) + int desc_id_byteCount = Encoding.UTF8.GetByteCount(desc_id); + byte* native_desc_id_stackBytes = stackalloc byte[desc_id_byteCount + 1]; + native_desc_id = native_desc_id_stackBytes; + fixed (char* desc_id_ptr = desc_id) { - int native_prefix_offset = Encoding.UTF8.GetBytes(prefix_ptr, prefix.Length, native_prefix, prefix_byteCount); - native_prefix[native_prefix_offset] = 0; + int native_desc_id_offset = Encoding.UTF8.GetBytes(desc_id_ptr, desc_id.Length, native_desc_id, desc_id_byteCount); + native_desc_id[native_desc_id_offset] = 0; } } - else { native_prefix = null; } - ImGuiNative.igValueUint(native_prefix, v); + else { native_desc_id = null; } + Vector2 size = new Vector2(); + byte ret = ImGuiNative.igColorButton(native_desc_id, col, flags, size); + return ret != 0; } - public static void Value(string prefix, float v) + public static bool ColorButton(string desc_id, Vector4 col, ImGuiColorEditFlags flags, Vector2 size) { - byte* native_prefix; - if (prefix != null) + byte* native_desc_id; + if (desc_id != null) { - int prefix_byteCount = Encoding.UTF8.GetByteCount(prefix); - byte* native_prefix_stackBytes = stackalloc byte[prefix_byteCount + 1]; - native_prefix = native_prefix_stackBytes; - fixed (char* prefix_ptr = prefix) + int desc_id_byteCount = Encoding.UTF8.GetByteCount(desc_id); + byte* native_desc_id_stackBytes = stackalloc byte[desc_id_byteCount + 1]; + native_desc_id = native_desc_id_stackBytes; + fixed (char* desc_id_ptr = desc_id) { - int native_prefix_offset = Encoding.UTF8.GetBytes(prefix_ptr, prefix.Length, native_prefix, prefix_byteCount); - native_prefix[native_prefix_offset] = 0; + int native_desc_id_offset = Encoding.UTF8.GetBytes(desc_id_ptr, desc_id.Length, native_desc_id, desc_id_byteCount); + native_desc_id[native_desc_id_offset] = 0; } } - else { native_prefix = null; } - byte* native_float_format = null; - ImGuiNative.igValueFloat(native_prefix, v, native_float_format); + else { native_desc_id = null; } + byte ret = ImGuiNative.igColorButton(native_desc_id, col, flags, size); + return ret != 0; } - public static void Value(string prefix, float v, string float_format) + public static uint ColorConvertFloat4ToU32(Vector4 @in) { - byte* native_prefix; - if (prefix != null) + uint ret = ImGuiNative.igColorConvertFloat4ToU32(@in); + return ret; + } + public static void ColorConvertHSVtoRGB(float h, float s, float v, out float out_r, out float out_g, out float out_b) + { + fixed (float* native_out_r = &out_r) { - int prefix_byteCount = Encoding.UTF8.GetByteCount(prefix); - byte* native_prefix_stackBytes = stackalloc byte[prefix_byteCount + 1]; - native_prefix = native_prefix_stackBytes; - fixed (char* prefix_ptr = prefix) + fixed (float* native_out_g = &out_g) { - int native_prefix_offset = Encoding.UTF8.GetBytes(prefix_ptr, prefix.Length, native_prefix, prefix_byteCount); - native_prefix[native_prefix_offset] = 0; + fixed (float* native_out_b = &out_b) + { + ImGuiNative.igColorConvertHSVtoRGB(h, s, v, native_out_r, native_out_g, native_out_b); + } } } - else { native_prefix = null; } - byte* native_float_format; - if (float_format != null) + } + public static void ColorConvertRGBtoHSV(float r, float g, float b, out float out_h, out float out_s, out float out_v) + { + fixed (float* native_out_h = &out_h) { - int float_format_byteCount = Encoding.UTF8.GetByteCount(float_format); - byte* native_float_format_stackBytes = stackalloc byte[float_format_byteCount + 1]; - native_float_format = native_float_format_stackBytes; - fixed (char* float_format_ptr = float_format) + fixed (float* native_out_s = &out_s) { - int native_float_format_offset = Encoding.UTF8.GetBytes(float_format_ptr, float_format.Length, native_float_format, float_format_byteCount); - native_float_format[native_float_format_offset] = 0; + fixed (float* native_out_v = &out_v) + { + ImGuiNative.igColorConvertRGBtoHSV(r, g, b, native_out_h, native_out_s, native_out_v); + } } } - else { native_float_format = null; } - ImGuiNative.igValueFloat(native_prefix, v, native_float_format); - } - public static void SetStateStorage(ImGuiStoragePtr storage) - { - ImGuiStorage* native_storage = storage.NativePtr; - ImGuiNative.igSetStateStorage(native_storage); } - public static Vector2 GetItemRectMax() + public static Vector4 ColorConvertU32ToFloat4(uint @in) { - Vector2 ret = ImGuiNative.igGetItemRectMax(); + Vector4 ret = ImGuiNative.igColorConvertU32ToFloat4(@in); return ret; } - public static bool ShowStyleSelector(string label) + public static bool ColorEdit3(string label, ref Vector3 col) { byte* native_label; if (label != null) @@ -897,37 +975,14 @@ namespace ImGuiNET } } else { native_label = null; } - byte ret = ImGuiNative.igShowStyleSelector(native_label); - return ret != 0; - } - public static bool IsItemDeactivated() - { - byte ret = ImGuiNative.igIsItemDeactivated(); - return ret != 0; - } - public static void PushStyleVar(ImGuiStyleVar idx, float val) - { - ImGuiNative.igPushStyleVarFloat(idx, val); - } - public static void PushStyleVar(ImGuiStyleVar idx, Vector2 val) - { - ImGuiNative.igPushStyleVarVec2(idx, val); - } - public static string SaveIniSettingsToMemory() - { - uint* out_ini_size = null; - byte* ret = ImGuiNative.igSaveIniSettingsToMemory(out_ini_size); - return Util.StringFromPtr(ret); - } - public static string SaveIniSettingsToMemory(out uint out_ini_size) - { - fixed (uint* native_out_ini_size = &out_ini_size) + ImGuiColorEditFlags flags = 0; + fixed (Vector3* native_col = &col) { - byte* ret = ImGuiNative.igSaveIniSettingsToMemory(native_out_ini_size); - return Util.StringFromPtr(ret); + byte ret = ImGuiNative.igColorEdit3(native_label, native_col, flags); + return ret != 0; } } - public static bool DragIntRange2(string label, ref int v_current_min, ref int v_current_max) + public static bool ColorEdit3(string label, ref Vector3 col, ImGuiColorEditFlags flags) { byte* native_label; if (label != null) @@ -942,29 +997,13 @@ namespace ImGuiNET } } else { native_label = null; } - float v_speed = 1.0f; - int v_min = 0; - int v_max = 0; - byte* native_format; - int format_byteCount = Encoding.UTF8.GetByteCount("%d"); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = "%d") - { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; - } - byte* native_format_max = null; - fixed (int* native_v_current_min = &v_current_min) + fixed (Vector3* native_col = &col) { - fixed (int* native_v_current_max = &v_current_max) - { - byte ret = ImGuiNative.igDragIntRange2(native_label, native_v_current_min, native_v_current_max, v_speed, v_min, v_max, native_format, native_format_max); - return ret != 0; - } + byte ret = ImGuiNative.igColorEdit3(native_label, native_col, flags); + return ret != 0; } } - public static bool DragIntRange2(string label, ref int v_current_min, ref int v_current_max, float v_speed) + public static bool ColorEdit4(string label, ref Vector4 col) { byte* native_label; if (label != null) @@ -979,28 +1018,14 @@ namespace ImGuiNET } } else { native_label = null; } - int v_min = 0; - int v_max = 0; - byte* native_format; - int format_byteCount = Encoding.UTF8.GetByteCount("%d"); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = "%d") - { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; - } - byte* native_format_max = null; - fixed (int* native_v_current_min = &v_current_min) + ImGuiColorEditFlags flags = 0; + fixed (Vector4* native_col = &col) { - fixed (int* native_v_current_max = &v_current_max) - { - byte ret = ImGuiNative.igDragIntRange2(native_label, native_v_current_min, native_v_current_max, v_speed, v_min, v_max, native_format, native_format_max); - return ret != 0; - } + byte ret = ImGuiNative.igColorEdit4(native_label, native_col, flags); + return ret != 0; } } - public static bool DragIntRange2(string label, ref int v_current_min, ref int v_current_max, float v_speed, int v_min) + public static bool ColorEdit4(string label, ref Vector4 col, ImGuiColorEditFlags flags) { byte* native_label; if (label != null) @@ -1015,27 +1040,13 @@ namespace ImGuiNET } } else { native_label = null; } - int v_max = 0; - byte* native_format; - int format_byteCount = Encoding.UTF8.GetByteCount("%d"); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = "%d") - { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; - } - byte* native_format_max = null; - fixed (int* native_v_current_min = &v_current_min) + fixed (Vector4* native_col = &col) { - fixed (int* native_v_current_max = &v_current_max) - { - byte ret = ImGuiNative.igDragIntRange2(native_label, native_v_current_min, native_v_current_max, v_speed, v_min, v_max, native_format, native_format_max); - return ret != 0; - } + byte ret = ImGuiNative.igColorEdit4(native_label, native_col, flags); + return ret != 0; } } - public static bool DragIntRange2(string label, ref int v_current_min, ref int v_current_max, float v_speed, int v_min, int v_max) + public static bool ColorPicker3(string label, ref Vector3 col) { byte* native_label; if (label != null) @@ -1050,26 +1061,14 @@ namespace ImGuiNET } } else { native_label = null; } - byte* native_format; - int format_byteCount = Encoding.UTF8.GetByteCount("%d"); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = "%d") - { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; - } - byte* native_format_max = null; - fixed (int* native_v_current_min = &v_current_min) + ImGuiColorEditFlags flags = 0; + fixed (Vector3* native_col = &col) { - fixed (int* native_v_current_max = &v_current_max) - { - byte ret = ImGuiNative.igDragIntRange2(native_label, native_v_current_min, native_v_current_max, v_speed, v_min, v_max, native_format, native_format_max); - return ret != 0; - } + byte ret = ImGuiNative.igColorPicker3(native_label, native_col, flags); + return ret != 0; } } - public static bool DragIntRange2(string label, ref int v_current_min, ref int v_current_max, float v_speed, int v_min, int v_max, string format) + public static bool ColorPicker3(string label, ref Vector3 col, ImGuiColorEditFlags flags) { byte* native_label; if (label != null) @@ -1084,30 +1083,36 @@ namespace ImGuiNET } } else { native_label = null; } - byte* native_format; - if (format != null) + fixed (Vector3* native_col = &col) { - int format_byteCount = Encoding.UTF8.GetByteCount(format); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = format) - { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; - } + byte ret = ImGuiNative.igColorPicker3(native_label, native_col, flags); + return ret != 0; } - else { native_format = null; } - byte* native_format_max = null; - fixed (int* native_v_current_min = &v_current_min) + } + public static bool ColorPicker4(string label, ref Vector4 col) + { + byte* native_label; + if (label != null) { - fixed (int* native_v_current_max = &v_current_max) + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + fixed (char* label_ptr = label) { - byte ret = ImGuiNative.igDragIntRange2(native_label, native_v_current_min, native_v_current_max, v_speed, v_min, v_max, native_format, native_format_max); - return ret != 0; + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; } } + else { native_label = null; } + ImGuiColorEditFlags flags = 0; + float* ref_col = null; + fixed (Vector4* native_col = &col) + { + byte ret = ImGuiNative.igColorPicker4(native_label, native_col, flags, ref_col); + return ret != 0; + } } - public static bool DragIntRange2(string label, ref int v_current_min, ref int v_current_max, float v_speed, int v_min, int v_max, string format, string format_max) + public static bool ColorPicker4(string label, ref Vector4 col, ImGuiColorEditFlags flags) { byte* native_label; if (label != null) @@ -1122,81 +1127,87 @@ namespace ImGuiNET } } else { native_label = null; } - byte* native_format; - if (format != null) + float* ref_col = null; + fixed (Vector4* native_col = &col) { - int format_byteCount = Encoding.UTF8.GetByteCount(format); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = format) - { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; - } + byte ret = ImGuiNative.igColorPicker4(native_label, native_col, flags, ref_col); + return ret != 0; } - else { native_format = null; } - byte* native_format_max; - if (format_max != null) + } + public static bool ColorPicker4(string label, ref Vector4 col, ImGuiColorEditFlags flags, ref float ref_col) + { + byte* native_label; + if (label != null) { - int format_max_byteCount = Encoding.UTF8.GetByteCount(format_max); - byte* native_format_max_stackBytes = stackalloc byte[format_max_byteCount + 1]; - native_format_max = native_format_max_stackBytes; - fixed (char* format_max_ptr = format_max) + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + fixed (char* label_ptr = label) { - int native_format_max_offset = Encoding.UTF8.GetBytes(format_max_ptr, format_max.Length, native_format_max, format_max_byteCount); - native_format_max[native_format_max_offset] = 0; + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; } } - else { native_format_max = null; } - fixed (int* native_v_current_min = &v_current_min) + else { native_label = null; } + fixed (Vector4* native_col = &col) { - fixed (int* native_v_current_max = &v_current_max) + fixed (float* native_ref_col = &ref_col) { - byte ret = ImGuiNative.igDragIntRange2(native_label, native_v_current_min, native_v_current_max, v_speed, v_min, v_max, native_format, native_format_max); + byte ret = ImGuiNative.igColorPicker4(native_label, native_col, flags, native_ref_col); return ret != 0; } } } - public static void Unindent() - { - float indent_w = 0.0f; - ImGuiNative.igUnindent(indent_w); - } - public static void Unindent(float indent_w) + public static void Columns() { - ImGuiNative.igUnindent(indent_w); + int count = 1; + byte* native_id = null; + byte border = 1; + ImGuiNative.igColumns(count, native_id, border); } - public static void PopAllowKeyboardFocus() + public static void Columns(int count) { - ImGuiNative.igPopAllowKeyboardFocus(); + byte* native_id = null; + byte border = 1; + ImGuiNative.igColumns(count, native_id, border); } - public static void LoadIniSettingsFromDisk(string ini_filename) + public static void Columns(int count, string id) { - byte* native_ini_filename; - if (ini_filename != null) + byte* native_id; + if (id != null) { - int ini_filename_byteCount = Encoding.UTF8.GetByteCount(ini_filename); - byte* native_ini_filename_stackBytes = stackalloc byte[ini_filename_byteCount + 1]; - native_ini_filename = native_ini_filename_stackBytes; - fixed (char* ini_filename_ptr = ini_filename) + int id_byteCount = Encoding.UTF8.GetByteCount(id); + byte* native_id_stackBytes = stackalloc byte[id_byteCount + 1]; + native_id = native_id_stackBytes; + fixed (char* id_ptr = id) { - int native_ini_filename_offset = Encoding.UTF8.GetBytes(ini_filename_ptr, ini_filename.Length, native_ini_filename, ini_filename_byteCount); - native_ini_filename[native_ini_filename_offset] = 0; + int native_id_offset = Encoding.UTF8.GetBytes(id_ptr, id.Length, native_id, id_byteCount); + native_id[native_id_offset] = 0; } } - else { native_ini_filename = null; } - ImGuiNative.igLoadIniSettingsFromDisk(native_ini_filename); - } - public static Vector2 GetCursorStartPos() - { - Vector2 ret = ImGuiNative.igGetCursorStartPos(); - return ret; + else { native_id = null; } + byte border = 1; + ImGuiNative.igColumns(count, native_id, border); } - public static void SetCursorScreenPos(Vector2 screen_pos) + public static void Columns(int count, string id, bool border) { - ImGuiNative.igSetCursorScreenPos(screen_pos); + byte* native_id; + if (id != null) + { + int id_byteCount = Encoding.UTF8.GetByteCount(id); + byte* native_id_stackBytes = stackalloc byte[id_byteCount + 1]; + native_id = native_id_stackBytes; + fixed (char* id_ptr = id) + { + int native_id_offset = Encoding.UTF8.GetBytes(id_ptr, id.Length, native_id, id_byteCount); + native_id[native_id_offset] = 0; + } + } + else { native_id = null; } + byte native_border = border ? (byte)1 : (byte)0; + ImGuiNative.igColumns(count, native_id, native_border); } - public static bool InputInt4(string label, ref int v) + public static bool Combo(string label, ref int current_item, string[] items, int items_count) { byte* native_label; if (label != null) @@ -1211,45 +1222,41 @@ namespace ImGuiNET } } else { native_label = null; } - ImGuiInputTextFlags extra_flags = 0; - fixed (int* native_v = &v) + int* items_byteCounts = stackalloc int[items.Length]; + int items_byteCount = 0; + for (int i = 0; i < items.Length; i++) { - byte ret = ImGuiNative.igInputInt4(native_label, native_v, extra_flags); - return ret != 0; + string s = items[i]; + items_byteCounts[i] = Encoding.UTF8.GetByteCount(s); + items_byteCount += items_byteCounts[i] + 1; } - } - public static bool InputInt4(string label, ref int v, ImGuiInputTextFlags extra_flags) - { - byte* native_label; - if (label != null) + byte* native_items_data = stackalloc byte[items_byteCount]; + int offset = 0; + for (int i = 0; i < items.Length; i++) { - int label_byteCount = Encoding.UTF8.GetByteCount(label); - byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; - native_label = native_label_stackBytes; - fixed (char* label_ptr = label) + string s = items[i]; + fixed (char* sPtr = s) { - int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); - native_label[native_label_offset] = 0; + offset += Encoding.UTF8.GetBytes(sPtr, s.Length, native_items_data + offset, items_byteCounts[i]); + native_items_data[offset] = 0; + offset += 1; } } - else { native_label = null; } - fixed (int* native_v = &v) + byte** native_items = stackalloc byte*[items.Length]; + offset = 0; + for (int i = 0; i < items.Length; i++) { - byte ret = ImGuiNative.igInputInt4(native_label, native_v, extra_flags); + native_items[i] = &native_items_data[offset]; + offset += items_byteCounts[i] + 1; + } + int popup_max_height_in_items = -1; + fixed (int* native_current_item = ¤t_item) + { + byte ret = ImGuiNative.igCombo(native_label, native_current_item, native_items, items_count, popup_max_height_in_items); return ret != 0; } } - public static bool IsRectVisible(Vector2 size) - { - byte ret = ImGuiNative.igIsRectVisible(size); - return ret != 0; - } - public static bool IsRectVisible(Vector2 rect_min, Vector2 rect_max) - { - byte ret = ImGuiNative.igIsRectVisibleVec2(rect_min, rect_max); - return ret != 0; - } - public static void LabelText(string label, string fmt) + public static bool Combo(string label, ref int current_item, string[] items, int items_count, int popup_max_height_in_items) { byte* native_label; if (label != null) @@ -1264,65 +1271,40 @@ namespace ImGuiNET } } else { native_label = null; } - byte* native_fmt; - if (fmt != null) + int* items_byteCounts = stackalloc int[items.Length]; + int items_byteCount = 0; + for (int i = 0; i < items.Length; i++) { - int fmt_byteCount = Encoding.UTF8.GetByteCount(fmt); - byte* native_fmt_stackBytes = stackalloc byte[fmt_byteCount + 1]; - native_fmt = native_fmt_stackBytes; - fixed (char* fmt_ptr = fmt) - { - int native_fmt_offset = Encoding.UTF8.GetBytes(fmt_ptr, fmt.Length, native_fmt, fmt_byteCount); - native_fmt[native_fmt_offset] = 0; - } - } - else { native_fmt = null; } - ImGuiNative.igLabelText(native_label, native_fmt); - } - public static void LogFinish() - { - ImGuiNative.igLogFinish(); - } - public static bool IsKeyPressed(int user_key_index) - { - byte repeat = 1; - byte ret = ImGuiNative.igIsKeyPressed(user_key_index, repeat); - return ret != 0; - } - public static bool IsKeyPressed(int user_key_index, bool repeat) - { - byte native_repeat = repeat ? (byte)1 : (byte)0; - byte ret = ImGuiNative.igIsKeyPressed(user_key_index, native_repeat); - return ret != 0; - } - public static float GetColumnOffset() - { - int column_index = -1; - float ret = ImGuiNative.igGetColumnOffset(column_index); - return ret; - } - public static float GetColumnOffset(int column_index) - { - float ret = ImGuiNative.igGetColumnOffset(column_index); - return ret; - } - public static void SetNextWindowCollapsed(bool collapsed) - { - byte native_collapsed = collapsed ? (byte)1 : (byte)0; - ImGuiCond cond = 0; - ImGuiNative.igSetNextWindowCollapsed(native_collapsed, cond); - } - public static void SetNextWindowCollapsed(bool collapsed, ImGuiCond cond) - { - byte native_collapsed = collapsed ? (byte)1 : (byte)0; - ImGuiNative.igSetNextWindowCollapsed(native_collapsed, cond); - } - public static IntPtr GetCurrentContext() - { - IntPtr ret = ImGuiNative.igGetCurrentContext(); - return ret; + string s = items[i]; + items_byteCounts[i] = Encoding.UTF8.GetByteCount(s); + items_byteCount += items_byteCounts[i] + 1; + } + byte* native_items_data = stackalloc byte[items_byteCount]; + int offset = 0; + for (int i = 0; i < items.Length; i++) + { + string s = items[i]; + fixed (char* sPtr = s) + { + offset += Encoding.UTF8.GetBytes(sPtr, s.Length, native_items_data + offset, items_byteCounts[i]); + native_items_data[offset] = 0; + offset += 1; + } + } + byte** native_items = stackalloc byte*[items.Length]; + offset = 0; + for (int i = 0; i < items.Length; i++) + { + native_items[i] = &native_items_data[offset]; + offset += items_byteCounts[i] + 1; + } + fixed (int* native_current_item = ¤t_item) + { + byte ret = ImGuiNative.igCombo(native_label, native_current_item, native_items, items_count, popup_max_height_in_items); + return ret != 0; + } } - public static bool SmallButton(string label) + public static bool Combo(string label, ref int current_item, string items_separated_by_zeros) { byte* native_label; if (label != null) @@ -1337,108 +1319,100 @@ namespace ImGuiNET } } else { native_label = null; } - byte ret = ImGuiNative.igSmallButton(native_label); - return ret != 0; - } - public static bool OpenPopupOnItemClick() - { - byte* native_str_id = null; - int mouse_button = 1; - byte ret = ImGuiNative.igOpenPopupOnItemClick(native_str_id, mouse_button); - return ret != 0; - } - public static bool OpenPopupOnItemClick(string str_id) - { - byte* native_str_id; - if (str_id != null) + byte* native_items_separated_by_zeros; + if (items_separated_by_zeros != null) { - int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); - byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; - native_str_id = native_str_id_stackBytes; - fixed (char* str_id_ptr = str_id) + int items_separated_by_zeros_byteCount = Encoding.UTF8.GetByteCount(items_separated_by_zeros); + byte* native_items_separated_by_zeros_stackBytes = stackalloc byte[items_separated_by_zeros_byteCount + 1]; + native_items_separated_by_zeros = native_items_separated_by_zeros_stackBytes; + fixed (char* items_separated_by_zeros_ptr = items_separated_by_zeros) { - int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); - native_str_id[native_str_id_offset] = 0; + int native_items_separated_by_zeros_offset = Encoding.UTF8.GetBytes(items_separated_by_zeros_ptr, items_separated_by_zeros.Length, native_items_separated_by_zeros, items_separated_by_zeros_byteCount); + native_items_separated_by_zeros[native_items_separated_by_zeros_offset] = 0; } } - else { native_str_id = null; } - int mouse_button = 1; - byte ret = ImGuiNative.igOpenPopupOnItemClick(native_str_id, mouse_button); - return ret != 0; + else { native_items_separated_by_zeros = null; } + int popup_max_height_in_items = -1; + fixed (int* native_current_item = ¤t_item) + { + byte ret = ImGuiNative.igComboStr(native_label, native_current_item, native_items_separated_by_zeros, popup_max_height_in_items); + return ret != 0; + } } - public static bool OpenPopupOnItemClick(string str_id, int mouse_button) + public static bool Combo(string label, ref int current_item, string items_separated_by_zeros, int popup_max_height_in_items) { - byte* native_str_id; - if (str_id != null) + byte* native_label; + if (label != null) { - int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); - byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; - native_str_id = native_str_id_stackBytes; - fixed (char* str_id_ptr = str_id) + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + fixed (char* label_ptr = label) { - int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); - native_str_id[native_str_id_offset] = 0; + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; } } - else { native_str_id = null; } - byte ret = ImGuiNative.igOpenPopupOnItemClick(native_str_id, mouse_button); - return ret != 0; - } - public static bool IsAnyMouseDown() - { - byte ret = ImGuiNative.igIsAnyMouseDown(); - return ret != 0; - } - public static bool ImageButton(IntPtr user_texture_id, Vector2 size) - { - Vector2 uv0 = new Vector2(); - Vector2 uv1 = new Vector2(1, 1); - int frame_padding = -1; - Vector4 bg_col = new Vector4(); - Vector4 tint_col = new Vector4(1, 1, 1, 1); - byte ret = ImGuiNative.igImageButton(user_texture_id, size, uv0, uv1, frame_padding, bg_col, tint_col); - return ret != 0; - } - public static bool ImageButton(IntPtr user_texture_id, Vector2 size, Vector2 uv0) - { - Vector2 uv1 = new Vector2(1, 1); - int frame_padding = -1; - Vector4 bg_col = new Vector4(); - Vector4 tint_col = new Vector4(1, 1, 1, 1); - byte ret = ImGuiNative.igImageButton(user_texture_id, size, uv0, uv1, frame_padding, bg_col, tint_col); - return ret != 0; + else { native_label = null; } + byte* native_items_separated_by_zeros; + if (items_separated_by_zeros != null) + { + int items_separated_by_zeros_byteCount = Encoding.UTF8.GetByteCount(items_separated_by_zeros); + byte* native_items_separated_by_zeros_stackBytes = stackalloc byte[items_separated_by_zeros_byteCount + 1]; + native_items_separated_by_zeros = native_items_separated_by_zeros_stackBytes; + fixed (char* items_separated_by_zeros_ptr = items_separated_by_zeros) + { + int native_items_separated_by_zeros_offset = Encoding.UTF8.GetBytes(items_separated_by_zeros_ptr, items_separated_by_zeros.Length, native_items_separated_by_zeros, items_separated_by_zeros_byteCount); + native_items_separated_by_zeros[native_items_separated_by_zeros_offset] = 0; + } + } + else { native_items_separated_by_zeros = null; } + fixed (int* native_current_item = ¤t_item) + { + byte ret = ImGuiNative.igComboStr(native_label, native_current_item, native_items_separated_by_zeros, popup_max_height_in_items); + return ret != 0; + } } - public static bool ImageButton(IntPtr user_texture_id, Vector2 size, Vector2 uv0, Vector2 uv1) + public static IntPtr CreateContext() { - int frame_padding = -1; - Vector4 bg_col = new Vector4(); - Vector4 tint_col = new Vector4(1, 1, 1, 1); - byte ret = ImGuiNative.igImageButton(user_texture_id, size, uv0, uv1, frame_padding, bg_col, tint_col); - return ret != 0; + ImFontAtlas* shared_font_atlas = null; + IntPtr ret = ImGuiNative.igCreateContext(shared_font_atlas); + return ret; } - public static bool ImageButton(IntPtr user_texture_id, Vector2 size, Vector2 uv0, Vector2 uv1, int frame_padding) + public static IntPtr CreateContext(ImFontAtlasPtr shared_font_atlas) { - Vector4 bg_col = new Vector4(); - Vector4 tint_col = new Vector4(1, 1, 1, 1); - byte ret = ImGuiNative.igImageButton(user_texture_id, size, uv0, uv1, frame_padding, bg_col, tint_col); - return ret != 0; + ImFontAtlas* native_shared_font_atlas = shared_font_atlas.NativePtr; + IntPtr ret = ImGuiNative.igCreateContext(native_shared_font_atlas); + return ret; } - public static bool ImageButton(IntPtr user_texture_id, Vector2 size, Vector2 uv0, Vector2 uv1, int frame_padding, Vector4 bg_col) + public static bool DebugCheckVersionAndDataLayout(string version_str, uint sz_io, uint sz_style, uint sz_vec2, uint sz_vec4, uint sz_drawvert) { - Vector4 tint_col = new Vector4(1, 1, 1, 1); - byte ret = ImGuiNative.igImageButton(user_texture_id, size, uv0, uv1, frame_padding, bg_col, tint_col); + byte* native_version_str; + if (version_str != null) + { + int version_str_byteCount = Encoding.UTF8.GetByteCount(version_str); + byte* native_version_str_stackBytes = stackalloc byte[version_str_byteCount + 1]; + native_version_str = native_version_str_stackBytes; + fixed (char* version_str_ptr = version_str) + { + int native_version_str_offset = Encoding.UTF8.GetBytes(version_str_ptr, version_str.Length, native_version_str, version_str_byteCount); + native_version_str[native_version_str_offset] = 0; + } + } + else { native_version_str = null; } + byte ret = ImGuiNative.igDebugCheckVersionAndDataLayout(native_version_str, sz_io, sz_style, sz_vec2, sz_vec4, sz_drawvert); return ret != 0; } - public static bool ImageButton(IntPtr user_texture_id, Vector2 size, Vector2 uv0, Vector2 uv1, int frame_padding, Vector4 bg_col, Vector4 tint_col) + public static void DestroyContext() { - byte ret = ImGuiNative.igImageButton(user_texture_id, size, uv0, uv1, frame_padding, bg_col, tint_col); - return ret != 0; + IntPtr ctx = IntPtr.Zero; + ImGuiNative.igDestroyContext(ctx); } - public static void EndFrame() + public static void DestroyContext(IntPtr ctx) { - ImGuiNative.igEndFrame(); + ImGuiNative.igDestroyContext(ctx); } - public static bool SliderFloat2(string label, ref Vector2 v, float v_min, float v_max) + public static bool DragFloat(string label, ref float v) { byte* native_label; if (label != null) @@ -1453,6 +1427,9 @@ namespace ImGuiNET } } else { native_label = null; } + float v_speed = 1.0f; + float v_min = 0.0f; + float v_max = 0.0f; byte* native_format; int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; @@ -1463,13 +1440,13 @@ namespace ImGuiNET native_format[native_format_offset] = 0; } float power = 1.0f; - fixed (Vector2* native_v = &v) + fixed (float* native_v = &v) { - byte ret = ImGuiNative.igSliderFloat2(native_label, native_v, v_min, v_max, native_format, power); + byte ret = ImGuiNative.igDragFloat(native_label, native_v, v_speed, v_min, v_max, native_format, power); return ret != 0; } } - public static bool SliderFloat2(string label, ref Vector2 v, float v_min, float v_max, string format) + public static bool DragFloat(string label, ref float v, float v_speed) { byte* native_label; if (label != null) @@ -1484,27 +1461,25 @@ namespace ImGuiNET } } else { native_label = null; } + float v_min = 0.0f; + float v_max = 0.0f; byte* native_format; - if (format != null) - { - int format_byteCount = Encoding.UTF8.GetByteCount(format); + int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; native_format = native_format_stackBytes; - fixed (char* format_ptr = format) + fixed (char* format_ptr = "%.3f") { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); native_format[native_format_offset] = 0; } - } - else { native_format = null; } float power = 1.0f; - fixed (Vector2* native_v = &v) + fixed (float* native_v = &v) { - byte ret = ImGuiNative.igSliderFloat2(native_label, native_v, v_min, v_max, native_format, power); + byte ret = ImGuiNative.igDragFloat(native_label, native_v, v_speed, v_min, v_max, native_format, power); return ret != 0; } } - public static bool SliderFloat2(string label, ref Vector2 v, float v_min, float v_max, string format, float power) + public static bool DragFloat(string label, ref float v, float v_speed, float v_min) { byte* native_label; if (label != null) @@ -1519,26 +1494,24 @@ namespace ImGuiNET } } else { native_label = null; } + float v_max = 0.0f; byte* native_format; - if (format != null) - { - int format_byteCount = Encoding.UTF8.GetByteCount(format); + int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; native_format = native_format_stackBytes; - fixed (char* format_ptr = format) + fixed (char* format_ptr = "%.3f") { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); native_format[native_format_offset] = 0; } - } - else { native_format = null; } - fixed (Vector2* native_v = &v) + float power = 1.0f; + fixed (float* native_v = &v) { - byte ret = ImGuiNative.igSliderFloat2(native_label, native_v, v_min, v_max, native_format, power); + byte ret = ImGuiNative.igDragFloat(native_label, native_v, v_speed, v_min, v_max, native_format, power); return ret != 0; } } - public static bool RadioButton(string label, bool active) + public static bool DragFloat(string label, ref float v, float v_speed, float v_min, float v_max) { byte* native_label; if (label != null) @@ -1553,86 +1526,23 @@ namespace ImGuiNET } } else { native_label = null; } - byte native_active = active ? (byte)1 : (byte)0; - byte ret = ImGuiNative.igRadioButtonBool(native_label, native_active); - return ret != 0; - } - public static bool RadioButton(string label, ref int v, int v_button) - { - byte* native_label; - if (label != null) - { - int label_byteCount = Encoding.UTF8.GetByteCount(label); - byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; - native_label = native_label_stackBytes; - fixed (char* label_ptr = label) + byte* native_format; + int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = "%.3f") { - int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); - native_label[native_label_offset] = 0; + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; } - } - else { native_label = null; } - fixed (int* native_v = &v) + float power = 1.0f; + fixed (float* native_v = &v) { - byte ret = ImGuiNative.igRadioButtonIntPtr(native_label, native_v, v_button); + byte ret = ImGuiNative.igDragFloat(native_label, native_v, v_speed, v_min, v_max, native_format, power); return ret != 0; } } - public static bool IsItemDeactivatedAfterEdit() - { - byte ret = ImGuiNative.igIsItemDeactivatedAfterEdit(); - return ret != 0; - } - public static ImDrawListPtr GetWindowDrawList() - { - ImDrawList* ret = ImGuiNative.igGetWindowDrawList(); - return new ImDrawListPtr(ret); - } - public static void NewLine() - { - ImGuiNative.igNewLine(); - } - public static bool IsItemFocused() - { - byte ret = ImGuiNative.igIsItemFocused(); - return ret != 0; - } - public static void LoadIniSettingsFromMemory(string ini_data) - { - byte* native_ini_data; - if (ini_data != null) - { - int ini_data_byteCount = Encoding.UTF8.GetByteCount(ini_data); - byte* native_ini_data_stackBytes = stackalloc byte[ini_data_byteCount + 1]; - native_ini_data = native_ini_data_stackBytes; - fixed (char* ini_data_ptr = ini_data) - { - int native_ini_data_offset = Encoding.UTF8.GetBytes(ini_data_ptr, ini_data.Length, native_ini_data, ini_data_byteCount); - native_ini_data[native_ini_data_offset] = 0; - } - } - else { native_ini_data = null; } - uint ini_size = 0; - ImGuiNative.igLoadIniSettingsFromMemory(native_ini_data, ini_size); - } - public static void LoadIniSettingsFromMemory(string ini_data, uint ini_size) - { - byte* native_ini_data; - if (ini_data != null) - { - int ini_data_byteCount = Encoding.UTF8.GetByteCount(ini_data); - byte* native_ini_data_stackBytes = stackalloc byte[ini_data_byteCount + 1]; - native_ini_data = native_ini_data_stackBytes; - fixed (char* ini_data_ptr = ini_data) - { - int native_ini_data_offset = Encoding.UTF8.GetBytes(ini_data_ptr, ini_data.Length, native_ini_data, ini_data_byteCount); - native_ini_data[native_ini_data_offset] = 0; - } - } - else { native_ini_data = null; } - ImGuiNative.igLoadIniSettingsFromMemory(native_ini_data, ini_size); - } - public static bool SliderInt2(string label, ref int v, int v_min, int v_max) + public static bool DragFloat(string label, ref float v, float v_speed, float v_min, float v_max, string format) { byte* native_label; if (label != null) @@ -1648,21 +1558,26 @@ namespace ImGuiNET } else { native_label = null; } byte* native_format; - int format_byteCount = Encoding.UTF8.GetByteCount("%d"); + if (format != null) + { + int format_byteCount = Encoding.UTF8.GetByteCount(format); byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; native_format = native_format_stackBytes; - fixed (char* format_ptr = "%d") + fixed (char* format_ptr = format) { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); native_format[native_format_offset] = 0; } - fixed (int* native_v = &v) + } + else { native_format = null; } + float power = 1.0f; + fixed (float* native_v = &v) { - byte ret = ImGuiNative.igSliderInt2(native_label, native_v, v_min, v_max, native_format); + byte ret = ImGuiNative.igDragFloat(native_label, native_v, v_speed, v_min, v_max, native_format, power); return ret != 0; } } - public static bool SliderInt2(string label, ref int v, int v_min, int v_max, string format) + public static bool DragFloat(string label, ref float v, float v_speed, float v_min, float v_max, string format, float power) { byte* native_label; if (label != null) @@ -1690,57 +1605,47 @@ namespace ImGuiNET } } else { native_format = null; } - fixed (int* native_v = &v) + fixed (float* native_v = &v) { - byte ret = ImGuiNative.igSliderInt2(native_label, native_v, v_min, v_max, native_format); + byte ret = ImGuiNative.igDragFloat(native_label, native_v, v_speed, v_min, v_max, native_format, power); return ret != 0; } } - public static void SetWindowSize(Vector2 size) - { - ImGuiCond cond = 0; - ImGuiNative.igSetWindowSizeVec2(size, cond); - } - public static void SetWindowSize(Vector2 size, ImGuiCond cond) - { - ImGuiNative.igSetWindowSizeVec2(size, cond); - } - public static void SetWindowSize(string name, Vector2 size) + public static bool DragFloat2(string label, ref Vector2 v) { - byte* native_name; - if (name != null) + byte* native_label; + if (label != null) { - int name_byteCount = Encoding.UTF8.GetByteCount(name); - byte* native_name_stackBytes = stackalloc byte[name_byteCount + 1]; - native_name = native_name_stackBytes; - fixed (char* name_ptr = name) + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + fixed (char* label_ptr = label) { - int native_name_offset = Encoding.UTF8.GetBytes(name_ptr, name.Length, native_name, name_byteCount); - native_name[native_name_offset] = 0; + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; } } - else { native_name = null; } - ImGuiCond cond = 0; - ImGuiNative.igSetWindowSizeStr(native_name, size, cond); - } - public static void SetWindowSize(string name, Vector2 size, ImGuiCond cond) - { - byte* native_name; - if (name != null) - { - int name_byteCount = Encoding.UTF8.GetByteCount(name); - byte* native_name_stackBytes = stackalloc byte[name_byteCount + 1]; - native_name = native_name_stackBytes; - fixed (char* name_ptr = name) + else { native_label = null; } + float v_speed = 1.0f; + float v_min = 0.0f; + float v_max = 0.0f; + byte* native_format; + int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = "%.3f") { - int native_name_offset = Encoding.UTF8.GetBytes(name_ptr, name.Length, native_name, name_byteCount); - native_name[native_name_offset] = 0; + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; } + float power = 1.0f; + fixed (Vector2* native_v = &v) + { + byte ret = ImGuiNative.igDragFloat2(native_label, native_v, v_speed, v_min, v_max, native_format, power); + return ret != 0; } - else { native_name = null; } - ImGuiNative.igSetWindowSizeStr(native_name, size, cond); } - public static bool InputFloat(string label, ref float v) + public static bool DragFloat2(string label, ref Vector2 v, float v_speed) { byte* native_label; if (label != null) @@ -1755,8 +1660,8 @@ namespace ImGuiNET } } else { native_label = null; } - float step = 0.0f; - float step_fast = 0.0f; + float v_min = 0.0f; + float v_max = 0.0f; byte* native_format; int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; @@ -1766,14 +1671,14 @@ namespace ImGuiNET int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); native_format[native_format_offset] = 0; } - ImGuiInputTextFlags extra_flags = 0; - fixed (float* native_v = &v) + float power = 1.0f; + fixed (Vector2* native_v = &v) { - byte ret = ImGuiNative.igInputFloat(native_label, native_v, step, step_fast, native_format, extra_flags); + byte ret = ImGuiNative.igDragFloat2(native_label, native_v, v_speed, v_min, v_max, native_format, power); return ret != 0; } } - public static bool InputFloat(string label, ref float v, float step) + public static bool DragFloat2(string label, ref Vector2 v, float v_speed, float v_min) { byte* native_label; if (label != null) @@ -1788,7 +1693,7 @@ namespace ImGuiNET } } else { native_label = null; } - float step_fast = 0.0f; + float v_max = 0.0f; byte* native_format; int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; @@ -1798,14 +1703,14 @@ namespace ImGuiNET int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); native_format[native_format_offset] = 0; } - ImGuiInputTextFlags extra_flags = 0; - fixed (float* native_v = &v) + float power = 1.0f; + fixed (Vector2* native_v = &v) { - byte ret = ImGuiNative.igInputFloat(native_label, native_v, step, step_fast, native_format, extra_flags); + byte ret = ImGuiNative.igDragFloat2(native_label, native_v, v_speed, v_min, v_max, native_format, power); return ret != 0; } } - public static bool InputFloat(string label, ref float v, float step, float step_fast) + public static bool DragFloat2(string label, ref Vector2 v, float v_speed, float v_min, float v_max) { byte* native_label; if (label != null) @@ -1829,14 +1734,14 @@ namespace ImGuiNET int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); native_format[native_format_offset] = 0; } - ImGuiInputTextFlags extra_flags = 0; - fixed (float* native_v = &v) + float power = 1.0f; + fixed (Vector2* native_v = &v) { - byte ret = ImGuiNative.igInputFloat(native_label, native_v, step, step_fast, native_format, extra_flags); + byte ret = ImGuiNative.igDragFloat2(native_label, native_v, v_speed, v_min, v_max, native_format, power); return ret != 0; } } - public static bool InputFloat(string label, ref float v, float step, float step_fast, string format) + public static bool DragFloat2(string label, ref Vector2 v, float v_speed, float v_min, float v_max, string format) { byte* native_label; if (label != null) @@ -1864,14 +1769,14 @@ namespace ImGuiNET } } else { native_format = null; } - ImGuiInputTextFlags extra_flags = 0; - fixed (float* native_v = &v) + float power = 1.0f; + fixed (Vector2* native_v = &v) { - byte ret = ImGuiNative.igInputFloat(native_label, native_v, step, step_fast, native_format, extra_flags); + byte ret = ImGuiNative.igDragFloat2(native_label, native_v, v_speed, v_min, v_max, native_format, power); return ret != 0; } } - public static bool InputFloat(string label, ref float v, float step, float step_fast, string format, ImGuiInputTextFlags extra_flags) + public static bool DragFloat2(string label, ref Vector2 v, float v_speed, float v_min, float v_max, string format, float power) { byte* native_label; if (label != null) @@ -1899,177 +1804,47 @@ namespace ImGuiNET } } else { native_format = null; } - fixed (float* native_v = &v) + fixed (Vector2* native_v = &v) { - byte ret = ImGuiNative.igInputFloat(native_label, native_v, step, step_fast, native_format, extra_flags); + byte ret = ImGuiNative.igDragFloat2(native_label, native_v, v_speed, v_min, v_max, native_format, power); return ret != 0; } } - public static void ColorConvertRGBtoHSV(float r, float g, float b, out float out_h, out float out_s, out float out_v) + public static bool DragFloat3(string label, ref Vector3 v) { - fixed (float* native_out_h = &out_h) + byte* native_label; + if (label != null) { - fixed (float* native_out_s = &out_s) + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + fixed (char* label_ptr = label) { - fixed (float* native_out_v = &out_v) - { - ImGuiNative.igColorConvertRGBtoHSV(r, g, b, native_out_h, native_out_s, native_out_v); - } + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; } } - } - public static bool BeginMenuBar() - { - byte ret = ImGuiNative.igBeginMenuBar(); - return ret != 0; - } - public static bool IsPopupOpen(string str_id) - { - byte* native_str_id; - if (str_id != null) - { - int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); - byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; - native_str_id = native_str_id_stackBytes; - fixed (char* str_id_ptr = str_id) - { - int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); - native_str_id[native_str_id_offset] = 0; - } - } - else { native_str_id = null; } - byte ret = ImGuiNative.igIsPopupOpen(native_str_id); - return ret != 0; - } - public static bool IsItemVisible() - { - byte ret = ImGuiNative.igIsItemVisible(); - return ret != 0; - } - public static void SetNextWindowSize(Vector2 size) - { - ImGuiCond cond = 0; - ImGuiNative.igSetNextWindowSize(size, cond); - } - public static void SetNextWindowSize(Vector2 size, ImGuiCond cond) - { - ImGuiNative.igSetNextWindowSize(size, cond); - } - public static void SetWindowCollapsed(bool collapsed) - { - byte native_collapsed = collapsed ? (byte)1 : (byte)0; - ImGuiCond cond = 0; - ImGuiNative.igSetWindowCollapsedBool(native_collapsed, cond); - } - public static void SetWindowCollapsed(bool collapsed, ImGuiCond cond) - { - byte native_collapsed = collapsed ? (byte)1 : (byte)0; - ImGuiNative.igSetWindowCollapsedBool(native_collapsed, cond); - } - public static void SetWindowCollapsed(string name, bool collapsed) - { - byte* native_name; - if (name != null) - { - int name_byteCount = Encoding.UTF8.GetByteCount(name); - byte* native_name_stackBytes = stackalloc byte[name_byteCount + 1]; - native_name = native_name_stackBytes; - fixed (char* name_ptr = name) - { - int native_name_offset = Encoding.UTF8.GetBytes(name_ptr, name.Length, native_name, name_byteCount); - native_name[native_name_offset] = 0; - } - } - else { native_name = null; } - byte native_collapsed = collapsed ? (byte)1 : (byte)0; - ImGuiCond cond = 0; - ImGuiNative.igSetWindowCollapsedStr(native_name, native_collapsed, cond); - } - public static void SetWindowCollapsed(string name, bool collapsed, ImGuiCond cond) - { - byte* native_name; - if (name != null) - { - int name_byteCount = Encoding.UTF8.GetByteCount(name); - byte* native_name_stackBytes = stackalloc byte[name_byteCount + 1]; - native_name = native_name_stackBytes; - fixed (char* name_ptr = name) - { - int native_name_offset = Encoding.UTF8.GetBytes(name_ptr, name.Length, native_name, name_byteCount); - native_name[native_name_offset] = 0; - } - } - else { native_name = null; } - byte native_collapsed = collapsed ? (byte)1 : (byte)0; - ImGuiNative.igSetWindowCollapsedStr(native_name, native_collapsed, cond); - } - public static Vector2 GetMouseDragDelta() - { - int button = 0; - float lock_threshold = -1.0f; - Vector2 ret = ImGuiNative.igGetMouseDragDelta(button, lock_threshold); - return ret; - } - public static Vector2 GetMouseDragDelta(int button) - { - float lock_threshold = -1.0f; - Vector2 ret = ImGuiNative.igGetMouseDragDelta(button, lock_threshold); - return ret; - } - public static Vector2 GetMouseDragDelta(int button, float lock_threshold) - { - Vector2 ret = ImGuiNative.igGetMouseDragDelta(button, lock_threshold); - return ret; - } - public static ImGuiPayloadPtr AcceptDragDropPayload(string type) - { - byte* native_type; - if (type != null) - { - int type_byteCount = Encoding.UTF8.GetByteCount(type); - byte* native_type_stackBytes = stackalloc byte[type_byteCount + 1]; - native_type = native_type_stackBytes; - fixed (char* type_ptr = type) + else { native_label = null; } + float v_speed = 1.0f; + float v_min = 0.0f; + float v_max = 0.0f; + byte* native_format; + int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = "%.3f") { - int native_type_offset = Encoding.UTF8.GetBytes(type_ptr, type.Length, native_type, type_byteCount); - native_type[native_type_offset] = 0; + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; } - } - else { native_type = null; } - ImGuiDragDropFlags flags = 0; - ImGuiPayload* ret = ImGuiNative.igAcceptDragDropPayload(native_type, flags); - return new ImGuiPayloadPtr(ret); - } - public static ImGuiPayloadPtr AcceptDragDropPayload(string type, ImGuiDragDropFlags flags) - { - byte* native_type; - if (type != null) + float power = 1.0f; + fixed (Vector3* native_v = &v) { - int type_byteCount = Encoding.UTF8.GetByteCount(type); - byte* native_type_stackBytes = stackalloc byte[type_byteCount + 1]; - native_type = native_type_stackBytes; - fixed (char* type_ptr = type) - { - int native_type_offset = Encoding.UTF8.GetBytes(type_ptr, type.Length, native_type, type_byteCount); - native_type[native_type_offset] = 0; - } + byte ret = ImGuiNative.igDragFloat3(native_label, native_v, v_speed, v_min, v_max, native_format, power); + return ret != 0; } - else { native_type = null; } - ImGuiPayload* ret = ImGuiNative.igAcceptDragDropPayload(native_type, flags); - return new ImGuiPayloadPtr(ret); - } - public static bool BeginDragDropSource() - { - ImGuiDragDropFlags flags = 0; - byte ret = ImGuiNative.igBeginDragDropSource(flags); - return ret != 0; - } - public static bool BeginDragDropSource(ImGuiDragDropFlags flags) - { - byte ret = ImGuiNative.igBeginDragDropSource(flags); - return ret != 0; } - public static void PlotLines(string label, ref float values, int values_count) + public static bool DragFloat3(string label, ref Vector3 v, float v_speed) { byte* native_label; if (label != null) @@ -2084,18 +1859,25 @@ namespace ImGuiNET } } else { native_label = null; } - int values_offset = 0; - byte* native_overlay_text = null; - float scale_min = float.MaxValue; - float scale_max = float.MaxValue; - Vector2 graph_size = new Vector2(); - int stride = sizeof(float); - fixed (float* native_values = &values) + float v_min = 0.0f; + float v_max = 0.0f; + byte* native_format; + int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = "%.3f") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + float power = 1.0f; + fixed (Vector3* native_v = &v) { - ImGuiNative.igPlotLines(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); + byte ret = ImGuiNative.igDragFloat3(native_label, native_v, v_speed, v_min, v_max, native_format, power); + return ret != 0; } } - public static void PlotLines(string label, ref float values, int values_count, int values_offset) + public static bool DragFloat3(string label, ref Vector3 v, float v_speed, float v_min) { byte* native_label; if (label != null) @@ -2110,17 +1892,24 @@ namespace ImGuiNET } } else { native_label = null; } - byte* native_overlay_text = null; - float scale_min = float.MaxValue; - float scale_max = float.MaxValue; - Vector2 graph_size = new Vector2(); - int stride = sizeof(float); - fixed (float* native_values = &values) + float v_max = 0.0f; + byte* native_format; + int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = "%.3f") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + float power = 1.0f; + fixed (Vector3* native_v = &v) { - ImGuiNative.igPlotLines(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); + byte ret = ImGuiNative.igDragFloat3(native_label, native_v, v_speed, v_min, v_max, native_format, power); + return ret != 0; } } - public static void PlotLines(string label, ref float values, int values_count, int values_offset, string overlay_text) + public static bool DragFloat3(string label, ref Vector3 v, float v_speed, float v_min, float v_max) { byte* native_label; if (label != null) @@ -2135,29 +1924,23 @@ namespace ImGuiNET } } else { native_label = null; } - byte* native_overlay_text; - if (overlay_text != null) - { - int overlay_text_byteCount = Encoding.UTF8.GetByteCount(overlay_text); - byte* native_overlay_text_stackBytes = stackalloc byte[overlay_text_byteCount + 1]; - native_overlay_text = native_overlay_text_stackBytes; - fixed (char* overlay_text_ptr = overlay_text) + byte* native_format; + int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = "%.3f") { - int native_overlay_text_offset = Encoding.UTF8.GetBytes(overlay_text_ptr, overlay_text.Length, native_overlay_text, overlay_text_byteCount); - native_overlay_text[native_overlay_text_offset] = 0; + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; } - } - else { native_overlay_text = null; } - float scale_min = float.MaxValue; - float scale_max = float.MaxValue; - Vector2 graph_size = new Vector2(); - int stride = sizeof(float); - fixed (float* native_values = &values) + float power = 1.0f; + fixed (Vector3* native_v = &v) { - ImGuiNative.igPlotLines(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); + byte ret = ImGuiNative.igDragFloat3(native_label, native_v, v_speed, v_min, v_max, native_format, power); + return ret != 0; } } - public static void PlotLines(string label, ref float values, int values_count, int values_offset, string overlay_text, float scale_min) + public static bool DragFloat3(string label, ref Vector3 v, float v_speed, float v_min, float v_max, string format) { byte* native_label; if (label != null) @@ -2172,28 +1955,27 @@ namespace ImGuiNET } } else { native_label = null; } - byte* native_overlay_text; - if (overlay_text != null) + byte* native_format; + if (format != null) { - int overlay_text_byteCount = Encoding.UTF8.GetByteCount(overlay_text); - byte* native_overlay_text_stackBytes = stackalloc byte[overlay_text_byteCount + 1]; - native_overlay_text = native_overlay_text_stackBytes; - fixed (char* overlay_text_ptr = overlay_text) + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = format) { - int native_overlay_text_offset = Encoding.UTF8.GetBytes(overlay_text_ptr, overlay_text.Length, native_overlay_text, overlay_text_byteCount); - native_overlay_text[native_overlay_text_offset] = 0; + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; } } - else { native_overlay_text = null; } - float scale_max = float.MaxValue; - Vector2 graph_size = new Vector2(); - int stride = sizeof(float); - fixed (float* native_values = &values) + else { native_format = null; } + float power = 1.0f; + fixed (Vector3* native_v = &v) { - ImGuiNative.igPlotLines(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); + byte ret = ImGuiNative.igDragFloat3(native_label, native_v, v_speed, v_min, v_max, native_format, power); + return ret != 0; } } - public static void PlotLines(string label, ref float values, int values_count, int values_offset, string overlay_text, float scale_min, float scale_max) + public static bool DragFloat3(string label, ref Vector3 v, float v_speed, float v_min, float v_max, string format, float power) { byte* native_label; if (label != null) @@ -2208,27 +1990,26 @@ namespace ImGuiNET } } else { native_label = null; } - byte* native_overlay_text; - if (overlay_text != null) + byte* native_format; + if (format != null) { - int overlay_text_byteCount = Encoding.UTF8.GetByteCount(overlay_text); - byte* native_overlay_text_stackBytes = stackalloc byte[overlay_text_byteCount + 1]; - native_overlay_text = native_overlay_text_stackBytes; - fixed (char* overlay_text_ptr = overlay_text) + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = format) { - int native_overlay_text_offset = Encoding.UTF8.GetBytes(overlay_text_ptr, overlay_text.Length, native_overlay_text, overlay_text_byteCount); - native_overlay_text[native_overlay_text_offset] = 0; + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; } } - else { native_overlay_text = null; } - Vector2 graph_size = new Vector2(); - int stride = sizeof(float); - fixed (float* native_values = &values) + else { native_format = null; } + fixed (Vector3* native_v = &v) { - ImGuiNative.igPlotLines(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); + byte ret = ImGuiNative.igDragFloat3(native_label, native_v, v_speed, v_min, v_max, native_format, power); + return ret != 0; } } - public static void PlotLines(string label, ref float values, int values_count, int values_offset, string overlay_text, float scale_min, float scale_max, Vector2 graph_size) + public static bool DragFloat4(string label, ref Vector4 v) { byte* native_label; if (label != null) @@ -2243,26 +2024,26 @@ namespace ImGuiNET } } else { native_label = null; } - byte* native_overlay_text; - if (overlay_text != null) - { - int overlay_text_byteCount = Encoding.UTF8.GetByteCount(overlay_text); - byte* native_overlay_text_stackBytes = stackalloc byte[overlay_text_byteCount + 1]; - native_overlay_text = native_overlay_text_stackBytes; - fixed (char* overlay_text_ptr = overlay_text) + float v_speed = 1.0f; + float v_min = 0.0f; + float v_max = 0.0f; + byte* native_format; + int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = "%.3f") { - int native_overlay_text_offset = Encoding.UTF8.GetBytes(overlay_text_ptr, overlay_text.Length, native_overlay_text, overlay_text_byteCount); - native_overlay_text[native_overlay_text_offset] = 0; + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; } - } - else { native_overlay_text = null; } - int stride = sizeof(float); - fixed (float* native_values = &values) + float power = 1.0f; + fixed (Vector4* native_v = &v) { - ImGuiNative.igPlotLines(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); + byte ret = ImGuiNative.igDragFloat4(native_label, native_v, v_speed, v_min, v_max, native_format, power); + return ret != 0; } } - public static void PlotLines(string label, ref float values, int values_count, int values_offset, string overlay_text, float scale_min, float scale_max, Vector2 graph_size, int stride) + public static bool DragFloat4(string label, ref Vector4 v, float v_speed) { byte* native_label; if (label != null) @@ -2277,43 +2058,25 @@ namespace ImGuiNET } } else { native_label = null; } - byte* native_overlay_text; - if (overlay_text != null) - { - int overlay_text_byteCount = Encoding.UTF8.GetByteCount(overlay_text); - byte* native_overlay_text_stackBytes = stackalloc byte[overlay_text_byteCount + 1]; - native_overlay_text = native_overlay_text_stackBytes; - fixed (char* overlay_text_ptr = overlay_text) + float v_min = 0.0f; + float v_max = 0.0f; + byte* native_format; + int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = "%.3f") { - int native_overlay_text_offset = Encoding.UTF8.GetBytes(overlay_text_ptr, overlay_text.Length, native_overlay_text, overlay_text_byteCount); - native_overlay_text[native_overlay_text_offset] = 0; + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; } - } - else { native_overlay_text = null; } - fixed (float* native_values = &values) + float power = 1.0f; + fixed (Vector4* native_v = &v) { - ImGuiNative.igPlotLines(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); + byte ret = ImGuiNative.igDragFloat4(native_label, native_v, v_speed, v_min, v_max, native_format, power); + return ret != 0; } } - public static int GetFrameCount() - { - int ret = ImGuiNative.igGetFrameCount(); - return ret; - } - public static void ListBoxFooter() - { - ImGuiNative.igListBoxFooter(); - } - public static void PopClipRect() - { - ImGuiNative.igPopClipRect(); - } - public static Vector2 GetWindowSize() - { - Vector2 ret = ImGuiNative.igGetWindowSize(); - return ret; - } - public static bool CheckboxFlags(string label, ref uint flags, uint flags_value) + public static bool DragFloat4(string label, ref Vector4 v, float v_speed, float v_min) { byte* native_label; if (label != null) @@ -2328,24 +2091,24 @@ namespace ImGuiNET } } else { native_label = null; } - fixed (uint* native_flags = &flags) + float v_max = 0.0f; + byte* native_format; + int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = "%.3f") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + float power = 1.0f; + fixed (Vector4* native_v = &v) { - byte ret = ImGuiNative.igCheckboxFlags(native_label, native_flags, flags_value); + byte ret = ImGuiNative.igDragFloat4(native_label, native_v, v_speed, v_min, v_max, native_format, power); return ret != 0; } } - public static bool IsWindowHovered() - { - ImGuiHoveredFlags flags = 0; - byte ret = ImGuiNative.igIsWindowHovered(flags); - return ret != 0; - } - public static bool IsWindowHovered(ImGuiHoveredFlags flags) - { - byte ret = ImGuiNative.igIsWindowHovered(flags); - return ret != 0; - } - public static void PlotHistogram(string label, ref float values, int values_count) + public static bool DragFloat4(string label, ref Vector4 v, float v_speed, float v_min, float v_max) { byte* native_label; if (label != null) @@ -2360,18 +2123,23 @@ namespace ImGuiNET } } else { native_label = null; } - int values_offset = 0; - byte* native_overlay_text = null; - float scale_min = float.MaxValue; - float scale_max = float.MaxValue; - Vector2 graph_size = new Vector2(); - int stride = sizeof(float); - fixed (float* native_values = &values) + byte* native_format; + int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = "%.3f") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + float power = 1.0f; + fixed (Vector4* native_v = &v) { - ImGuiNative.igPlotHistogramFloatPtr(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); + byte ret = ImGuiNative.igDragFloat4(native_label, native_v, v_speed, v_min, v_max, native_format, power); + return ret != 0; } } - public static void PlotHistogram(string label, ref float values, int values_count, int values_offset) + public static bool DragFloat4(string label, ref Vector4 v, float v_speed, float v_min, float v_max, string format) { byte* native_label; if (label != null) @@ -2386,17 +2154,27 @@ namespace ImGuiNET } } else { native_label = null; } - byte* native_overlay_text = null; - float scale_min = float.MaxValue; - float scale_max = float.MaxValue; - Vector2 graph_size = new Vector2(); - int stride = sizeof(float); - fixed (float* native_values = &values) + byte* native_format; + if (format != null) { - ImGuiNative.igPlotHistogramFloatPtr(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + } + else { native_format = null; } + float power = 1.0f; + fixed (Vector4* native_v = &v) + { + byte ret = ImGuiNative.igDragFloat4(native_label, native_v, v_speed, v_min, v_max, native_format, power); + return ret != 0; } } - public static void PlotHistogram(string label, ref float values, int values_count, int values_offset, string overlay_text) + public static bool DragFloat4(string label, ref Vector4 v, float v_speed, float v_min, float v_max, string format, float power) { byte* native_label; if (label != null) @@ -2411,29 +2189,26 @@ namespace ImGuiNET } } else { native_label = null; } - byte* native_overlay_text; - if (overlay_text != null) + byte* native_format; + if (format != null) { - int overlay_text_byteCount = Encoding.UTF8.GetByteCount(overlay_text); - byte* native_overlay_text_stackBytes = stackalloc byte[overlay_text_byteCount + 1]; - native_overlay_text = native_overlay_text_stackBytes; - fixed (char* overlay_text_ptr = overlay_text) + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = format) { - int native_overlay_text_offset = Encoding.UTF8.GetBytes(overlay_text_ptr, overlay_text.Length, native_overlay_text, overlay_text_byteCount); - native_overlay_text[native_overlay_text_offset] = 0; + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; } } - else { native_overlay_text = null; } - float scale_min = float.MaxValue; - float scale_max = float.MaxValue; - Vector2 graph_size = new Vector2(); - int stride = sizeof(float); - fixed (float* native_values = &values) + else { native_format = null; } + fixed (Vector4* native_v = &v) { - ImGuiNative.igPlotHistogramFloatPtr(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); + byte ret = ImGuiNative.igDragFloat4(native_label, native_v, v_speed, v_min, v_max, native_format, power); + return ret != 0; } } - public static void PlotHistogram(string label, ref float values, int values_count, int values_offset, string overlay_text, float scale_min) + public static bool DragFloatRange2(string label, ref float v_current_min, ref float v_current_max) { byte* native_label; if (label != null) @@ -2448,28 +2223,30 @@ namespace ImGuiNET } } else { native_label = null; } - byte* native_overlay_text; - if (overlay_text != null) - { - int overlay_text_byteCount = Encoding.UTF8.GetByteCount(overlay_text); - byte* native_overlay_text_stackBytes = stackalloc byte[overlay_text_byteCount + 1]; - native_overlay_text = native_overlay_text_stackBytes; - fixed (char* overlay_text_ptr = overlay_text) + float v_speed = 1.0f; + float v_min = 0.0f; + float v_max = 0.0f; + byte* native_format; + int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = "%.3f") { - int native_overlay_text_offset = Encoding.UTF8.GetBytes(overlay_text_ptr, overlay_text.Length, native_overlay_text, overlay_text_byteCount); - native_overlay_text[native_overlay_text_offset] = 0; + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; } - } - else { native_overlay_text = null; } - float scale_max = float.MaxValue; - Vector2 graph_size = new Vector2(); - int stride = sizeof(float); - fixed (float* native_values = &values) + byte* native_format_max = null; + float power = 1.0f; + fixed (float* native_v_current_min = &v_current_min) { - ImGuiNative.igPlotHistogramFloatPtr(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); + fixed (float* native_v_current_max = &v_current_max) + { + byte ret = ImGuiNative.igDragFloatRange2(native_label, native_v_current_min, native_v_current_max, v_speed, v_min, v_max, native_format, native_format_max, power); + return ret != 0; + } } } - public static void PlotHistogram(string label, ref float values, int values_count, int values_offset, string overlay_text, float scale_min, float scale_max) + public static bool DragFloatRange2(string label, ref float v_current_min, ref float v_current_max, float v_speed) { byte* native_label; if (label != null) @@ -2484,27 +2261,29 @@ namespace ImGuiNET } } else { native_label = null; } - byte* native_overlay_text; - if (overlay_text != null) - { - int overlay_text_byteCount = Encoding.UTF8.GetByteCount(overlay_text); - byte* native_overlay_text_stackBytes = stackalloc byte[overlay_text_byteCount + 1]; - native_overlay_text = native_overlay_text_stackBytes; - fixed (char* overlay_text_ptr = overlay_text) - { - int native_overlay_text_offset = Encoding.UTF8.GetBytes(overlay_text_ptr, overlay_text.Length, native_overlay_text, overlay_text_byteCount); - native_overlay_text[native_overlay_text_offset] = 0; - } - } - else { native_overlay_text = null; } - Vector2 graph_size = new Vector2(); - int stride = sizeof(float); - fixed (float* native_values = &values) + float v_min = 0.0f; + float v_max = 0.0f; + byte* native_format; + int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = "%.3f") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + byte* native_format_max = null; + float power = 1.0f; + fixed (float* native_v_current_min = &v_current_min) { - ImGuiNative.igPlotHistogramFloatPtr(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); + fixed (float* native_v_current_max = &v_current_max) + { + byte ret = ImGuiNative.igDragFloatRange2(native_label, native_v_current_min, native_v_current_max, v_speed, v_min, v_max, native_format, native_format_max, power); + return ret != 0; + } } } - public static void PlotHistogram(string label, ref float values, int values_count, int values_offset, string overlay_text, float scale_min, float scale_max, Vector2 graph_size) + public static bool DragFloatRange2(string label, ref float v_current_min, ref float v_current_max, float v_speed, float v_min) { byte* native_label; if (label != null) @@ -2519,26 +2298,28 @@ namespace ImGuiNET } } else { native_label = null; } - byte* native_overlay_text; - if (overlay_text != null) - { - int overlay_text_byteCount = Encoding.UTF8.GetByteCount(overlay_text); - byte* native_overlay_text_stackBytes = stackalloc byte[overlay_text_byteCount + 1]; - native_overlay_text = native_overlay_text_stackBytes; - fixed (char* overlay_text_ptr = overlay_text) + float v_max = 0.0f; + byte* native_format; + int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = "%.3f") { - int native_overlay_text_offset = Encoding.UTF8.GetBytes(overlay_text_ptr, overlay_text.Length, native_overlay_text, overlay_text_byteCount); - native_overlay_text[native_overlay_text_offset] = 0; + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; } - } - else { native_overlay_text = null; } - int stride = sizeof(float); - fixed (float* native_values = &values) + byte* native_format_max = null; + float power = 1.0f; + fixed (float* native_v_current_min = &v_current_min) { - ImGuiNative.igPlotHistogramFloatPtr(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); + fixed (float* native_v_current_max = &v_current_max) + { + byte ret = ImGuiNative.igDragFloatRange2(native_label, native_v_current_min, native_v_current_max, v_speed, v_min, v_max, native_format, native_format_max, power); + return ret != 0; + } } } - public static void PlotHistogram(string label, ref float values, int values_count, int values_offset, string overlay_text, float scale_min, float scale_max, Vector2 graph_size, int stride) + public static bool DragFloatRange2(string label, ref float v_current_min, ref float v_current_max, float v_speed, float v_min, float v_max) { byte* native_label; if (label != null) @@ -2553,79 +2334,27 @@ namespace ImGuiNET } } else { native_label = null; } - byte* native_overlay_text; - if (overlay_text != null) - { - int overlay_text_byteCount = Encoding.UTF8.GetByteCount(overlay_text); - byte* native_overlay_text_stackBytes = stackalloc byte[overlay_text_byteCount + 1]; - native_overlay_text = native_overlay_text_stackBytes; - fixed (char* overlay_text_ptr = overlay_text) - { - int native_overlay_text_offset = Encoding.UTF8.GetBytes(overlay_text_ptr, overlay_text.Length, native_overlay_text, overlay_text_byteCount); - native_overlay_text[native_overlay_text_offset] = 0; - } - } - else { native_overlay_text = null; } - fixed (float* native_values = &values) - { - ImGuiNative.igPlotHistogramFloatPtr(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); - } - } - public static bool BeginPopupContextVoid() - { - byte* native_str_id = null; - int mouse_button = 1; - byte ret = ImGuiNative.igBeginPopupContextVoid(native_str_id, mouse_button); - return ret != 0; - } - public static bool BeginPopupContextVoid(string str_id) - { - byte* native_str_id; - if (str_id != null) - { - int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); - byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; - native_str_id = native_str_id_stackBytes; - fixed (char* str_id_ptr = str_id) + byte* native_format; + int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = "%.3f") { - int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); - native_str_id[native_str_id_offset] = 0; + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; } - } - else { native_str_id = null; } - int mouse_button = 1; - byte ret = ImGuiNative.igBeginPopupContextVoid(native_str_id, mouse_button); - return ret != 0; - } - public static bool BeginPopupContextVoid(string str_id, int mouse_button) - { - byte* native_str_id; - if (str_id != null) + byte* native_format_max = null; + float power = 1.0f; + fixed (float* native_v_current_min = &v_current_min) { - int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); - byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; - native_str_id = native_str_id_stackBytes; - fixed (char* str_id_ptr = str_id) + fixed (float* native_v_current_max = &v_current_max) { - int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); - native_str_id[native_str_id_offset] = 0; + byte ret = ImGuiNative.igDragFloatRange2(native_label, native_v_current_min, native_v_current_max, v_speed, v_min, v_max, native_format, native_format_max, power); + return ret != 0; } } - else { native_str_id = null; } - byte ret = ImGuiNative.igBeginPopupContextVoid(native_str_id, mouse_button); - return ret != 0; - } - public static void ShowStyleEditor() - { - ImGuiStyle* @ref = null; - ImGuiNative.igShowStyleEditor(@ref); - } - public static void ShowStyleEditor(ImGuiStylePtr @ref) - { - ImGuiStyle* native_ref = @ref.NativePtr; - ImGuiNative.igShowStyleEditor(native_ref); } - public static bool Checkbox(string label, ref bool v) + public static bool DragFloatRange2(string label, ref float v_current_min, ref float v_current_max, float v_speed, float v_min, float v_max, string format) { byte* native_label; if (label != null) @@ -2640,67 +2369,31 @@ namespace ImGuiNET } } else { native_label = null; } - byte native_v_val = v ? (byte)1 : (byte)0; - byte* native_v = &native_v_val; - byte ret = ImGuiNative.igCheckbox(native_label, native_v); - v = native_v_val != 0; - return ret != 0; - } - public static Vector2 GetWindowPos() - { - Vector2 ret = ImGuiNative.igGetWindowPos(); - return ret; - } - public static void SetNextWindowContentSize(Vector2 size) - { - ImGuiNative.igSetNextWindowContentSize(size); - } - public static void TextColored(Vector4 col, string fmt) - { - byte* native_fmt; - if (fmt != null) + byte* native_format; + if (format != null) { - int fmt_byteCount = Encoding.UTF8.GetByteCount(fmt); - byte* native_fmt_stackBytes = stackalloc byte[fmt_byteCount + 1]; - native_fmt = native_fmt_stackBytes; - fixed (char* fmt_ptr = fmt) + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = format) { - int native_fmt_offset = Encoding.UTF8.GetBytes(fmt_ptr, fmt.Length, native_fmt, fmt_byteCount); - native_fmt[native_fmt_offset] = 0; + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; } } - else { native_fmt = null; } - ImGuiNative.igTextColored(col, native_fmt); - } - public static void LogToFile() - { - int max_depth = -1; - byte* native_filename = null; - ImGuiNative.igLogToFile(max_depth, native_filename); - } - public static void LogToFile(int max_depth) - { - byte* native_filename = null; - ImGuiNative.igLogToFile(max_depth, native_filename); - } - public static void LogToFile(int max_depth, string filename) - { - byte* native_filename; - if (filename != null) + else { native_format = null; } + byte* native_format_max = null; + float power = 1.0f; + fixed (float* native_v_current_min = &v_current_min) { - int filename_byteCount = Encoding.UTF8.GetByteCount(filename); - byte* native_filename_stackBytes = stackalloc byte[filename_byteCount + 1]; - native_filename = native_filename_stackBytes; - fixed (char* filename_ptr = filename) + fixed (float* native_v_current_max = &v_current_max) { - int native_filename_offset = Encoding.UTF8.GetBytes(filename_ptr, filename.Length, native_filename, filename_byteCount); - native_filename[native_filename_offset] = 0; + byte ret = ImGuiNative.igDragFloatRange2(native_label, native_v_current_min, native_v_current_max, v_speed, v_min, v_max, native_format, native_format_max, power); + return ret != 0; } } - else { native_filename = null; } - ImGuiNative.igLogToFile(max_depth, native_filename); } - public static bool Button(string label) + public static bool DragFloatRange2(string label, ref float v_current_min, ref float v_current_max, float v_speed, float v_min, float v_max, string format, string format_max) { byte* native_label; if (label != null) @@ -2715,11 +2408,43 @@ namespace ImGuiNET } } else { native_label = null; } - Vector2 size = new Vector2(); - byte ret = ImGuiNative.igButton(native_label, size); - return ret != 0; + byte* native_format; + if (format != null) + { + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + } + else { native_format = null; } + byte* native_format_max; + if (format_max != null) + { + int format_max_byteCount = Encoding.UTF8.GetByteCount(format_max); + byte* native_format_max_stackBytes = stackalloc byte[format_max_byteCount + 1]; + native_format_max = native_format_max_stackBytes; + fixed (char* format_max_ptr = format_max) + { + int native_format_max_offset = Encoding.UTF8.GetBytes(format_max_ptr, format_max.Length, native_format_max, format_max_byteCount); + native_format_max[native_format_max_offset] = 0; + } + } + else { native_format_max = null; } + float power = 1.0f; + fixed (float* native_v_current_min = &v_current_min) + { + fixed (float* native_v_current_max = &v_current_max) + { + byte ret = ImGuiNative.igDragFloatRange2(native_label, native_v_current_min, native_v_current_max, v_speed, v_min, v_max, native_format, native_format_max, power); + return ret != 0; + } + } } - public static bool Button(string label, Vector2 size) + public static bool DragFloatRange2(string label, ref float v_current_min, ref float v_current_max, float v_speed, float v_min, float v_max, string format, string format_max, float power) { byte* native_label; if (label != null) @@ -2734,19 +2459,42 @@ namespace ImGuiNET } } else { native_label = null; } - byte ret = ImGuiNative.igButton(native_label, size); - return ret != 0; - } - public static bool IsItemEdited() - { - byte ret = ImGuiNative.igIsItemEdited(); - return ret != 0; - } - public static void TreeAdvanceToLabelPos() - { - ImGuiNative.igTreeAdvanceToLabelPos(); + byte* native_format; + if (format != null) + { + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + } + else { native_format = null; } + byte* native_format_max; + if (format_max != null) + { + int format_max_byteCount = Encoding.UTF8.GetByteCount(format_max); + byte* native_format_max_stackBytes = stackalloc byte[format_max_byteCount + 1]; + native_format_max = native_format_max_stackBytes; + fixed (char* format_max_ptr = format_max) + { + int native_format_max_offset = Encoding.UTF8.GetBytes(format_max_ptr, format_max.Length, native_format_max, format_max_byteCount); + native_format_max[native_format_max_offset] = 0; + } + } + else { native_format_max = null; } + fixed (float* native_v_current_min = &v_current_min) + { + fixed (float* native_v_current_max = &v_current_max) + { + byte ret = ImGuiNative.igDragFloatRange2(native_label, native_v_current_min, native_v_current_max, v_speed, v_min, v_max, native_format, native_format_max, power); + return ret != 0; + } + } } - public static bool DragInt2(string label, ref int v) + public static bool DragInt(string label, ref int v) { byte* native_label; if (label != null) @@ -2775,11 +2523,11 @@ namespace ImGuiNET } fixed (int* native_v = &v) { - byte ret = ImGuiNative.igDragInt2(native_label, native_v, v_speed, v_min, v_max, native_format); + byte ret = ImGuiNative.igDragInt(native_label, native_v, v_speed, v_min, v_max, native_format); return ret != 0; } } - public static bool DragInt2(string label, ref int v, float v_speed) + public static bool DragInt(string label, ref int v, float v_speed) { byte* native_label; if (label != null) @@ -2807,11 +2555,11 @@ namespace ImGuiNET } fixed (int* native_v = &v) { - byte ret = ImGuiNative.igDragInt2(native_label, native_v, v_speed, v_min, v_max, native_format); + byte ret = ImGuiNative.igDragInt(native_label, native_v, v_speed, v_min, v_max, native_format); return ret != 0; } } - public static bool DragInt2(string label, ref int v, float v_speed, int v_min) + public static bool DragInt(string label, ref int v, float v_speed, int v_min) { byte* native_label; if (label != null) @@ -2838,11 +2586,11 @@ namespace ImGuiNET } fixed (int* native_v = &v) { - byte ret = ImGuiNative.igDragInt2(native_label, native_v, v_speed, v_min, v_max, native_format); + byte ret = ImGuiNative.igDragInt(native_label, native_v, v_speed, v_min, v_max, native_format); return ret != 0; } } - public static bool DragInt2(string label, ref int v, float v_speed, int v_min, int v_max) + public static bool DragInt(string label, ref int v, float v_speed, int v_min, int v_max) { byte* native_label; if (label != null) @@ -2868,11 +2616,11 @@ namespace ImGuiNET } fixed (int* native_v = &v) { - byte ret = ImGuiNative.igDragInt2(native_label, native_v, v_speed, v_min, v_max, native_format); + byte ret = ImGuiNative.igDragInt(native_label, native_v, v_speed, v_min, v_max, native_format); return ret != 0; } } - public static bool DragInt2(string label, ref int v, float v_speed, int v_min, int v_max, string format) + public static bool DragInt(string label, ref int v, float v_speed, int v_min, int v_max, string format) { byte* native_label; if (label != null) @@ -2902,16 +2650,11 @@ namespace ImGuiNET else { native_format = null; } fixed (int* native_v = &v) { - byte ret = ImGuiNative.igDragInt2(native_label, native_v, v_speed, v_min, v_max, native_format); + byte ret = ImGuiNative.igDragInt(native_label, native_v, v_speed, v_min, v_max, native_format); return ret != 0; } } - public static bool IsAnyItemActive() - { - byte ret = ImGuiNative.igIsAnyItemActive(); - return ret != 0; - } - public static bool MenuItem(string label) + public static bool DragInt2(string label, ref int v) { byte* native_label; if (label != null) @@ -2926,13 +2669,25 @@ namespace ImGuiNET } } else { native_label = null; } - byte* native_shortcut = null; - byte selected = 0; - byte enabled = 1; - byte ret = ImGuiNative.igMenuItemBool(native_label, native_shortcut, selected, enabled); - return ret != 0; + float v_speed = 1.0f; + int v_min = 0; + int v_max = 0; + byte* native_format; + int format_byteCount = Encoding.UTF8.GetByteCount("%d"); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = "%d") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt2(native_label, native_v, v_speed, v_min, v_max, native_format); + return ret != 0; + } } - public static bool MenuItem(string label, string shortcut) + public static bool DragInt2(string label, ref int v, float v_speed) { byte* native_label; if (label != null) @@ -2947,25 +2702,24 @@ namespace ImGuiNET } } else { native_label = null; } - byte* native_shortcut; - if (shortcut != null) - { - int shortcut_byteCount = Encoding.UTF8.GetByteCount(shortcut); - byte* native_shortcut_stackBytes = stackalloc byte[shortcut_byteCount + 1]; - native_shortcut = native_shortcut_stackBytes; - fixed (char* shortcut_ptr = shortcut) + int v_min = 0; + int v_max = 0; + byte* native_format; + int format_byteCount = Encoding.UTF8.GetByteCount("%d"); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = "%d") { - int native_shortcut_offset = Encoding.UTF8.GetBytes(shortcut_ptr, shortcut.Length, native_shortcut, shortcut_byteCount); - native_shortcut[native_shortcut_offset] = 0; + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt2(native_label, native_v, v_speed, v_min, v_max, native_format); + return ret != 0; } - else { native_shortcut = null; } - byte selected = 0; - byte enabled = 1; - byte ret = ImGuiNative.igMenuItemBool(native_label, native_shortcut, selected, enabled); - return ret != 0; } - public static bool MenuItem(string label, string shortcut, bool selected) + public static bool DragInt2(string label, ref int v, float v_speed, int v_min) { byte* native_label; if (label != null) @@ -2980,25 +2734,23 @@ namespace ImGuiNET } } else { native_label = null; } - byte* native_shortcut; - if (shortcut != null) - { - int shortcut_byteCount = Encoding.UTF8.GetByteCount(shortcut); - byte* native_shortcut_stackBytes = stackalloc byte[shortcut_byteCount + 1]; - native_shortcut = native_shortcut_stackBytes; - fixed (char* shortcut_ptr = shortcut) + int v_max = 0; + byte* native_format; + int format_byteCount = Encoding.UTF8.GetByteCount("%d"); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = "%d") { - int native_shortcut_offset = Encoding.UTF8.GetBytes(shortcut_ptr, shortcut.Length, native_shortcut, shortcut_byteCount); - native_shortcut[native_shortcut_offset] = 0; + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt2(native_label, native_v, v_speed, v_min, v_max, native_format); + return ret != 0; } - else { native_shortcut = null; } - byte native_selected = selected ? (byte)1 : (byte)0; - byte enabled = 1; - byte ret = ImGuiNative.igMenuItemBool(native_label, native_shortcut, native_selected, enabled); - return ret != 0; } - public static bool MenuItem(string label, string shortcut, bool selected, bool enabled) + public static bool DragInt2(string label, ref int v, float v_speed, int v_min, int v_max) { byte* native_label; if (label != null) @@ -3013,25 +2765,22 @@ namespace ImGuiNET } } else { native_label = null; } - byte* native_shortcut; - if (shortcut != null) - { - int shortcut_byteCount = Encoding.UTF8.GetByteCount(shortcut); - byte* native_shortcut_stackBytes = stackalloc byte[shortcut_byteCount + 1]; - native_shortcut = native_shortcut_stackBytes; - fixed (char* shortcut_ptr = shortcut) + byte* native_format; + int format_byteCount = Encoding.UTF8.GetByteCount("%d"); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = "%d") { - int native_shortcut_offset = Encoding.UTF8.GetBytes(shortcut_ptr, shortcut.Length, native_shortcut, shortcut_byteCount); - native_shortcut[native_shortcut_offset] = 0; + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt2(native_label, native_v, v_speed, v_min, v_max, native_format); + return ret != 0; } - else { native_shortcut = null; } - byte native_selected = selected ? (byte)1 : (byte)0; - byte native_enabled = enabled ? (byte)1 : (byte)0; - byte ret = ImGuiNative.igMenuItemBool(native_label, native_shortcut, native_selected, native_enabled); - return ret != 0; } - public static bool MenuItem(string label, string shortcut, ref bool p_selected) + public static bool DragInt2(string label, ref int v, float v_speed, int v_min, int v_max, string format) { byte* native_label; if (label != null) @@ -3046,27 +2795,26 @@ namespace ImGuiNET } } else { native_label = null; } - byte* native_shortcut; - if (shortcut != null) + byte* native_format; + if (format != null) { - int shortcut_byteCount = Encoding.UTF8.GetByteCount(shortcut); - byte* native_shortcut_stackBytes = stackalloc byte[shortcut_byteCount + 1]; - native_shortcut = native_shortcut_stackBytes; - fixed (char* shortcut_ptr = shortcut) + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = format) { - int native_shortcut_offset = Encoding.UTF8.GetBytes(shortcut_ptr, shortcut.Length, native_shortcut, shortcut_byteCount); - native_shortcut[native_shortcut_offset] = 0; + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; } } - else { native_shortcut = null; } - byte native_p_selected_val = p_selected ? (byte)1 : (byte)0; - byte* native_p_selected = &native_p_selected_val; - byte enabled = 1; - byte ret = ImGuiNative.igMenuItemBoolPtr(native_label, native_shortcut, native_p_selected, enabled); - p_selected = native_p_selected_val != 0; - return ret != 0; + else { native_format = null; } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt2(native_label, native_v, v_speed, v_min, v_max, native_format); + return ret != 0; + } } - public static bool MenuItem(string label, string shortcut, ref bool p_selected, bool enabled) + public static bool DragInt3(string label, ref int v) { byte* native_label; if (label != null) @@ -3081,27 +2829,25 @@ namespace ImGuiNET } } else { native_label = null; } - byte* native_shortcut; - if (shortcut != null) - { - int shortcut_byteCount = Encoding.UTF8.GetByteCount(shortcut); - byte* native_shortcut_stackBytes = stackalloc byte[shortcut_byteCount + 1]; - native_shortcut = native_shortcut_stackBytes; - fixed (char* shortcut_ptr = shortcut) + float v_speed = 1.0f; + int v_min = 0; + int v_max = 0; + byte* native_format; + int format_byteCount = Encoding.UTF8.GetByteCount("%d"); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = "%d") { - int native_shortcut_offset = Encoding.UTF8.GetBytes(shortcut_ptr, shortcut.Length, native_shortcut, shortcut_byteCount); - native_shortcut[native_shortcut_offset] = 0; + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt3(native_label, native_v, v_speed, v_min, v_max, native_format); + return ret != 0; } - else { native_shortcut = null; } - byte native_p_selected_val = p_selected ? (byte)1 : (byte)0; - byte* native_p_selected = &native_p_selected_val; - byte native_enabled = enabled ? (byte)1 : (byte)0; - byte ret = ImGuiNative.igMenuItemBoolPtr(native_label, native_shortcut, native_p_selected, native_enabled); - p_selected = native_p_selected_val != 0; - return ret != 0; } - public static bool SliderFloat4(string label, ref Vector4 v, float v_min, float v_max) + public static bool DragInt3(string label, ref int v, float v_speed) { byte* native_label; if (label != null) @@ -3116,23 +2862,24 @@ namespace ImGuiNET } } else { native_label = null; } + int v_min = 0; + int v_max = 0; byte* native_format; - int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + int format_byteCount = Encoding.UTF8.GetByteCount("%d"); byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; native_format = native_format_stackBytes; - fixed (char* format_ptr = "%.3f") + fixed (char* format_ptr = "%d") { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); native_format[native_format_offset] = 0; } - float power = 1.0f; - fixed (Vector4* native_v = &v) + fixed (int* native_v = &v) { - byte ret = ImGuiNative.igSliderFloat4(native_label, native_v, v_min, v_max, native_format, power); + byte ret = ImGuiNative.igDragInt3(native_label, native_v, v_speed, v_min, v_max, native_format); return ret != 0; } } - public static bool SliderFloat4(string label, ref Vector4 v, float v_min, float v_max, string format) + public static bool DragInt3(string label, ref int v, float v_speed, int v_min) { byte* native_label; if (label != null) @@ -3147,27 +2894,53 @@ namespace ImGuiNET } } else { native_label = null; } + int v_max = 0; byte* native_format; - if (format != null) - { - int format_byteCount = Encoding.UTF8.GetByteCount(format); + int format_byteCount = Encoding.UTF8.GetByteCount("%d"); byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; native_format = native_format_stackBytes; - fixed (char* format_ptr = format) + fixed (char* format_ptr = "%d") { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); native_format[native_format_offset] = 0; } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt3(native_label, native_v, v_speed, v_min, v_max, native_format); + return ret != 0; } - else { native_format = null; } - float power = 1.0f; - fixed (Vector4* native_v = &v) + } + public static bool DragInt3(string label, ref int v, float v_speed, int v_min, int v_max) + { + byte* native_label; + if (label != null) { - byte ret = ImGuiNative.igSliderFloat4(native_label, native_v, v_min, v_max, native_format, power); + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + } + else { native_label = null; } + byte* native_format; + int format_byteCount = Encoding.UTF8.GetByteCount("%d"); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = "%d") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt3(native_label, native_v, v_speed, v_min, v_max, native_format); return ret != 0; } } - public static bool SliderFloat4(string label, ref Vector4 v, float v_min, float v_max, string format, float power) + public static bool DragInt3(string label, ref int v, float v_speed, int v_min, int v_max, string format) { byte* native_label; if (label != null) @@ -3195,27 +2968,13 @@ namespace ImGuiNET } } else { native_format = null; } - fixed (Vector4* native_v = &v) + fixed (int* native_v = &v) { - byte ret = ImGuiNative.igSliderFloat4(native_label, native_v, v_min, v_max, native_format, power); + byte ret = ImGuiNative.igDragInt3(native_label, native_v, v_speed, v_min, v_max, native_format); return ret != 0; } } - public static float GetCursorPosX() - { - float ret = ImGuiNative.igGetCursorPosX(); - return ret; - } - public static int GetColumnsCount() - { - int ret = ImGuiNative.igGetColumnsCount(); - return ret; - } - public static void PopButtonRepeat() - { - ImGuiNative.igPopButtonRepeat(); - } - public static bool DragScalarN(string label, ImGuiDataType data_type, IntPtr v, int components, float v_speed) + public static bool DragInt4(string label, ref int v) { byte* native_label; if (label != null) @@ -3230,15 +2989,25 @@ namespace ImGuiNET } } else { native_label = null; } - void* native_v = (void*)v.ToPointer(); - void* v_min = null; - void* v_max = null; - byte* native_format = null; - float power = 1.0f; - byte ret = ImGuiNative.igDragScalarN(native_label, data_type, native_v, components, v_speed, v_min, v_max, native_format, power); - return ret != 0; + float v_speed = 1.0f; + int v_min = 0; + int v_max = 0; + byte* native_format; + int format_byteCount = Encoding.UTF8.GetByteCount("%d"); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = "%d") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt4(native_label, native_v, v_speed, v_min, v_max, native_format); + return ret != 0; + } } - public static bool DragScalarN(string label, ImGuiDataType data_type, IntPtr v, int components, float v_speed, IntPtr v_min) + public static bool DragInt4(string label, ref int v, float v_speed) { byte* native_label; if (label != null) @@ -3253,15 +3022,24 @@ namespace ImGuiNET } } else { native_label = null; } - void* native_v = (void*)v.ToPointer(); - void* native_v_min = (void*)v_min.ToPointer(); - void* v_max = null; - byte* native_format = null; - float power = 1.0f; - byte ret = ImGuiNative.igDragScalarN(native_label, data_type, native_v, components, v_speed, native_v_min, v_max, native_format, power); - return ret != 0; + int v_min = 0; + int v_max = 0; + byte* native_format; + int format_byteCount = Encoding.UTF8.GetByteCount("%d"); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = "%d") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt4(native_label, native_v, v_speed, v_min, v_max, native_format); + return ret != 0; + } } - public static bool DragScalarN(string label, ImGuiDataType data_type, IntPtr v, int components, float v_speed, IntPtr v_min, IntPtr v_max) + public static bool DragInt4(string label, ref int v, float v_speed, int v_min) { byte* native_label; if (label != null) @@ -3276,15 +3054,23 @@ namespace ImGuiNET } } else { native_label = null; } - void* native_v = (void*)v.ToPointer(); - void* native_v_min = (void*)v_min.ToPointer(); - void* native_v_max = (void*)v_max.ToPointer(); - byte* native_format = null; - float power = 1.0f; - byte ret = ImGuiNative.igDragScalarN(native_label, data_type, native_v, components, v_speed, native_v_min, native_v_max, native_format, power); - return ret != 0; + int v_max = 0; + byte* native_format; + int format_byteCount = Encoding.UTF8.GetByteCount("%d"); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = "%d") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt4(native_label, native_v, v_speed, v_min, v_max, native_format); + return ret != 0; + } } - public static bool DragScalarN(string label, ImGuiDataType data_type, IntPtr v, int components, float v_speed, IntPtr v_min, IntPtr v_max, string format) + public static bool DragInt4(string label, ref int v, float v_speed, int v_min, int v_max) { byte* native_label; if (label != null) @@ -3299,27 +3085,22 @@ namespace ImGuiNET } } else { native_label = null; } - void* native_v = (void*)v.ToPointer(); - void* native_v_min = (void*)v_min.ToPointer(); - void* native_v_max = (void*)v_max.ToPointer(); byte* native_format; - if (format != null) - { - int format_byteCount = Encoding.UTF8.GetByteCount(format); + int format_byteCount = Encoding.UTF8.GetByteCount("%d"); byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; native_format = native_format_stackBytes; - fixed (char* format_ptr = format) + fixed (char* format_ptr = "%d") { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); native_format[native_format_offset] = 0; } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt4(native_label, native_v, v_speed, v_min, v_max, native_format); + return ret != 0; } - else { native_format = null; } - float power = 1.0f; - byte ret = ImGuiNative.igDragScalarN(native_label, data_type, native_v, components, v_speed, native_v_min, native_v_max, native_format, power); - return ret != 0; } - public static bool DragScalarN(string label, ImGuiDataType data_type, IntPtr v, int components, float v_speed, IntPtr v_min, IntPtr v_max, string format, float power) + public static bool DragInt4(string label, ref int v, float v_speed, int v_min, int v_max, string format) { byte* native_label; if (label != null) @@ -3334,9 +3115,6 @@ namespace ImGuiNET } } else { native_label = null; } - void* native_v = (void*)v.ToPointer(); - void* native_v_min = (void*)v_min.ToPointer(); - void* native_v_max = (void*)v_max.ToPointer(); byte* native_format; if (format != null) { @@ -3350,148 +3128,50 @@ namespace ImGuiNET } } else { native_format = null; } - byte ret = ImGuiNative.igDragScalarN(native_label, data_type, native_v, components, v_speed, native_v_min, native_v_max, native_format, power); - return ret != 0; - } - public static void Spacing() - { - ImGuiNative.igSpacing(); - } - public static bool IsAnyItemFocused() - { - byte ret = ImGuiNative.igIsAnyItemFocused(); - return ret != 0; - } - public static void MemFree(IntPtr ptr) - { - void* native_ptr = (void*)ptr.ToPointer(); - ImGuiNative.igMemFree(native_ptr); - } - public static Vector2 GetFontTexUvWhitePixel() - { - Vector2 ret = ImGuiNative.igGetFontTexUvWhitePixel(); - return ret; - } - public static bool IsItemClicked() - { - int mouse_button = 0; - byte ret = ImGuiNative.igIsItemClicked(mouse_button); - return ret != 0; - } - public static bool IsItemClicked(int mouse_button) - { - byte ret = ImGuiNative.igIsItemClicked(mouse_button); - return ret != 0; - } - public static void ProgressBar(float fraction) - { - Vector2 size_arg = new Vector2(-1, 0); - byte* native_overlay = null; - ImGuiNative.igProgressBar(fraction, size_arg, native_overlay); - } - public static void ProgressBar(float fraction, Vector2 size_arg) - { - byte* native_overlay = null; - ImGuiNative.igProgressBar(fraction, size_arg, native_overlay); - } - public static void ProgressBar(float fraction, Vector2 size_arg, string overlay) - { - byte* native_overlay; - if (overlay != null) + fixed (int* native_v = &v) { - int overlay_byteCount = Encoding.UTF8.GetByteCount(overlay); - byte* native_overlay_stackBytes = stackalloc byte[overlay_byteCount + 1]; - native_overlay = native_overlay_stackBytes; - fixed (char* overlay_ptr = overlay) - { - int native_overlay_offset = Encoding.UTF8.GetBytes(overlay_ptr, overlay.Length, native_overlay, overlay_byteCount); - native_overlay[native_overlay_offset] = 0; - } + byte ret = ImGuiNative.igDragInt4(native_label, native_v, v_speed, v_min, v_max, native_format); + return ret != 0; } - else { native_overlay = null; } - ImGuiNative.igProgressBar(fraction, size_arg, native_overlay); - } - public static void SetNextWindowBgAlpha(float alpha) - { - ImGuiNative.igSetNextWindowBgAlpha(alpha); } - public static bool BeginPopup(string str_id) + public static bool DragIntRange2(string label, ref int v_current_min, ref int v_current_max) { - byte* native_str_id; - if (str_id != null) + byte* native_label; + if (label != null) { - int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); - byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; - native_str_id = native_str_id_stackBytes; - fixed (char* str_id_ptr = str_id) + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + fixed (char* label_ptr = label) { - int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); - native_str_id[native_str_id_offset] = 0; + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; } } - else { native_str_id = null; } - ImGuiWindowFlags flags = 0; - byte ret = ImGuiNative.igBeginPopup(native_str_id, flags); - return ret != 0; - } - public static bool BeginPopup(string str_id, ImGuiWindowFlags flags) - { - byte* native_str_id; - if (str_id != null) - { - int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); - byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; - native_str_id = native_str_id_stackBytes; - fixed (char* str_id_ptr = str_id) - { - int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); - native_str_id[native_str_id_offset] = 0; + else { native_label = null; } + float v_speed = 1.0f; + int v_min = 0; + int v_max = 0; + byte* native_format; + int format_byteCount = Encoding.UTF8.GetByteCount("%d"); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = "%d") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; } - } - else { native_str_id = null; } - byte ret = ImGuiNative.igBeginPopup(native_str_id, flags); - return ret != 0; - } - public static float GetScrollX() - { - float ret = ImGuiNative.igGetScrollX(); - return ret; - } - public static int GetKeyIndex(ImGuiKey imgui_key) - { - int ret = ImGuiNative.igGetKeyIndex(imgui_key); - return ret; - } - public static ImDrawListPtr GetOverlayDrawList() - { - ImDrawList* ret = ImGuiNative.igGetOverlayDrawList(); - return new ImDrawListPtr(ret); - } - public static uint GetID(string str_id) - { - byte* native_str_id; - if (str_id != null) + byte* native_format_max = null; + fixed (int* native_v_current_min = &v_current_min) { - int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); - byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; - native_str_id = native_str_id_stackBytes; - fixed (char* str_id_ptr = str_id) + fixed (int* native_v_current_max = &v_current_max) { - int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); - native_str_id[native_str_id_offset] = 0; + byte ret = ImGuiNative.igDragIntRange2(native_label, native_v_current_min, native_v_current_max, v_speed, v_min, v_max, native_format, native_format_max); + return ret != 0; } } - else { native_str_id = null; } - uint ret = ImGuiNative.igGetIDStr(native_str_id); - return ret; - } - public static uint GetID(IntPtr ptr_id) - { - void* native_ptr_id = (void*)ptr_id.ToPointer(); - uint ret = ImGuiNative.igGetIDPtr(native_ptr_id); - return ret; } - public static bool ListBoxHeader(string label) + public static bool DragIntRange2(string label, ref int v_current_min, ref int v_current_max, float v_speed) { byte* native_label; if (label != null) @@ -3506,11 +3186,28 @@ namespace ImGuiNET } } else { native_label = null; } - Vector2 size = new Vector2(); - byte ret = ImGuiNative.igListBoxHeaderVec2(native_label, size); - return ret != 0; + int v_min = 0; + int v_max = 0; + byte* native_format; + int format_byteCount = Encoding.UTF8.GetByteCount("%d"); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = "%d") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + byte* native_format_max = null; + fixed (int* native_v_current_min = &v_current_min) + { + fixed (int* native_v_current_max = &v_current_max) + { + byte ret = ImGuiNative.igDragIntRange2(native_label, native_v_current_min, native_v_current_max, v_speed, v_min, v_max, native_format, native_format_max); + return ret != 0; + } + } } - public static bool ListBoxHeader(string label, Vector2 size) + public static bool DragIntRange2(string label, ref int v_current_min, ref int v_current_max, float v_speed, int v_min) { byte* native_label; if (label != null) @@ -3525,10 +3222,27 @@ namespace ImGuiNET } } else { native_label = null; } - byte ret = ImGuiNative.igListBoxHeaderVec2(native_label, size); - return ret != 0; + int v_max = 0; + byte* native_format; + int format_byteCount = Encoding.UTF8.GetByteCount("%d"); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = "%d") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + byte* native_format_max = null; + fixed (int* native_v_current_min = &v_current_min) + { + fixed (int* native_v_current_max = &v_current_max) + { + byte ret = ImGuiNative.igDragIntRange2(native_label, native_v_current_min, native_v_current_max, v_speed, v_min, v_max, native_format, native_format_max); + return ret != 0; + } + } } - public static bool ListBoxHeader(string label, int items_count) + public static bool DragIntRange2(string label, ref int v_current_min, ref int v_current_max, float v_speed, int v_min, int v_max) { byte* native_label; if (label != null) @@ -3543,11 +3257,26 @@ namespace ImGuiNET } } else { native_label = null; } - int height_in_items = -1; - byte ret = ImGuiNative.igListBoxHeaderInt(native_label, items_count, height_in_items); - return ret != 0; + byte* native_format; + int format_byteCount = Encoding.UTF8.GetByteCount("%d"); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = "%d") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + byte* native_format_max = null; + fixed (int* native_v_current_min = &v_current_min) + { + fixed (int* native_v_current_max = &v_current_max) + { + byte ret = ImGuiNative.igDragIntRange2(native_label, native_v_current_min, native_v_current_max, v_speed, v_min, v_max, native_format, native_format_max); + return ret != 0; + } + } } - public static bool ListBoxHeader(string label, int items_count, int height_in_items) + public static bool DragIntRange2(string label, ref int v_current_min, ref int v_current_max, float v_speed, int v_min, int v_max, string format) { byte* native_label; if (label != null) @@ -3562,132 +3291,80 @@ namespace ImGuiNET } } else { native_label = null; } - byte ret = ImGuiNative.igListBoxHeaderInt(native_label, items_count, height_in_items); - return ret != 0; - } - public static bool IsMouseReleased(int button) - { - byte ret = ImGuiNative.igIsMouseReleased(button); - return ret != 0; - } - public static Vector2 GetItemRectMin() - { - Vector2 ret = ImGuiNative.igGetItemRectMin(); - return ret; - } - public static void LogText(string fmt) - { - byte* native_fmt; - if (fmt != null) + byte* native_format; + if (format != null) { - int fmt_byteCount = Encoding.UTF8.GetByteCount(fmt); - byte* native_fmt_stackBytes = stackalloc byte[fmt_byteCount + 1]; - native_fmt = native_fmt_stackBytes; - fixed (char* fmt_ptr = fmt) + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = format) { - int native_fmt_offset = Encoding.UTF8.GetBytes(fmt_ptr, fmt.Length, native_fmt, fmt_byteCount); - native_fmt[native_fmt_offset] = 0; + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; } } - else { native_fmt = null; } - ImGuiNative.igLogText(native_fmt); - } - public static void TextWrapped(string fmt) - { - byte* native_fmt; - if (fmt != null) + else { native_format = null; } + byte* native_format_max = null; + fixed (int* native_v_current_min = &v_current_min) { - int fmt_byteCount = Encoding.UTF8.GetByteCount(fmt); - byte* native_fmt_stackBytes = stackalloc byte[fmt_byteCount + 1]; - native_fmt = native_fmt_stackBytes; - fixed (char* fmt_ptr = fmt) + fixed (int* native_v_current_max = &v_current_max) { - int native_fmt_offset = Encoding.UTF8.GetBytes(fmt_ptr, fmt.Length, native_fmt, fmt_byteCount); - native_fmt[native_fmt_offset] = 0; + byte ret = ImGuiNative.igDragIntRange2(native_label, native_v_current_min, native_v_current_max, v_speed, v_min, v_max, native_format, native_format_max); + return ret != 0; } } - else { native_fmt = null; } - ImGuiNative.igTextWrapped(native_fmt); - } - public static void EndGroup() - { - ImGuiNative.igEndGroup(); - } - public static ImFontPtr GetFont() - { - ImFont* ret = ImGuiNative.igGetFont(); - return new ImFontPtr(ret); } - public static void TreePush(string str_id) + public static bool DragIntRange2(string label, ref int v_current_min, ref int v_current_max, float v_speed, int v_min, int v_max, string format, string format_max) { - byte* native_str_id; - if (str_id != null) + byte* native_label; + if (label != null) { - int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); - byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; - native_str_id = native_str_id_stackBytes; - fixed (char* str_id_ptr = str_id) + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + fixed (char* label_ptr = label) { - int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); - native_str_id[native_str_id_offset] = 0; + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; } } - else { native_str_id = null; } - ImGuiNative.igTreePushStr(native_str_id); - } - public static void TreePush() - { - void* ptr_id = null; - ImGuiNative.igTreePushPtr(ptr_id); - } - public static void TreePush(IntPtr ptr_id) - { - void* native_ptr_id = (void*)ptr_id.ToPointer(); - ImGuiNative.igTreePushPtr(native_ptr_id); - } - public static void TextDisabled(string fmt) - { - byte* native_fmt; - if (fmt != null) + else { native_label = null; } + byte* native_format; + if (format != null) { - int fmt_byteCount = Encoding.UTF8.GetByteCount(fmt); - byte* native_fmt_stackBytes = stackalloc byte[fmt_byteCount + 1]; - native_fmt = native_fmt_stackBytes; - fixed (char* fmt_ptr = fmt) + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = format) { - int native_fmt_offset = Encoding.UTF8.GetBytes(fmt_ptr, fmt.Length, native_fmt, fmt_byteCount); - native_fmt[native_fmt_offset] = 0; + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + } + else { native_format = null; } + byte* native_format_max; + if (format_max != null) + { + int format_max_byteCount = Encoding.UTF8.GetByteCount(format_max); + byte* native_format_max_stackBytes = stackalloc byte[format_max_byteCount + 1]; + native_format_max = native_format_max_stackBytes; + fixed (char* format_max_ptr = format_max) + { + int native_format_max_offset = Encoding.UTF8.GetBytes(format_max_ptr, format_max.Length, native_format_max, format_max_byteCount); + native_format_max[native_format_max_offset] = 0; + } + } + else { native_format_max = null; } + fixed (int* native_v_current_min = &v_current_min) + { + fixed (int* native_v_current_max = &v_current_max) + { + byte ret = ImGuiNative.igDragIntRange2(native_label, native_v_current_min, native_v_current_max, v_speed, v_min, v_max, native_format, native_format_max); + return ret != 0; } } - else { native_fmt = null; } - ImGuiNative.igTextDisabled(native_fmt); - } - public static void SetNextTreeNodeOpen(bool is_open) - { - byte native_is_open = is_open ? (byte)1 : (byte)0; - ImGuiCond cond = 0; - ImGuiNative.igSetNextTreeNodeOpen(native_is_open, cond); - } - public static void SetNextTreeNodeOpen(bool is_open, ImGuiCond cond) - { - byte native_is_open = is_open ? (byte)1 : (byte)0; - ImGuiNative.igSetNextTreeNodeOpen(native_is_open, cond); - } - public static void LogToTTY() - { - int max_depth = -1; - ImGuiNative.igLogToTTY(max_depth); - } - public static void LogToTTY(int max_depth) - { - ImGuiNative.igLogToTTY(max_depth); - } - public static ImGuiIOPtr GetIO() - { - ImGuiIO* ret = ImGuiNative.igGetIO(); - return new ImGuiIOPtr(ret); } - public static bool DragInt4(string label, ref int v) + public static bool DragScalar(string label, ImGuiDataType data_type, IntPtr v, float v_speed) { byte* native_label; if (label != null) @@ -3702,25 +3379,15 @@ namespace ImGuiNET } } else { native_label = null; } - float v_speed = 1.0f; - int v_min = 0; - int v_max = 0; - byte* native_format; - int format_byteCount = Encoding.UTF8.GetByteCount("%d"); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = "%d") - { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; - } - fixed (int* native_v = &v) - { - byte ret = ImGuiNative.igDragInt4(native_label, native_v, v_speed, v_min, v_max, native_format); - return ret != 0; - } + void* native_v = (void*)v.ToPointer(); + void* v_min = null; + void* v_max = null; + byte* native_format = null; + float power = 1.0f; + byte ret = ImGuiNative.igDragScalar(native_label, data_type, native_v, v_speed, v_min, v_max, native_format, power); + return ret != 0; } - public static bool DragInt4(string label, ref int v, float v_speed) + public static bool DragScalar(string label, ImGuiDataType data_type, IntPtr v, float v_speed, IntPtr v_min) { byte* native_label; if (label != null) @@ -3735,24 +3402,15 @@ namespace ImGuiNET } } else { native_label = null; } - int v_min = 0; - int v_max = 0; - byte* native_format; - int format_byteCount = Encoding.UTF8.GetByteCount("%d"); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = "%d") - { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; - } - fixed (int* native_v = &v) - { - byte ret = ImGuiNative.igDragInt4(native_label, native_v, v_speed, v_min, v_max, native_format); - return ret != 0; - } + void* native_v = (void*)v.ToPointer(); + void* native_v_min = (void*)v_min.ToPointer(); + void* v_max = null; + byte* native_format = null; + float power = 1.0f; + byte ret = ImGuiNative.igDragScalar(native_label, data_type, native_v, v_speed, native_v_min, v_max, native_format, power); + return ret != 0; } - public static bool DragInt4(string label, ref int v, float v_speed, int v_min) + public static bool DragScalar(string label, ImGuiDataType data_type, IntPtr v, float v_speed, IntPtr v_min, IntPtr v_max) { byte* native_label; if (label != null) @@ -3767,23 +3425,15 @@ namespace ImGuiNET } } else { native_label = null; } - int v_max = 0; - byte* native_format; - int format_byteCount = Encoding.UTF8.GetByteCount("%d"); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = "%d") - { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; - } - fixed (int* native_v = &v) - { - byte ret = ImGuiNative.igDragInt4(native_label, native_v, v_speed, v_min, v_max, native_format); - return ret != 0; - } + void* native_v = (void*)v.ToPointer(); + void* native_v_min = (void*)v_min.ToPointer(); + void* native_v_max = (void*)v_max.ToPointer(); + byte* native_format = null; + float power = 1.0f; + byte ret = ImGuiNative.igDragScalar(native_label, data_type, native_v, v_speed, native_v_min, native_v_max, native_format, power); + return ret != 0; } - public static bool DragInt4(string label, ref int v, float v_speed, int v_min, int v_max) + public static bool DragScalar(string label, ImGuiDataType data_type, IntPtr v, float v_speed, IntPtr v_min, IntPtr v_max, string format) { byte* native_label; if (label != null) @@ -3798,22 +3448,27 @@ namespace ImGuiNET } } else { native_label = null; } + void* native_v = (void*)v.ToPointer(); + void* native_v_min = (void*)v_min.ToPointer(); + void* native_v_max = (void*)v_max.ToPointer(); byte* native_format; - int format_byteCount = Encoding.UTF8.GetByteCount("%d"); + if (format != null) + { + int format_byteCount = Encoding.UTF8.GetByteCount(format); byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; native_format = native_format_stackBytes; - fixed (char* format_ptr = "%d") + fixed (char* format_ptr = format) { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); native_format[native_format_offset] = 0; } - fixed (int* native_v = &v) - { - byte ret = ImGuiNative.igDragInt4(native_label, native_v, v_speed, v_min, v_max, native_format); - return ret != 0; } + else { native_format = null; } + float power = 1.0f; + byte ret = ImGuiNative.igDragScalar(native_label, data_type, native_v, v_speed, native_v_min, native_v_max, native_format, power); + return ret != 0; } - public static bool DragInt4(string label, ref int v, float v_speed, int v_min, int v_max, string format) + public static bool DragScalar(string label, ImGuiDataType data_type, IntPtr v, float v_speed, IntPtr v_min, IntPtr v_max, string format, float power) { byte* native_label; if (label != null) @@ -3828,6 +3483,9 @@ namespace ImGuiNET } } else { native_label = null; } + void* native_v = (void*)v.ToPointer(); + void* native_v_min = (void*)v_min.ToPointer(); + void* native_v_max = (void*)v_max.ToPointer(); byte* native_format; if (format != null) { @@ -3841,84 +3499,56 @@ namespace ImGuiNET } } else { native_format = null; } - fixed (int* native_v = &v) - { - byte ret = ImGuiNative.igDragInt4(native_label, native_v, v_speed, v_min, v_max, native_format); - return ret != 0; - } - } - public static void NextColumn() - { - ImGuiNative.igNextColumn(); - } - public static void SetCursorPos(Vector2 local_pos) - { - ImGuiNative.igSetCursorPos(local_pos); - } - public static bool BeginPopupModal(string name) - { - byte* native_name; - if (name != null) - { - int name_byteCount = Encoding.UTF8.GetByteCount(name); - byte* native_name_stackBytes = stackalloc byte[name_byteCount + 1]; - native_name = native_name_stackBytes; - fixed (char* name_ptr = name) - { - int native_name_offset = Encoding.UTF8.GetBytes(name_ptr, name.Length, native_name, name_byteCount); - native_name[native_name_offset] = 0; - } - } - else { native_name = null; } - byte* p_open = null; - ImGuiWindowFlags flags = 0; - byte ret = ImGuiNative.igBeginPopupModal(native_name, p_open, flags); + byte ret = ImGuiNative.igDragScalar(native_label, data_type, native_v, v_speed, native_v_min, native_v_max, native_format, power); return ret != 0; } - public static bool BeginPopupModal(string name, ref bool p_open) + public static bool DragScalarN(string label, ImGuiDataType data_type, IntPtr v, int components, float v_speed) { - byte* native_name; - if (name != null) + byte* native_label; + if (label != null) { - int name_byteCount = Encoding.UTF8.GetByteCount(name); - byte* native_name_stackBytes = stackalloc byte[name_byteCount + 1]; - native_name = native_name_stackBytes; - fixed (char* name_ptr = name) + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + fixed (char* label_ptr = label) { - int native_name_offset = Encoding.UTF8.GetBytes(name_ptr, name.Length, native_name, name_byteCount); - native_name[native_name_offset] = 0; + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; } } - else { native_name = null; } - byte native_p_open_val = p_open ? (byte)1 : (byte)0; - byte* native_p_open = &native_p_open_val; - ImGuiWindowFlags flags = 0; - byte ret = ImGuiNative.igBeginPopupModal(native_name, native_p_open, flags); - p_open = native_p_open_val != 0; + else { native_label = null; } + void* native_v = (void*)v.ToPointer(); + void* v_min = null; + void* v_max = null; + byte* native_format = null; + float power = 1.0f; + byte ret = ImGuiNative.igDragScalarN(native_label, data_type, native_v, components, v_speed, v_min, v_max, native_format, power); return ret != 0; } - public static bool BeginPopupModal(string name, ref bool p_open, ImGuiWindowFlags flags) + public static bool DragScalarN(string label, ImGuiDataType data_type, IntPtr v, int components, float v_speed, IntPtr v_min) { - byte* native_name; - if (name != null) + byte* native_label; + if (label != null) { - int name_byteCount = Encoding.UTF8.GetByteCount(name); - byte* native_name_stackBytes = stackalloc byte[name_byteCount + 1]; - native_name = native_name_stackBytes; - fixed (char* name_ptr = name) + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + fixed (char* label_ptr = label) { - int native_name_offset = Encoding.UTF8.GetBytes(name_ptr, name.Length, native_name, name_byteCount); - native_name[native_name_offset] = 0; + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; } } - else { native_name = null; } - byte native_p_open_val = p_open ? (byte)1 : (byte)0; - byte* native_p_open = &native_p_open_val; - byte ret = ImGuiNative.igBeginPopupModal(native_name, native_p_open, flags); - p_open = native_p_open_val != 0; + else { native_label = null; } + void* native_v = (void*)v.ToPointer(); + void* native_v_min = (void*)v_min.ToPointer(); + void* v_max = null; + byte* native_format = null; + float power = 1.0f; + byte ret = ImGuiNative.igDragScalarN(native_label, data_type, native_v, components, v_speed, native_v_min, v_max, native_format, power); return ret != 0; } - public static bool SliderInt4(string label, ref int v, int v_min, int v_max) + public static bool DragScalarN(string label, ImGuiDataType data_type, IntPtr v, int components, float v_speed, IntPtr v_min, IntPtr v_max) { byte* native_label; if (label != null) @@ -3933,22 +3563,15 @@ namespace ImGuiNET } } else { native_label = null; } - byte* native_format; - int format_byteCount = Encoding.UTF8.GetByteCount("%d"); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = "%d") - { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; - } - fixed (int* native_v = &v) - { - byte ret = ImGuiNative.igSliderInt4(native_label, native_v, v_min, v_max, native_format); - return ret != 0; - } + void* native_v = (void*)v.ToPointer(); + void* native_v_min = (void*)v_min.ToPointer(); + void* native_v_max = (void*)v_max.ToPointer(); + byte* native_format = null; + float power = 1.0f; + byte ret = ImGuiNative.igDragScalarN(native_label, data_type, native_v, components, v_speed, native_v_min, native_v_max, native_format, power); + return ret != 0; } - public static bool SliderInt4(string label, ref int v, int v_min, int v_max, string format) + public static bool DragScalarN(string label, ImGuiDataType data_type, IntPtr v, int components, float v_speed, IntPtr v_min, IntPtr v_max, string format) { byte* native_label; if (label != null) @@ -3963,7 +3586,10 @@ namespace ImGuiNET } } else { native_label = null; } - byte* native_format; + void* native_v = (void*)v.ToPointer(); + void* native_v_min = (void*)v_min.ToPointer(); + void* native_v_max = (void*)v_max.ToPointer(); + byte* native_format; if (format != null) { int format_byteCount = Encoding.UTF8.GetByteCount(format); @@ -3976,428 +3602,525 @@ namespace ImGuiNET } } else { native_format = null; } - fixed (int* native_v = &v) + float power = 1.0f; + byte ret = ImGuiNative.igDragScalarN(native_label, data_type, native_v, components, v_speed, native_v_min, native_v_max, native_format, power); + return ret != 0; + } + public static bool DragScalarN(string label, ImGuiDataType data_type, IntPtr v, int components, float v_speed, IntPtr v_min, IntPtr v_max, string format, float power) + { + byte* native_label; + if (label != null) { - byte ret = ImGuiNative.igSliderInt4(native_label, native_v, v_min, v_max, native_format); - return ret != 0; + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + } + else { native_label = null; } + void* native_v = (void*)v.ToPointer(); + void* native_v_min = (void*)v_min.ToPointer(); + void* native_v_max = (void*)v_max.ToPointer(); + byte* native_format; + if (format != null) + { + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } } + else { native_format = null; } + byte ret = ImGuiNative.igDragScalarN(native_label, data_type, native_v, components, v_speed, native_v_min, native_v_max, native_format, power); + return ret != 0; } - public static void ShowMetricsWindow() + public static void Dummy(Vector2 size) { - byte* p_open = null; - ImGuiNative.igShowMetricsWindow(p_open); + ImGuiNative.igDummy(size); } - public static void ShowMetricsWindow(ref bool p_open) + public static void End() { - byte native_p_open_val = p_open ? (byte)1 : (byte)0; - byte* native_p_open = &native_p_open_val; - ImGuiNative.igShowMetricsWindow(native_p_open); - p_open = native_p_open_val != 0; + ImGuiNative.igEnd(); } - public static float GetScrollMaxY() + public static void EndChild() { - float ret = ImGuiNative.igGetScrollMaxY(); - return ret; + ImGuiNative.igEndChild(); } - public static void BeginTooltip() + public static void EndChildFrame() { - ImGuiNative.igBeginTooltip(); + ImGuiNative.igEndChildFrame(); } - public static void SetScrollX(float scroll_x) + public static void EndCombo() { - ImGuiNative.igSetScrollX(scroll_x); + ImGuiNative.igEndCombo(); } - public static ImDrawDataPtr GetDrawData() + public static void EndDragDropSource() { - ImDrawData* ret = ImGuiNative.igGetDrawData(); - return new ImDrawDataPtr(ret); + ImGuiNative.igEndDragDropSource(); } - public static float GetTextLineHeight() + public static void EndDragDropTarget() { - float ret = ImGuiNative.igGetTextLineHeight(); - return ret; + ImGuiNative.igEndDragDropTarget(); } - public static void Separator() + public static void EndFrame() { - ImGuiNative.igSeparator(); + ImGuiNative.igEndFrame(); } - public static bool BeginChild(string str_id) + public static void EndGroup() { - byte* native_str_id; - if (str_id != null) - { - int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); - byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; - native_str_id = native_str_id_stackBytes; - fixed (char* str_id_ptr = str_id) - { - int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); - native_str_id[native_str_id_offset] = 0; - } - } - else { native_str_id = null; } - Vector2 size = new Vector2(); - byte border = 0; - ImGuiWindowFlags flags = 0; - byte ret = ImGuiNative.igBeginChild(native_str_id, size, border, flags); - return ret != 0; + ImGuiNative.igEndGroup(); } - public static bool BeginChild(string str_id, Vector2 size) + public static void EndMainMenuBar() { - byte* native_str_id; - if (str_id != null) - { - int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); - byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; - native_str_id = native_str_id_stackBytes; - fixed (char* str_id_ptr = str_id) - { - int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); - native_str_id[native_str_id_offset] = 0; - } - } - else { native_str_id = null; } - byte border = 0; - ImGuiWindowFlags flags = 0; - byte ret = ImGuiNative.igBeginChild(native_str_id, size, border, flags); - return ret != 0; + ImGuiNative.igEndMainMenuBar(); } - public static bool BeginChild(string str_id, Vector2 size, bool border) + public static void EndMenu() { - byte* native_str_id; - if (str_id != null) - { - int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); - byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; - native_str_id = native_str_id_stackBytes; - fixed (char* str_id_ptr = str_id) - { - int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); - native_str_id[native_str_id_offset] = 0; - } - } - else { native_str_id = null; } - byte native_border = border ? (byte)1 : (byte)0; - ImGuiWindowFlags flags = 0; - byte ret = ImGuiNative.igBeginChild(native_str_id, size, native_border, flags); - return ret != 0; + ImGuiNative.igEndMenu(); } - public static bool BeginChild(string str_id, Vector2 size, bool border, ImGuiWindowFlags flags) + public static void EndMenuBar() { - byte* native_str_id; - if (str_id != null) - { - int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); - byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; - native_str_id = native_str_id_stackBytes; - fixed (char* str_id_ptr = str_id) - { - int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); - native_str_id[native_str_id_offset] = 0; - } - } - else { native_str_id = null; } - byte native_border = border ? (byte)1 : (byte)0; - byte ret = ImGuiNative.igBeginChild(native_str_id, size, native_border, flags); - return ret != 0; + ImGuiNative.igEndMenuBar(); } - public static bool BeginChild(uint id) + public static void EndPopup() { - Vector2 size = new Vector2(); - byte border = 0; - ImGuiWindowFlags flags = 0; - byte ret = ImGuiNative.igBeginChildID(id, size, border, flags); - return ret != 0; + ImGuiNative.igEndPopup(); } - public static bool BeginChild(uint id, Vector2 size) + public static void EndTooltip() { - byte border = 0; - ImGuiWindowFlags flags = 0; - byte ret = ImGuiNative.igBeginChildID(id, size, border, flags); - return ret != 0; + ImGuiNative.igEndTooltip(); } - public static bool BeginChild(uint id, Vector2 size, bool border) + public static string GetClipboardText() { - byte native_border = border ? (byte)1 : (byte)0; - ImGuiWindowFlags flags = 0; - byte ret = ImGuiNative.igBeginChildID(id, size, native_border, flags); - return ret != 0; + byte* ret = ImGuiNative.igGetClipboardText(); + return Util.StringFromPtr(ret); } - public static bool BeginChild(uint id, Vector2 size, bool border, ImGuiWindowFlags flags) + public static uint GetColorU32(ImGuiCol idx) { - byte native_border = border ? (byte)1 : (byte)0; - byte ret = ImGuiNative.igBeginChildID(id, size, native_border, flags); - return ret != 0; + float alpha_mul = 1.0f; + uint ret = ImGuiNative.igGetColorU32(idx, alpha_mul); + return ret; } - public static bool IsMouseClicked(int button) + public static uint GetColorU32(ImGuiCol idx, float alpha_mul) { - byte repeat = 0; - byte ret = ImGuiNative.igIsMouseClicked(button, repeat); - return ret != 0; + uint ret = ImGuiNative.igGetColorU32(idx, alpha_mul); + return ret; } - public static bool IsMouseClicked(int button, bool repeat) + public static uint GetColorU32(Vector4 col) { - byte native_repeat = repeat ? (byte)1 : (byte)0; - byte ret = ImGuiNative.igIsMouseClicked(button, native_repeat); - return ret != 0; + uint ret = ImGuiNative.igGetColorU32Vec4(col); + return ret; } - public static float CalcItemWidth() + public static uint GetColorU32(uint col) { - float ret = ImGuiNative.igCalcItemWidth(); + uint ret = ImGuiNative.igGetColorU32U32(col); return ret; } - public static void EndChildFrame() + public static int GetColumnIndex() { - ImGuiNative.igEndChildFrame(); + int ret = ImGuiNative.igGetColumnIndex(); + return ret; } - public static void Indent() + public static float GetColumnOffset() { - float indent_w = 0.0f; - ImGuiNative.igIndent(indent_w); + int column_index = -1; + float ret = ImGuiNative.igGetColumnOffset(column_index); + return ret; } - public static void Indent(float indent_w) + public static float GetColumnOffset(int column_index) { - ImGuiNative.igIndent(indent_w); + float ret = ImGuiNative.igGetColumnOffset(column_index); + return ret; } - public static bool SetDragDropPayload(string type, IntPtr data, uint size) + public static int GetColumnsCount() { - byte* native_type; - if (type != null) - { - int type_byteCount = Encoding.UTF8.GetByteCount(type); - byte* native_type_stackBytes = stackalloc byte[type_byteCount + 1]; - native_type = native_type_stackBytes; - fixed (char* type_ptr = type) - { - int native_type_offset = Encoding.UTF8.GetBytes(type_ptr, type.Length, native_type, type_byteCount); - native_type[native_type_offset] = 0; - } - } - else { native_type = null; } - void* native_data = (void*)data.ToPointer(); - ImGuiCond cond = 0; - byte ret = ImGuiNative.igSetDragDropPayload(native_type, native_data, size, cond); - return ret != 0; + int ret = ImGuiNative.igGetColumnsCount(); + return ret; } - public static bool SetDragDropPayload(string type, IntPtr data, uint size, ImGuiCond cond) + public static float GetColumnWidth() { - byte* native_type; - if (type != null) - { - int type_byteCount = Encoding.UTF8.GetByteCount(type); - byte* native_type_stackBytes = stackalloc byte[type_byteCount + 1]; - native_type = native_type_stackBytes; - fixed (char* type_ptr = type) - { - int native_type_offset = Encoding.UTF8.GetBytes(type_ptr, type.Length, native_type, type_byteCount); - native_type[native_type_offset] = 0; - } - } - else { native_type = null; } - void* native_data = (void*)data.ToPointer(); - byte ret = ImGuiNative.igSetDragDropPayload(native_type, native_data, size, cond); - return ret != 0; + int column_index = -1; + float ret = ImGuiNative.igGetColumnWidth(column_index); + return ret; } - public static void ShowDemoWindow() + public static float GetColumnWidth(int column_index) { - byte* p_open = null; - ImGuiNative.igShowDemoWindow(p_open); + float ret = ImGuiNative.igGetColumnWidth(column_index); + return ret; } - public static void ShowDemoWindow(ref bool p_open) + public static Vector2 GetContentRegionAvail() { - byte native_p_open_val = p_open ? (byte)1 : (byte)0; - byte* native_p_open = &native_p_open_val; - ImGuiNative.igShowDemoWindow(native_p_open); - p_open = native_p_open_val != 0; + Vector2 ret = ImGuiNative.igGetContentRegionAvail(); + return ret; } - public static void EndMenu() + public static float GetContentRegionAvailWidth() { - ImGuiNative.igEndMenu(); + float ret = ImGuiNative.igGetContentRegionAvailWidth(); + return ret; } - public static bool ColorButton(string desc_id, Vector4 col) + public static Vector2 GetContentRegionMax() { - byte* native_desc_id; - if (desc_id != null) - { - int desc_id_byteCount = Encoding.UTF8.GetByteCount(desc_id); - byte* native_desc_id_stackBytes = stackalloc byte[desc_id_byteCount + 1]; - native_desc_id = native_desc_id_stackBytes; - fixed (char* desc_id_ptr = desc_id) - { - int native_desc_id_offset = Encoding.UTF8.GetBytes(desc_id_ptr, desc_id.Length, native_desc_id, desc_id_byteCount); - native_desc_id[native_desc_id_offset] = 0; - } - } - else { native_desc_id = null; } - ImGuiColorEditFlags flags = 0; - Vector2 size = new Vector2(); - byte ret = ImGuiNative.igColorButton(native_desc_id, col, flags, size); - return ret != 0; + Vector2 ret = ImGuiNative.igGetContentRegionMax(); + return ret; } - public static bool ColorButton(string desc_id, Vector4 col, ImGuiColorEditFlags flags) + public static IntPtr GetCurrentContext() { - byte* native_desc_id; - if (desc_id != null) - { - int desc_id_byteCount = Encoding.UTF8.GetByteCount(desc_id); - byte* native_desc_id_stackBytes = stackalloc byte[desc_id_byteCount + 1]; - native_desc_id = native_desc_id_stackBytes; - fixed (char* desc_id_ptr = desc_id) - { - int native_desc_id_offset = Encoding.UTF8.GetBytes(desc_id_ptr, desc_id.Length, native_desc_id, desc_id_byteCount); - native_desc_id[native_desc_id_offset] = 0; - } - } - else { native_desc_id = null; } - Vector2 size = new Vector2(); - byte ret = ImGuiNative.igColorButton(native_desc_id, col, flags, size); - return ret != 0; + IntPtr ret = ImGuiNative.igGetCurrentContext(); + return ret; } - public static bool ColorButton(string desc_id, Vector4 col, ImGuiColorEditFlags flags, Vector2 size) + public static Vector2 GetCursorPos() { - byte* native_desc_id; - if (desc_id != null) - { - int desc_id_byteCount = Encoding.UTF8.GetByteCount(desc_id); - byte* native_desc_id_stackBytes = stackalloc byte[desc_id_byteCount + 1]; - native_desc_id = native_desc_id_stackBytes; - fixed (char* desc_id_ptr = desc_id) - { - int native_desc_id_offset = Encoding.UTF8.GetBytes(desc_id_ptr, desc_id.Length, native_desc_id, desc_id_byteCount); - native_desc_id[native_desc_id_offset] = 0; - } - } - else { native_desc_id = null; } - byte ret = ImGuiNative.igColorButton(native_desc_id, col, flags, size); - return ret != 0; + Vector2 ret = ImGuiNative.igGetCursorPos(); + return ret; } - public static bool IsKeyReleased(int user_key_index) + public static float GetCursorPosX() { - byte ret = ImGuiNative.igIsKeyReleased(user_key_index); - return ret != 0; + float ret = ImGuiNative.igGetCursorPosX(); + return ret; } - public static void SetClipboardText(string text) + public static float GetCursorPosY() { - byte* native_text; - if (text != null) - { - int text_byteCount = Encoding.UTF8.GetByteCount(text); - byte* native_text_stackBytes = stackalloc byte[text_byteCount + 1]; - native_text = native_text_stackBytes; - fixed (char* text_ptr = text) - { - int native_text_offset = Encoding.UTF8.GetBytes(text_ptr, text.Length, native_text, text_byteCount); - native_text[native_text_offset] = 0; - } - } - else { native_text = null; } - ImGuiNative.igSetClipboardText(native_text); + float ret = ImGuiNative.igGetCursorPosY(); + return ret; } - public static bool IsWindowCollapsed() + public static Vector2 GetCursorScreenPos() { - byte ret = ImGuiNative.igIsWindowCollapsed(); - return ret != 0; + Vector2 ret = ImGuiNative.igGetCursorScreenPos(); + return ret; } - public static void ShowFontSelector(string label) + public static Vector2 GetCursorStartPos() { - byte* native_label; - if (label != null) - { - int label_byteCount = Encoding.UTF8.GetByteCount(label); - byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; - native_label = native_label_stackBytes; - fixed (char* label_ptr = label) - { - int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); - native_label[native_label_offset] = 0; - } - } - else { native_label = null; } - ImGuiNative.igShowFontSelector(native_label); + Vector2 ret = ImGuiNative.igGetCursorStartPos(); + return ret; } - public static void SetNextWindowFocus() + public static ImDrawDataPtr GetDrawData() { - ImGuiNative.igSetNextWindowFocus(); + ImDrawData* ret = ImGuiNative.igGetDrawData(); + return new ImDrawDataPtr(ret); } - public static void SameLine() + public static IntPtr GetDrawListSharedData() { - float pos_x = 0.0f; - float spacing_w = -1.0f; - ImGuiNative.igSameLine(pos_x, spacing_w); + IntPtr ret = ImGuiNative.igGetDrawListSharedData(); + return ret; } - public static void SameLine(float pos_x) + public static ImFontPtr GetFont() { - float spacing_w = -1.0f; - ImGuiNative.igSameLine(pos_x, spacing_w); + ImFont* ret = ImGuiNative.igGetFont(); + return new ImFontPtr(ret); } - public static void SameLine(float pos_x, float spacing_w) + public static float GetFontSize() { - ImGuiNative.igSameLine(pos_x, spacing_w); + float ret = ImGuiNative.igGetFontSize(); + return ret; } - public static bool Begin(string name) + public static Vector2 GetFontTexUvWhitePixel() { - byte* native_name; - if (name != null) + Vector2 ret = ImGuiNative.igGetFontTexUvWhitePixel(); + return ret; + } + public static int GetFrameCount() + { + int ret = ImGuiNative.igGetFrameCount(); + return ret; + } + public static float GetFrameHeight() + { + float ret = ImGuiNative.igGetFrameHeight(); + return ret; + } + public static float GetFrameHeightWithSpacing() + { + float ret = ImGuiNative.igGetFrameHeightWithSpacing(); + return ret; + } + public static uint GetID(string str_id) + { + byte* native_str_id; + if (str_id != null) { - int name_byteCount = Encoding.UTF8.GetByteCount(name); - byte* native_name_stackBytes = stackalloc byte[name_byteCount + 1]; - native_name = native_name_stackBytes; - fixed (char* name_ptr = name) + int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + fixed (char* str_id_ptr = str_id) { - int native_name_offset = Encoding.UTF8.GetBytes(name_ptr, name.Length, native_name, name_byteCount); - native_name[native_name_offset] = 0; + int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; } } - else { native_name = null; } - byte* p_open = null; - ImGuiWindowFlags flags = 0; - byte ret = ImGuiNative.igBegin(native_name, p_open, flags); + else { native_str_id = null; } + uint ret = ImGuiNative.igGetIDStr(native_str_id); + return ret; + } + public static uint GetID(IntPtr ptr_id) + { + void* native_ptr_id = (void*)ptr_id.ToPointer(); + uint ret = ImGuiNative.igGetIDPtr(native_ptr_id); + return ret; + } + public static ImGuiIOPtr GetIO() + { + ImGuiIO* ret = ImGuiNative.igGetIO(); + return new ImGuiIOPtr(ret); + } + public static Vector2 GetItemRectMax() + { + Vector2 ret = ImGuiNative.igGetItemRectMax(); + return ret; + } + public static Vector2 GetItemRectMin() + { + Vector2 ret = ImGuiNative.igGetItemRectMin(); + return ret; + } + public static Vector2 GetItemRectSize() + { + Vector2 ret = ImGuiNative.igGetItemRectSize(); + return ret; + } + public static int GetKeyIndex(ImGuiKey imgui_key) + { + int ret = ImGuiNative.igGetKeyIndex(imgui_key); + return ret; + } + public static int GetKeyPressedAmount(int key_index, float repeat_delay, float rate) + { + int ret = ImGuiNative.igGetKeyPressedAmount(key_index, repeat_delay, rate); + return ret; + } + public static ImGuiMouseCursor GetMouseCursor() + { + ImGuiMouseCursor ret = ImGuiNative.igGetMouseCursor(); + return ret; + } + public static Vector2 GetMouseDragDelta() + { + int button = 0; + float lock_threshold = -1.0f; + Vector2 ret = ImGuiNative.igGetMouseDragDelta(button, lock_threshold); + return ret; + } + public static Vector2 GetMouseDragDelta(int button) + { + float lock_threshold = -1.0f; + Vector2 ret = ImGuiNative.igGetMouseDragDelta(button, lock_threshold); + return ret; + } + public static Vector2 GetMouseDragDelta(int button, float lock_threshold) + { + Vector2 ret = ImGuiNative.igGetMouseDragDelta(button, lock_threshold); + return ret; + } + public static Vector2 GetMousePos() + { + Vector2 ret = ImGuiNative.igGetMousePos(); + return ret; + } + public static Vector2 GetMousePosOnOpeningCurrentPopup() + { + Vector2 ret = ImGuiNative.igGetMousePosOnOpeningCurrentPopup(); + return ret; + } + public static ImDrawListPtr GetOverlayDrawList() + { + ImDrawList* ret = ImGuiNative.igGetOverlayDrawList(); + return new ImDrawListPtr(ret); + } + public static float GetScrollMaxX() + { + float ret = ImGuiNative.igGetScrollMaxX(); + return ret; + } + public static float GetScrollMaxY() + { + float ret = ImGuiNative.igGetScrollMaxY(); + return ret; + } + public static float GetScrollX() + { + float ret = ImGuiNative.igGetScrollX(); + return ret; + } + public static float GetScrollY() + { + float ret = ImGuiNative.igGetScrollY(); + return ret; + } + public static ImGuiStoragePtr GetStateStorage() + { + ImGuiStorage* ret = ImGuiNative.igGetStateStorage(); + return new ImGuiStoragePtr(ret); + } + public static ImGuiStylePtr GetStyle() + { + ImGuiStyle* ret = ImGuiNative.igGetStyle(); + return new ImGuiStylePtr(ret); + } + public static string GetStyleColorName(ImGuiCol idx) + { + byte* ret = ImGuiNative.igGetStyleColorName(idx); + return Util.StringFromPtr(ret); + } + public static Vector4* GetStyleColorVec4(ImGuiCol idx) + { + Vector4* ret = ImGuiNative.igGetStyleColorVec4(idx); + return ret; + } + public static float GetTextLineHeight() + { + float ret = ImGuiNative.igGetTextLineHeight(); + return ret; + } + public static float GetTextLineHeightWithSpacing() + { + float ret = ImGuiNative.igGetTextLineHeightWithSpacing(); + return ret; + } + public static double GetTime() + { + double ret = ImGuiNative.igGetTime(); + return ret; + } + public static float GetTreeNodeToLabelSpacing() + { + float ret = ImGuiNative.igGetTreeNodeToLabelSpacing(); + return ret; + } + public static string GetVersion() + { + byte* ret = ImGuiNative.igGetVersion(); + return Util.StringFromPtr(ret); + } + public static Vector2 GetWindowContentRegionMax() + { + Vector2 ret = ImGuiNative.igGetWindowContentRegionMax(); + return ret; + } + public static Vector2 GetWindowContentRegionMin() + { + Vector2 ret = ImGuiNative.igGetWindowContentRegionMin(); + return ret; + } + public static float GetWindowContentRegionWidth() + { + float ret = ImGuiNative.igGetWindowContentRegionWidth(); + return ret; + } + public static ImDrawListPtr GetWindowDrawList() + { + ImDrawList* ret = ImGuiNative.igGetWindowDrawList(); + return new ImDrawListPtr(ret); + } + public static float GetWindowHeight() + { + float ret = ImGuiNative.igGetWindowHeight(); + return ret; + } + public static Vector2 GetWindowPos() + { + Vector2 ret = ImGuiNative.igGetWindowPos(); + return ret; + } + public static Vector2 GetWindowSize() + { + Vector2 ret = ImGuiNative.igGetWindowSize(); + return ret; + } + public static float GetWindowWidth() + { + float ret = ImGuiNative.igGetWindowWidth(); + return ret; + } + public static void Image(IntPtr user_texture_id, Vector2 size) + { + Vector2 uv0 = new Vector2(); + Vector2 uv1 = new Vector2(1, 1); + Vector4 tint_col = new Vector4(1, 1, 1, 1); + Vector4 border_col = new Vector4(); + ImGuiNative.igImage(user_texture_id, size, uv0, uv1, tint_col, border_col); + } + public static void Image(IntPtr user_texture_id, Vector2 size, Vector2 uv0) + { + Vector2 uv1 = new Vector2(1, 1); + Vector4 tint_col = new Vector4(1, 1, 1, 1); + Vector4 border_col = new Vector4(); + ImGuiNative.igImage(user_texture_id, size, uv0, uv1, tint_col, border_col); + } + public static void Image(IntPtr user_texture_id, Vector2 size, Vector2 uv0, Vector2 uv1) + { + Vector4 tint_col = new Vector4(1, 1, 1, 1); + Vector4 border_col = new Vector4(); + ImGuiNative.igImage(user_texture_id, size, uv0, uv1, tint_col, border_col); + } + public static void Image(IntPtr user_texture_id, Vector2 size, Vector2 uv0, Vector2 uv1, Vector4 tint_col) + { + Vector4 border_col = new Vector4(); + ImGuiNative.igImage(user_texture_id, size, uv0, uv1, tint_col, border_col); + } + public static void Image(IntPtr user_texture_id, Vector2 size, Vector2 uv0, Vector2 uv1, Vector4 tint_col, Vector4 border_col) + { + ImGuiNative.igImage(user_texture_id, size, uv0, uv1, tint_col, border_col); + } + public static bool ImageButton(IntPtr user_texture_id, Vector2 size) + { + Vector2 uv0 = new Vector2(); + Vector2 uv1 = new Vector2(1, 1); + int frame_padding = -1; + Vector4 bg_col = new Vector4(); + Vector4 tint_col = new Vector4(1, 1, 1, 1); + byte ret = ImGuiNative.igImageButton(user_texture_id, size, uv0, uv1, frame_padding, bg_col, tint_col); return ret != 0; } - public static bool Begin(string name, ref bool p_open) + public static bool ImageButton(IntPtr user_texture_id, Vector2 size, Vector2 uv0) { - byte* native_name; - if (name != null) - { - int name_byteCount = Encoding.UTF8.GetByteCount(name); - byte* native_name_stackBytes = stackalloc byte[name_byteCount + 1]; - native_name = native_name_stackBytes; - fixed (char* name_ptr = name) - { - int native_name_offset = Encoding.UTF8.GetBytes(name_ptr, name.Length, native_name, name_byteCount); - native_name[native_name_offset] = 0; - } - } - else { native_name = null; } - byte native_p_open_val = p_open ? (byte)1 : (byte)0; - byte* native_p_open = &native_p_open_val; - ImGuiWindowFlags flags = 0; - byte ret = ImGuiNative.igBegin(native_name, native_p_open, flags); - p_open = native_p_open_val != 0; + Vector2 uv1 = new Vector2(1, 1); + int frame_padding = -1; + Vector4 bg_col = new Vector4(); + Vector4 tint_col = new Vector4(1, 1, 1, 1); + byte ret = ImGuiNative.igImageButton(user_texture_id, size, uv0, uv1, frame_padding, bg_col, tint_col); + return ret != 0; + } + public static bool ImageButton(IntPtr user_texture_id, Vector2 size, Vector2 uv0, Vector2 uv1) + { + int frame_padding = -1; + Vector4 bg_col = new Vector4(); + Vector4 tint_col = new Vector4(1, 1, 1, 1); + byte ret = ImGuiNative.igImageButton(user_texture_id, size, uv0, uv1, frame_padding, bg_col, tint_col); + return ret != 0; + } + public static bool ImageButton(IntPtr user_texture_id, Vector2 size, Vector2 uv0, Vector2 uv1, int frame_padding) + { + Vector4 bg_col = new Vector4(); + Vector4 tint_col = new Vector4(1, 1, 1, 1); + byte ret = ImGuiNative.igImageButton(user_texture_id, size, uv0, uv1, frame_padding, bg_col, tint_col); + return ret != 0; + } + public static bool ImageButton(IntPtr user_texture_id, Vector2 size, Vector2 uv0, Vector2 uv1, int frame_padding, Vector4 bg_col) + { + Vector4 tint_col = new Vector4(1, 1, 1, 1); + byte ret = ImGuiNative.igImageButton(user_texture_id, size, uv0, uv1, frame_padding, bg_col, tint_col); return ret != 0; } - public static bool Begin(string name, ref bool p_open, ImGuiWindowFlags flags) + public static bool ImageButton(IntPtr user_texture_id, Vector2 size, Vector2 uv0, Vector2 uv1, int frame_padding, Vector4 bg_col, Vector4 tint_col) { - byte* native_name; - if (name != null) - { - int name_byteCount = Encoding.UTF8.GetByteCount(name); - byte* native_name_stackBytes = stackalloc byte[name_byteCount + 1]; - native_name = native_name_stackBytes; - fixed (char* name_ptr = name) - { - int native_name_offset = Encoding.UTF8.GetBytes(name_ptr, name.Length, native_name, name_byteCount); - native_name[native_name_offset] = 0; - } - } - else { native_name = null; } - byte native_p_open_val = p_open ? (byte)1 : (byte)0; - byte* native_p_open = &native_p_open_val; - byte ret = ImGuiNative.igBegin(native_name, native_p_open, flags); - p_open = native_p_open_val != 0; + byte ret = ImGuiNative.igImageButton(user_texture_id, size, uv0, uv1, frame_padding, bg_col, tint_col); return ret != 0; } - public static bool ColorEdit3(string label, ref Vector3 col) + public static void Indent() + { + float indent_w = 0.0f; + ImGuiNative.igIndent(indent_w); + } + public static void Indent(float indent_w) + { + ImGuiNative.igIndent(indent_w); + } + public static bool InputDouble(string label, ref double v) { byte* native_label; if (label != null) @@ -4412,14 +4135,25 @@ namespace ImGuiNET } } else { native_label = null; } - ImGuiColorEditFlags flags = 0; - fixed (Vector3* native_col = &col) + double step = 0.0f; + double step_fast = 0.0f; + byte* native_format; + int format_byteCount = Encoding.UTF8.GetByteCount("%.6f"); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = "%.6f") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.6f".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + ImGuiInputTextFlags extra_flags = 0; + fixed (double* native_v = &v) { - byte ret = ImGuiNative.igColorEdit3(native_label, native_col, flags); + byte ret = ImGuiNative.igInputDouble(native_label, native_v, step, step_fast, native_format, extra_flags); return ret != 0; } } - public static bool ColorEdit3(string label, ref Vector3 col, ImGuiColorEditFlags flags) + public static bool InputDouble(string label, ref double v, double step) { byte* native_label; if (label != null) @@ -4434,13 +4168,24 @@ namespace ImGuiNET } } else { native_label = null; } - fixed (Vector3* native_col = &col) + double step_fast = 0.0f; + byte* native_format; + int format_byteCount = Encoding.UTF8.GetByteCount("%.6f"); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = "%.6f") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.6f".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + ImGuiInputTextFlags extra_flags = 0; + fixed (double* native_v = &v) { - byte ret = ImGuiNative.igColorEdit3(native_label, native_col, flags); + byte ret = ImGuiNative.igInputDouble(native_label, native_v, step, step_fast, native_format, extra_flags); return ret != 0; } } - public static bool InputFloat2(string label, ref Vector2 v) + public static bool InputDouble(string label, ref double v, double step, double step_fast) { byte* native_label; if (label != null) @@ -4456,22 +4201,22 @@ namespace ImGuiNET } else { native_label = null; } byte* native_format; - int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + int format_byteCount = Encoding.UTF8.GetByteCount("%.6f"); byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; native_format = native_format_stackBytes; - fixed (char* format_ptr = "%.3f") + fixed (char* format_ptr = "%.6f") { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.6f".Length, native_format, format_byteCount); native_format[native_format_offset] = 0; } ImGuiInputTextFlags extra_flags = 0; - fixed (Vector2* native_v = &v) + fixed (double* native_v = &v) { - byte ret = ImGuiNative.igInputFloat2(native_label, native_v, native_format, extra_flags); + byte ret = ImGuiNative.igInputDouble(native_label, native_v, step, step_fast, native_format, extra_flags); return ret != 0; } } - public static bool InputFloat2(string label, ref Vector2 v, string format) + public static bool InputDouble(string label, ref double v, double step, double step_fast, string format) { byte* native_label; if (label != null) @@ -4500,13 +4245,13 @@ namespace ImGuiNET } else { native_format = null; } ImGuiInputTextFlags extra_flags = 0; - fixed (Vector2* native_v = &v) + fixed (double* native_v = &v) { - byte ret = ImGuiNative.igInputFloat2(native_label, native_v, native_format, extra_flags); + byte ret = ImGuiNative.igInputDouble(native_label, native_v, step, step_fast, native_format, extra_flags); return ret != 0; } } - public static bool InputFloat2(string label, ref Vector2 v, string format, ImGuiInputTextFlags extra_flags) + public static bool InputDouble(string label, ref double v, double step, double step_fast, string format, ImGuiInputTextFlags extra_flags) { byte* native_label; if (label != null) @@ -4534,27 +4279,13 @@ namespace ImGuiNET } } else { native_format = null; } - fixed (Vector2* native_v = &v) + fixed (double* native_v = &v) { - byte ret = ImGuiNative.igInputFloat2(native_label, native_v, native_format, extra_flags); + byte ret = ImGuiNative.igInputDouble(native_label, native_v, step, step_fast, native_format, extra_flags); return ret != 0; } } - public static void PushButtonRepeat(bool repeat) - { - byte native_repeat = repeat ? (byte)1 : (byte)0; - ImGuiNative.igPushButtonRepeat(native_repeat); - } - public static void PopItemWidth() - { - ImGuiNative.igPopItemWidth(); - } - public static float GetFontSize() - { - float ret = ImGuiNative.igGetFontSize(); - return ret; - } - public static bool InputDouble(string label, ref double v) + public static bool InputFloat(string label, ref float v) { byte* native_label; if (label != null) @@ -4569,25 +4300,25 @@ namespace ImGuiNET } } else { native_label = null; } - double step = 0.0f; - double step_fast = 0.0f; + float step = 0.0f; + float step_fast = 0.0f; byte* native_format; - int format_byteCount = Encoding.UTF8.GetByteCount("%.6f"); + int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; native_format = native_format_stackBytes; - fixed (char* format_ptr = "%.6f") + fixed (char* format_ptr = "%.3f") { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.6f".Length, native_format, format_byteCount); + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); native_format[native_format_offset] = 0; } ImGuiInputTextFlags extra_flags = 0; - fixed (double* native_v = &v) + fixed (float* native_v = &v) { - byte ret = ImGuiNative.igInputDouble(native_label, native_v, step, step_fast, native_format, extra_flags); + byte ret = ImGuiNative.igInputFloat(native_label, native_v, step, step_fast, native_format, extra_flags); return ret != 0; } } - public static bool InputDouble(string label, ref double v, double step) + public static bool InputFloat(string label, ref float v, float step) { byte* native_label; if (label != null) @@ -4602,24 +4333,24 @@ namespace ImGuiNET } } else { native_label = null; } - double step_fast = 0.0f; + float step_fast = 0.0f; byte* native_format; - int format_byteCount = Encoding.UTF8.GetByteCount("%.6f"); + int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; native_format = native_format_stackBytes; - fixed (char* format_ptr = "%.6f") + fixed (char* format_ptr = "%.3f") { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.6f".Length, native_format, format_byteCount); + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); native_format[native_format_offset] = 0; } ImGuiInputTextFlags extra_flags = 0; - fixed (double* native_v = &v) + fixed (float* native_v = &v) { - byte ret = ImGuiNative.igInputDouble(native_label, native_v, step, step_fast, native_format, extra_flags); + byte ret = ImGuiNative.igInputFloat(native_label, native_v, step, step_fast, native_format, extra_flags); return ret != 0; } } - public static bool InputDouble(string label, ref double v, double step, double step_fast) + public static bool InputFloat(string label, ref float v, float step, float step_fast) { byte* native_label; if (label != null) @@ -4635,22 +4366,22 @@ namespace ImGuiNET } else { native_label = null; } byte* native_format; - int format_byteCount = Encoding.UTF8.GetByteCount("%.6f"); + int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; native_format = native_format_stackBytes; - fixed (char* format_ptr = "%.6f") + fixed (char* format_ptr = "%.3f") { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.6f".Length, native_format, format_byteCount); + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); native_format[native_format_offset] = 0; } ImGuiInputTextFlags extra_flags = 0; - fixed (double* native_v = &v) + fixed (float* native_v = &v) { - byte ret = ImGuiNative.igInputDouble(native_label, native_v, step, step_fast, native_format, extra_flags); + byte ret = ImGuiNative.igInputFloat(native_label, native_v, step, step_fast, native_format, extra_flags); return ret != 0; } } - public static bool InputDouble(string label, ref double v, double step, double step_fast, string format) + public static bool InputFloat(string label, ref float v, float step, float step_fast, string format) { byte* native_label; if (label != null) @@ -4679,13 +4410,13 @@ namespace ImGuiNET } else { native_format = null; } ImGuiInputTextFlags extra_flags = 0; - fixed (double* native_v = &v) + fixed (float* native_v = &v) { - byte ret = ImGuiNative.igInputDouble(native_label, native_v, step, step_fast, native_format, extra_flags); + byte ret = ImGuiNative.igInputFloat(native_label, native_v, step, step_fast, native_format, extra_flags); return ret != 0; } } - public static bool InputDouble(string label, ref double v, double step, double step_fast, string format, ImGuiInputTextFlags extra_flags) + public static bool InputFloat(string label, ref float v, float step, float step_fast, string format, ImGuiInputTextFlags extra_flags) { byte* native_label; if (label != null) @@ -4713,17 +4444,13 @@ namespace ImGuiNET } } else { native_format = null; } - fixed (double* native_v = &v) + fixed (float* native_v = &v) { - byte ret = ImGuiNative.igInputDouble(native_label, native_v, step, step_fast, native_format, extra_flags); + byte ret = ImGuiNative.igInputFloat(native_label, native_v, step, step_fast, native_format, extra_flags); return ret != 0; } } - public static void EndPopup() - { - ImGuiNative.igEndPopup(); - } - public static bool Selectable(string label) + public static bool InputFloat2(string label, ref Vector2 v) { byte* native_label; if (label != null) @@ -4738,54 +4465,23 @@ namespace ImGuiNET } } else { native_label = null; } - byte selected = 0; - ImGuiSelectableFlags flags = 0; - Vector2 size = new Vector2(); - byte ret = ImGuiNative.igSelectable(native_label, selected, flags, size); - return ret != 0; - } - public static bool Selectable(string label, bool selected) - { - byte* native_label; - if (label != null) - { - int label_byteCount = Encoding.UTF8.GetByteCount(label); - byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; - native_label = native_label_stackBytes; - fixed (char* label_ptr = label) + byte* native_format; + int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = "%.3f") { - int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); - native_label[native_label_offset] = 0; + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; } - } - else { native_label = null; } - byte native_selected = selected ? (byte)1 : (byte)0; - ImGuiSelectableFlags flags = 0; - Vector2 size = new Vector2(); - byte ret = ImGuiNative.igSelectable(native_label, native_selected, flags, size); - return ret != 0; - } - public static bool Selectable(string label, bool selected, ImGuiSelectableFlags flags) - { - byte* native_label; - if (label != null) + ImGuiInputTextFlags extra_flags = 0; + fixed (Vector2* native_v = &v) { - int label_byteCount = Encoding.UTF8.GetByteCount(label); - byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; - native_label = native_label_stackBytes; - fixed (char* label_ptr = label) - { - int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); - native_label[native_label_offset] = 0; - } + byte ret = ImGuiNative.igInputFloat2(native_label, native_v, native_format, extra_flags); + return ret != 0; } - else { native_label = null; } - byte native_selected = selected ? (byte)1 : (byte)0; - Vector2 size = new Vector2(); - byte ret = ImGuiNative.igSelectable(native_label, native_selected, flags, size); - return ret != 0; } - public static bool Selectable(string label, bool selected, ImGuiSelectableFlags flags, Vector2 size) + public static bool InputFloat2(string label, ref Vector2 v, string format) { byte* native_label; if (label != null) @@ -4800,34 +4496,27 @@ namespace ImGuiNET } } else { native_label = null; } - byte native_selected = selected ? (byte)1 : (byte)0; - byte ret = ImGuiNative.igSelectable(native_label, native_selected, flags, size); - return ret != 0; - } - public static bool Selectable(string label, ref bool p_selected) - { - byte* native_label; - if (label != null) + byte* native_format; + if (format != null) { - int label_byteCount = Encoding.UTF8.GetByteCount(label); - byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; - native_label = native_label_stackBytes; - fixed (char* label_ptr = label) + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = format) { - int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); - native_label[native_label_offset] = 0; + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; } } - else { native_label = null; } - byte native_p_selected_val = p_selected ? (byte)1 : (byte)0; - byte* native_p_selected = &native_p_selected_val; - ImGuiSelectableFlags flags = 0; - Vector2 size = new Vector2(); - byte ret = ImGuiNative.igSelectableBoolPtr(native_label, native_p_selected, flags, size); - p_selected = native_p_selected_val != 0; - return ret != 0; + else { native_format = null; } + ImGuiInputTextFlags extra_flags = 0; + fixed (Vector2* native_v = &v) + { + byte ret = ImGuiNative.igInputFloat2(native_label, native_v, native_format, extra_flags); + return ret != 0; + } } - public static bool Selectable(string label, ref bool p_selected, ImGuiSelectableFlags flags) + public static bool InputFloat2(string label, ref Vector2 v, string format, ImGuiInputTextFlags extra_flags) { byte* native_label; if (label != null) @@ -4842,14 +4531,26 @@ namespace ImGuiNET } } else { native_label = null; } - byte native_p_selected_val = p_selected ? (byte)1 : (byte)0; - byte* native_p_selected = &native_p_selected_val; - Vector2 size = new Vector2(); - byte ret = ImGuiNative.igSelectableBoolPtr(native_label, native_p_selected, flags, size); - p_selected = native_p_selected_val != 0; - return ret != 0; + byte* native_format; + if (format != null) + { + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + } + else { native_format = null; } + fixed (Vector2* native_v = &v) + { + byte ret = ImGuiNative.igInputFloat2(native_label, native_v, native_format, extra_flags); + return ret != 0; + } } - public static bool Selectable(string label, ref bool p_selected, ImGuiSelectableFlags flags, Vector2 size) + public static bool InputFloat3(string label, ref Vector3 v) { byte* native_label; if (label != null) @@ -4864,13 +4565,23 @@ namespace ImGuiNET } } else { native_label = null; } - byte native_p_selected_val = p_selected ? (byte)1 : (byte)0; - byte* native_p_selected = &native_p_selected_val; - byte ret = ImGuiNative.igSelectableBoolPtr(native_label, native_p_selected, flags, size); - p_selected = native_p_selected_val != 0; - return ret != 0; + byte* native_format; + int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = "%.3f") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + ImGuiInputTextFlags extra_flags = 0; + fixed (Vector3* native_v = &v) + { + byte ret = ImGuiNative.igInputFloat3(native_label, native_v, native_format, extra_flags); + return ret != 0; + } } - public static bool ListBox(string label, ref int current_item, string[] items, int items_count) + public static bool InputFloat3(string label, ref Vector3 v, string format) { byte* native_label; if (label != null) @@ -4885,41 +4596,27 @@ namespace ImGuiNET } } else { native_label = null; } - int* items_byteCounts = stackalloc int[items.Length]; - int items_byteCount = 0; - for (int i = 0; i < items.Length; i++) - { - string s = items[i]; - items_byteCounts[i] = Encoding.UTF8.GetByteCount(s); - items_byteCount += items_byteCounts[i] + 1; - } - byte* native_items_data = stackalloc byte[items_byteCount]; - int offset = 0; - for (int i = 0; i < items.Length; i++) + byte* native_format; + if (format != null) { - string s = items[i]; - fixed (char* sPtr = s) + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = format) { - offset += Encoding.UTF8.GetBytes(sPtr, s.Length, native_items_data + offset, items_byteCounts[i]); - native_items_data[offset] = 0; - offset += 1; + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; } } - byte** native_items = stackalloc byte*[items.Length]; - offset = 0; - for (int i = 0; i < items.Length; i++) - { - native_items[i] = &native_items_data[offset]; - offset += items_byteCounts[i] + 1; - } - int height_in_items = -1; - fixed (int* native_current_item = ¤t_item) + else { native_format = null; } + ImGuiInputTextFlags extra_flags = 0; + fixed (Vector3* native_v = &v) { - byte ret = ImGuiNative.igListBoxStr_arr(native_label, native_current_item, native_items, items_count, height_in_items); + byte ret = ImGuiNative.igInputFloat3(native_label, native_v, native_format, extra_flags); return ret != 0; } } - public static bool ListBox(string label, ref int current_item, string[] items, int items_count, int height_in_items) + public static bool InputFloat3(string label, ref Vector3 v, string format, ImGuiInputTextFlags extra_flags) { byte* native_label; if (label != null) @@ -4934,44 +4631,25 @@ namespace ImGuiNET } } else { native_label = null; } - int* items_byteCounts = stackalloc int[items.Length]; - int items_byteCount = 0; - for (int i = 0; i < items.Length; i++) - { - string s = items[i]; - items_byteCounts[i] = Encoding.UTF8.GetByteCount(s); - items_byteCount += items_byteCounts[i] + 1; - } - byte* native_items_data = stackalloc byte[items_byteCount]; - int offset = 0; - for (int i = 0; i < items.Length; i++) + byte* native_format; + if (format != null) { - string s = items[i]; - fixed (char* sPtr = s) + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = format) { - offset += Encoding.UTF8.GetBytes(sPtr, s.Length, native_items_data + offset, items_byteCounts[i]); - native_items_data[offset] = 0; - offset += 1; + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; } } - byte** native_items = stackalloc byte*[items.Length]; - offset = 0; - for (int i = 0; i < items.Length; i++) - { - native_items[i] = &native_items_data[offset]; - offset += items_byteCounts[i] + 1; - } - fixed (int* native_current_item = ¤t_item) + else { native_format = null; } + fixed (Vector3* native_v = &v) { - byte ret = ImGuiNative.igListBoxStr_arr(native_label, native_current_item, native_items, items_count, height_in_items); + byte ret = ImGuiNative.igInputFloat3(native_label, native_v, native_format, extra_flags); return ret != 0; } } - public static Vector2 GetCursorPos() - { - Vector2 ret = ImGuiNative.igGetCursorPos(); - return ret; - } public static bool InputFloat4(string label, ref Vector4 v) { byte* native_label; @@ -5072,85 +4750,31 @@ namespace ImGuiNET return ret != 0; } } - public static void SetCursorPosY(float y) - { - ImGuiNative.igSetCursorPosY(y); - } - public static string GetVersion() - { - byte* ret = ImGuiNative.igGetVersion(); - return Util.StringFromPtr(ret); - } - public static void EndCombo() - { - ImGuiNative.igEndCombo(); - } - public static void PushID(string str_id) + public static bool InputInt(string label, ref int v) { - byte* native_str_id; - if (str_id != null) + byte* native_label; + if (label != null) { - int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); - byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; - native_str_id = native_str_id_stackBytes; - fixed (char* str_id_ptr = str_id) + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + fixed (char* label_ptr = label) { - int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); - native_str_id[native_str_id_offset] = 0; + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; } } - else { native_str_id = null; } - ImGuiNative.igPushIDStr(native_str_id); - } - public static void PushID(IntPtr ptr_id) - { - void* native_ptr_id = (void*)ptr_id.ToPointer(); - ImGuiNative.igPushIDPtr(native_ptr_id); - } - public static void PushID(int int_id) - { - ImGuiNative.igPushIDInt(int_id); - } - public static void AlignTextToFramePadding() - { - ImGuiNative.igAlignTextToFramePadding(); - } - public static void PopStyleColor() - { - int count = 1; - ImGuiNative.igPopStyleColor(count); - } - public static void PopStyleColor(int count) - { - ImGuiNative.igPopStyleColor(count); - } - public static void Text(string fmt) - { - byte* native_fmt; - if (fmt != null) + else { native_label = null; } + int step = 1; + int step_fast = 100; + ImGuiInputTextFlags extra_flags = 0; + fixed (int* native_v = &v) { - int fmt_byteCount = Encoding.UTF8.GetByteCount(fmt); - byte* native_fmt_stackBytes = stackalloc byte[fmt_byteCount + 1]; - native_fmt = native_fmt_stackBytes; - fixed (char* fmt_ptr = fmt) - { - int native_fmt_offset = Encoding.UTF8.GetBytes(fmt_ptr, fmt.Length, native_fmt, fmt_byteCount); - native_fmt[native_fmt_offset] = 0; - } + byte ret = ImGuiNative.igInputInt(native_label, native_v, step, step_fast, extra_flags); + return ret != 0; } - else { native_fmt = null; } - ImGuiNative.igText(native_fmt); - } - public static float GetTextLineHeightWithSpacing() - { - float ret = ImGuiNative.igGetTextLineHeightWithSpacing(); - return ret; } - public static void EndTooltip() - { - ImGuiNative.igEndTooltip(); - } - public static bool DragInt(string label, ref int v) + public static bool InputInt(string label, ref int v, int step) { byte* native_label; if (label != null) @@ -5165,25 +4789,15 @@ namespace ImGuiNET } } else { native_label = null; } - float v_speed = 1.0f; - int v_min = 0; - int v_max = 0; - byte* native_format; - int format_byteCount = Encoding.UTF8.GetByteCount("%d"); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = "%d") - { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; - } + int step_fast = 100; + ImGuiInputTextFlags extra_flags = 0; fixed (int* native_v = &v) { - byte ret = ImGuiNative.igDragInt(native_label, native_v, v_speed, v_min, v_max, native_format); + byte ret = ImGuiNative.igInputInt(native_label, native_v, step, step_fast, extra_flags); return ret != 0; } } - public static bool DragInt(string label, ref int v, float v_speed) + public static bool InputInt(string label, ref int v, int step, int step_fast) { byte* native_label; if (label != null) @@ -5192,30 +4806,20 @@ namespace ImGuiNET byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; native_label = native_label_stackBytes; fixed (char* label_ptr = label) - { - int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); - native_label[native_label_offset] = 0; - } - } - else { native_label = null; } - int v_min = 0; - int v_max = 0; - byte* native_format; - int format_byteCount = Encoding.UTF8.GetByteCount("%d"); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = "%d") - { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; } + } + else { native_label = null; } + ImGuiInputTextFlags extra_flags = 0; fixed (int* native_v = &v) { - byte ret = ImGuiNative.igDragInt(native_label, native_v, v_speed, v_min, v_max, native_format); + byte ret = ImGuiNative.igInputInt(native_label, native_v, step, step_fast, extra_flags); return ret != 0; } } - public static bool DragInt(string label, ref int v, float v_speed, int v_min) + public static bool InputInt(string label, ref int v, int step, int step_fast, ImGuiInputTextFlags extra_flags) { byte* native_label; if (label != null) @@ -5230,23 +4834,13 @@ namespace ImGuiNET } } else { native_label = null; } - int v_max = 0; - byte* native_format; - int format_byteCount = Encoding.UTF8.GetByteCount("%d"); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = "%d") - { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; - } fixed (int* native_v = &v) { - byte ret = ImGuiNative.igDragInt(native_label, native_v, v_speed, v_min, v_max, native_format); + byte ret = ImGuiNative.igInputInt(native_label, native_v, step, step_fast, extra_flags); return ret != 0; } } - public static bool DragInt(string label, ref int v, float v_speed, int v_min, int v_max) + public static bool InputInt2(string label, ref int v) { byte* native_label; if (label != null) @@ -5261,22 +4855,14 @@ namespace ImGuiNET } } else { native_label = null; } - byte* native_format; - int format_byteCount = Encoding.UTF8.GetByteCount("%d"); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = "%d") - { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; - } + ImGuiInputTextFlags extra_flags = 0; fixed (int* native_v = &v) { - byte ret = ImGuiNative.igDragInt(native_label, native_v, v_speed, v_min, v_max, native_format); + byte ret = ImGuiNative.igInputInt2(native_label, native_v, extra_flags); return ret != 0; } } - public static bool DragInt(string label, ref int v, float v_speed, int v_min, int v_max, string format) + public static bool InputInt2(string label, ref int v, ImGuiInputTextFlags extra_flags) { byte* native_label; if (label != null) @@ -5291,26 +4877,13 @@ namespace ImGuiNET } } else { native_label = null; } - byte* native_format; - if (format != null) - { - int format_byteCount = Encoding.UTF8.GetByteCount(format); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = format) - { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; - } - } - else { native_format = null; } fixed (int* native_v = &v) { - byte ret = ImGuiNative.igDragInt(native_label, native_v, v_speed, v_min, v_max, native_format); + byte ret = ImGuiNative.igInputInt2(native_label, native_v, extra_flags); return ret != 0; } } - public static bool SliderFloat(string label, ref float v, float v_min, float v_max) + public static bool InputInt3(string label, ref int v) { byte* native_label; if (label != null) @@ -5325,23 +4898,14 @@ namespace ImGuiNET } } else { native_label = null; } - byte* native_format; - int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = "%.3f") - { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; - } - float power = 1.0f; - fixed (float* native_v = &v) + ImGuiInputTextFlags extra_flags = 0; + fixed (int* native_v = &v) { - byte ret = ImGuiNative.igSliderFloat(native_label, native_v, v_min, v_max, native_format, power); + byte ret = ImGuiNative.igInputInt3(native_label, native_v, extra_flags); return ret != 0; } } - public static bool SliderFloat(string label, ref float v, float v_min, float v_max, string format) + public static bool InputInt3(string label, ref int v, ImGuiInputTextFlags extra_flags) { byte* native_label; if (label != null) @@ -5356,27 +4920,13 @@ namespace ImGuiNET } } else { native_label = null; } - byte* native_format; - if (format != null) - { - int format_byteCount = Encoding.UTF8.GetByteCount(format); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = format) - { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; - } - } - else { native_format = null; } - float power = 1.0f; - fixed (float* native_v = &v) + fixed (int* native_v = &v) { - byte ret = ImGuiNative.igSliderFloat(native_label, native_v, v_min, v_max, native_format, power); + byte ret = ImGuiNative.igInputInt3(native_label, native_v, extra_flags); return ret != 0; } } - public static bool SliderFloat(string label, ref float v, float v_min, float v_max, string format, float power) + public static bool InputInt4(string label, ref int v) { byte* native_label; if (label != null) @@ -5391,45 +4941,14 @@ namespace ImGuiNET } } else { native_label = null; } - byte* native_format; - if (format != null) - { - int format_byteCount = Encoding.UTF8.GetByteCount(format); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = format) - { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; - } - } - else { native_format = null; } - fixed (float* native_v = &v) + ImGuiInputTextFlags extra_flags = 0; + fixed (int* native_v = &v) { - byte ret = ImGuiNative.igSliderFloat(native_label, native_v, v_min, v_max, native_format, power); + byte ret = ImGuiNative.igInputInt4(native_label, native_v, extra_flags); return ret != 0; } } - public static uint ColorConvertFloat4ToU32(Vector4 @in) - { - uint ret = ImGuiNative.igColorConvertFloat4ToU32(@in); - return ret; - } - public static void PushClipRect(Vector2 clip_rect_min, Vector2 clip_rect_max, bool intersect_with_current_clip_rect) - { - byte native_intersect_with_current_clip_rect = intersect_with_current_clip_rect ? (byte)1 : (byte)0; - ImGuiNative.igPushClipRect(clip_rect_min, clip_rect_max, native_intersect_with_current_clip_rect); - } - public static void SetColumnWidth(int column_index, float width) - { - ImGuiNative.igSetColumnWidth(column_index, width); - } - public static bool BeginMainMenuBar() - { - byte ret = ImGuiNative.igBeginMainMenuBar(); - return ret != 0; - } - public static bool VSliderScalar(string label, Vector2 size, ImGuiDataType data_type, IntPtr v, IntPtr v_min, IntPtr v_max) + public static bool InputInt4(string label, ref int v, ImGuiInputTextFlags extra_flags) { byte* native_label; if (label != null) @@ -5444,15 +4963,13 @@ namespace ImGuiNET } } else { native_label = null; } - void* native_v = (void*)v.ToPointer(); - void* native_v_min = (void*)v_min.ToPointer(); - void* native_v_max = (void*)v_max.ToPointer(); - byte* native_format = null; - float power = 1.0f; - byte ret = ImGuiNative.igVSliderScalar(native_label, size, data_type, native_v, native_v_min, native_v_max, native_format, power); - return ret != 0; + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igInputInt4(native_label, native_v, extra_flags); + return ret != 0; + } } - public static bool VSliderScalar(string label, Vector2 size, ImGuiDataType data_type, IntPtr v, IntPtr v_min, IntPtr v_max, string format) + public static bool InputScalar(string label, ImGuiDataType data_type, IntPtr v) { byte* native_label; if (label != null) @@ -5468,26 +4985,14 @@ namespace ImGuiNET } else { native_label = null; } void* native_v = (void*)v.ToPointer(); - void* native_v_min = (void*)v_min.ToPointer(); - void* native_v_max = (void*)v_max.ToPointer(); - byte* native_format; - if (format != null) - { - int format_byteCount = Encoding.UTF8.GetByteCount(format); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = format) - { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; - } - } - else { native_format = null; } - float power = 1.0f; - byte ret = ImGuiNative.igVSliderScalar(native_label, size, data_type, native_v, native_v_min, native_v_max, native_format, power); + void* step = null; + void* step_fast = null; + byte* native_format = null; + ImGuiInputTextFlags extra_flags = 0; + byte ret = ImGuiNative.igInputScalar(native_label, data_type, native_v, step, step_fast, native_format, extra_flags); return ret != 0; } - public static bool VSliderScalar(string label, Vector2 size, ImGuiDataType data_type, IntPtr v, IntPtr v_min, IntPtr v_max, string format, float power) + public static bool InputScalar(string label, ImGuiDataType data_type, IntPtr v, IntPtr step) { byte* native_label; if (label != null) @@ -5503,35 +5008,14 @@ namespace ImGuiNET } else { native_label = null; } void* native_v = (void*)v.ToPointer(); - void* native_v_min = (void*)v_min.ToPointer(); - void* native_v_max = (void*)v_max.ToPointer(); - byte* native_format; - if (format != null) - { - int format_byteCount = Encoding.UTF8.GetByteCount(format); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = format) - { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; - } - } - else { native_format = null; } - byte ret = ImGuiNative.igVSliderScalar(native_label, size, data_type, native_v, native_v_min, native_v_max, native_format, power); + void* native_step = (void*)step.ToPointer(); + void* step_fast = null; + byte* native_format = null; + ImGuiInputTextFlags extra_flags = 0; + byte ret = ImGuiNative.igInputScalar(native_label, data_type, native_v, native_step, step_fast, native_format, extra_flags); return ret != 0; } - public static void StyleColorsLight() - { - ImGuiStyle* dst = null; - ImGuiNative.igStyleColorsLight(dst); - } - public static void StyleColorsLight(ImGuiStylePtr dst) - { - ImGuiStyle* native_dst = dst.NativePtr; - ImGuiNative.igStyleColorsLight(native_dst); - } - public static bool SliderFloat3(string label, ref Vector3 v, float v_min, float v_max) + public static bool InputScalar(string label, ImGuiDataType data_type, IntPtr v, IntPtr step, IntPtr step_fast) { byte* native_label; if (label != null) @@ -5546,23 +5030,15 @@ namespace ImGuiNET } } else { native_label = null; } - byte* native_format; - int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = "%.3f") - { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; - } - float power = 1.0f; - fixed (Vector3* native_v = &v) - { - byte ret = ImGuiNative.igSliderFloat3(native_label, native_v, v_min, v_max, native_format, power); - return ret != 0; - } + void* native_v = (void*)v.ToPointer(); + void* native_step = (void*)step.ToPointer(); + void* native_step_fast = (void*)step_fast.ToPointer(); + byte* native_format = null; + ImGuiInputTextFlags extra_flags = 0; + byte ret = ImGuiNative.igInputScalar(native_label, data_type, native_v, native_step, native_step_fast, native_format, extra_flags); + return ret != 0; } - public static bool SliderFloat3(string label, ref Vector3 v, float v_min, float v_max, string format) + public static bool InputScalar(string label, ImGuiDataType data_type, IntPtr v, IntPtr step, IntPtr step_fast, string format) { byte* native_label; if (label != null) @@ -5577,6 +5053,9 @@ namespace ImGuiNET } } else { native_label = null; } + void* native_v = (void*)v.ToPointer(); + void* native_step = (void*)step.ToPointer(); + void* native_step_fast = (void*)step_fast.ToPointer(); byte* native_format; if (format != null) { @@ -5590,14 +5069,11 @@ namespace ImGuiNET } } else { native_format = null; } - float power = 1.0f; - fixed (Vector3* native_v = &v) - { - byte ret = ImGuiNative.igSliderFloat3(native_label, native_v, v_min, v_max, native_format, power); - return ret != 0; - } + ImGuiInputTextFlags extra_flags = 0; + byte ret = ImGuiNative.igInputScalar(native_label, data_type, native_v, native_step, native_step_fast, native_format, extra_flags); + return ret != 0; } - public static bool SliderFloat3(string label, ref Vector3 v, float v_min, float v_max, string format, float power) + public static bool InputScalar(string label, ImGuiDataType data_type, IntPtr v, IntPtr step, IntPtr step_fast, string format, ImGuiInputTextFlags extra_flags) { byte* native_label; if (label != null) @@ -5612,6 +5088,9 @@ namespace ImGuiNET } } else { native_label = null; } + void* native_v = (void*)v.ToPointer(); + void* native_step = (void*)step.ToPointer(); + void* native_step_fast = (void*)step_fast.ToPointer(); byte* native_format; if (format != null) { @@ -5625,13 +5104,33 @@ namespace ImGuiNET } } else { native_format = null; } - fixed (Vector3* native_v = &v) + byte ret = ImGuiNative.igInputScalar(native_label, data_type, native_v, native_step, native_step_fast, native_format, extra_flags); + return ret != 0; + } + public static bool InputScalarN(string label, ImGuiDataType data_type, IntPtr v, int components) + { + byte* native_label; + if (label != null) { - byte ret = ImGuiNative.igSliderFloat3(native_label, native_v, v_min, v_max, native_format, power); - return ret != 0; + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } } + else { native_label = null; } + void* native_v = (void*)v.ToPointer(); + void* step = null; + void* step_fast = null; + byte* native_format = null; + ImGuiInputTextFlags extra_flags = 0; + byte ret = ImGuiNative.igInputScalarN(native_label, data_type, native_v, components, step, step_fast, native_format, extra_flags); + return ret != 0; } - public static bool DragFloat(string label, ref float v) + public static bool InputScalarN(string label, ImGuiDataType data_type, IntPtr v, int components, IntPtr step) { byte* native_label; if (label != null) @@ -5646,26 +5145,15 @@ namespace ImGuiNET } } else { native_label = null; } - float v_speed = 1.0f; - float v_min = 0.0f; - float v_max = 0.0f; - byte* native_format; - int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = "%.3f") - { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; - } - float power = 1.0f; - fixed (float* native_v = &v) - { - byte ret = ImGuiNative.igDragFloat(native_label, native_v, v_speed, v_min, v_max, native_format, power); - return ret != 0; - } + void* native_v = (void*)v.ToPointer(); + void* native_step = (void*)step.ToPointer(); + void* step_fast = null; + byte* native_format = null; + ImGuiInputTextFlags extra_flags = 0; + byte ret = ImGuiNative.igInputScalarN(native_label, data_type, native_v, components, native_step, step_fast, native_format, extra_flags); + return ret != 0; } - public static bool DragFloat(string label, ref float v, float v_speed) + public static bool InputScalarN(string label, ImGuiDataType data_type, IntPtr v, int components, IntPtr step, IntPtr step_fast) { byte* native_label; if (label != null) @@ -5680,25 +5168,15 @@ namespace ImGuiNET } } else { native_label = null; } - float v_min = 0.0f; - float v_max = 0.0f; - byte* native_format; - int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = "%.3f") - { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; - } - float power = 1.0f; - fixed (float* native_v = &v) - { - byte ret = ImGuiNative.igDragFloat(native_label, native_v, v_speed, v_min, v_max, native_format, power); - return ret != 0; - } + void* native_v = (void*)v.ToPointer(); + void* native_step = (void*)step.ToPointer(); + void* native_step_fast = (void*)step_fast.ToPointer(); + byte* native_format = null; + ImGuiInputTextFlags extra_flags = 0; + byte ret = ImGuiNative.igInputScalarN(native_label, data_type, native_v, components, native_step, native_step_fast, native_format, extra_flags); + return ret != 0; } - public static bool DragFloat(string label, ref float v, float v_speed, float v_min) + public static bool InputScalarN(string label, ImGuiDataType data_type, IntPtr v, int components, IntPtr step, IntPtr step_fast, string format) { byte* native_label; if (label != null) @@ -5713,24 +5191,27 @@ namespace ImGuiNET } } else { native_label = null; } - float v_max = 0.0f; + void* native_v = (void*)v.ToPointer(); + void* native_step = (void*)step.ToPointer(); + void* native_step_fast = (void*)step_fast.ToPointer(); byte* native_format; - int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + if (format != null) + { + int format_byteCount = Encoding.UTF8.GetByteCount(format); byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; native_format = native_format_stackBytes; - fixed (char* format_ptr = "%.3f") + fixed (char* format_ptr = format) { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); native_format[native_format_offset] = 0; } - float power = 1.0f; - fixed (float* native_v = &v) - { - byte ret = ImGuiNative.igDragFloat(native_label, native_v, v_speed, v_min, v_max, native_format, power); - return ret != 0; } + else { native_format = null; } + ImGuiInputTextFlags extra_flags = 0; + byte ret = ImGuiNative.igInputScalarN(native_label, data_type, native_v, components, native_step, native_step_fast, native_format, extra_flags); + return ret != 0; } - public static bool DragFloat(string label, ref float v, float v_speed, float v_min, float v_max) + public static bool InputScalarN(string label, ImGuiDataType data_type, IntPtr v, int components, IntPtr step, IntPtr step_fast, string format, ImGuiInputTextFlags extra_flags) { byte* native_label; if (label != null) @@ -5745,142 +5226,269 @@ namespace ImGuiNET } } else { native_label = null; } + void* native_v = (void*)v.ToPointer(); + void* native_step = (void*)step.ToPointer(); + void* native_step_fast = (void*)step_fast.ToPointer(); byte* native_format; - int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + if (format != null) + { + int format_byteCount = Encoding.UTF8.GetByteCount(format); byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; native_format = native_format_stackBytes; - fixed (char* format_ptr = "%.3f") + fixed (char* format_ptr = format) { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); native_format[native_format_offset] = 0; } - float power = 1.0f; - fixed (float* native_v = &v) + } + else { native_format = null; } + byte ret = ImGuiNative.igInputScalarN(native_label, data_type, native_v, components, native_step, native_step_fast, native_format, extra_flags); + return ret != 0; + } + public static bool InvisibleButton(string str_id, Vector2 size) + { + byte* native_str_id; + if (str_id != null) { - byte ret = ImGuiNative.igDragFloat(native_label, native_v, v_speed, v_min, v_max, native_format, power); - return ret != 0; + int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + fixed (char* str_id_ptr = str_id) + { + int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } } + else { native_str_id = null; } + byte ret = ImGuiNative.igInvisibleButton(native_str_id, size); + return ret != 0; + } + public static bool IsAnyItemActive() + { + byte ret = ImGuiNative.igIsAnyItemActive(); + return ret != 0; + } + public static bool IsAnyItemFocused() + { + byte ret = ImGuiNative.igIsAnyItemFocused(); + return ret != 0; + } + public static bool IsAnyItemHovered() + { + byte ret = ImGuiNative.igIsAnyItemHovered(); + return ret != 0; + } + public static bool IsAnyMouseDown() + { + byte ret = ImGuiNative.igIsAnyMouseDown(); + return ret != 0; + } + public static bool IsItemActive() + { + byte ret = ImGuiNative.igIsItemActive(); + return ret != 0; + } + public static bool IsItemClicked() + { + int mouse_button = 0; + byte ret = ImGuiNative.igIsItemClicked(mouse_button); + return ret != 0; + } + public static bool IsItemClicked(int mouse_button) + { + byte ret = ImGuiNative.igIsItemClicked(mouse_button); + return ret != 0; + } + public static bool IsItemDeactivated() + { + byte ret = ImGuiNative.igIsItemDeactivated(); + return ret != 0; + } + public static bool IsItemDeactivatedAfterEdit() + { + byte ret = ImGuiNative.igIsItemDeactivatedAfterEdit(); + return ret != 0; + } + public static bool IsItemEdited() + { + byte ret = ImGuiNative.igIsItemEdited(); + return ret != 0; + } + public static bool IsItemFocused() + { + byte ret = ImGuiNative.igIsItemFocused(); + return ret != 0; + } + public static bool IsItemHovered() + { + ImGuiHoveredFlags flags = 0; + byte ret = ImGuiNative.igIsItemHovered(flags); + return ret != 0; + } + public static bool IsItemHovered(ImGuiHoveredFlags flags) + { + byte ret = ImGuiNative.igIsItemHovered(flags); + return ret != 0; + } + public static bool IsItemVisible() + { + byte ret = ImGuiNative.igIsItemVisible(); + return ret != 0; + } + public static bool IsKeyDown(int user_key_index) + { + byte ret = ImGuiNative.igIsKeyDown(user_key_index); + return ret != 0; + } + public static bool IsKeyPressed(int user_key_index) + { + byte repeat = 1; + byte ret = ImGuiNative.igIsKeyPressed(user_key_index, repeat); + return ret != 0; + } + public static bool IsKeyPressed(int user_key_index, bool repeat) + { + byte native_repeat = repeat ? (byte)1 : (byte)0; + byte ret = ImGuiNative.igIsKeyPressed(user_key_index, native_repeat); + return ret != 0; + } + public static bool IsKeyReleased(int user_key_index) + { + byte ret = ImGuiNative.igIsKeyReleased(user_key_index); + return ret != 0; + } + public static bool IsMouseClicked(int button) + { + byte repeat = 0; + byte ret = ImGuiNative.igIsMouseClicked(button, repeat); + return ret != 0; + } + public static bool IsMouseClicked(int button, bool repeat) + { + byte native_repeat = repeat ? (byte)1 : (byte)0; + byte ret = ImGuiNative.igIsMouseClicked(button, native_repeat); + return ret != 0; + } + public static bool IsMouseDoubleClicked(int button) + { + byte ret = ImGuiNative.igIsMouseDoubleClicked(button); + return ret != 0; + } + public static bool IsMouseDown(int button) + { + byte ret = ImGuiNative.igIsMouseDown(button); + return ret != 0; + } + public static bool IsMouseDragging() + { + int button = 0; + float lock_threshold = -1.0f; + byte ret = ImGuiNative.igIsMouseDragging(button, lock_threshold); + return ret != 0; + } + public static bool IsMouseDragging(int button) + { + float lock_threshold = -1.0f; + byte ret = ImGuiNative.igIsMouseDragging(button, lock_threshold); + return ret != 0; + } + public static bool IsMouseDragging(int button, float lock_threshold) + { + byte ret = ImGuiNative.igIsMouseDragging(button, lock_threshold); + return ret != 0; } - public static bool DragFloat(string label, ref float v, float v_speed, float v_min, float v_max, string format) + public static bool IsMouseHoveringRect(Vector2 r_min, Vector2 r_max) { - byte* native_label; - if (label != null) - { - int label_byteCount = Encoding.UTF8.GetByteCount(label); - byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; - native_label = native_label_stackBytes; - fixed (char* label_ptr = label) - { - int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); - native_label[native_label_offset] = 0; - } - } - else { native_label = null; } - byte* native_format; - if (format != null) - { - int format_byteCount = Encoding.UTF8.GetByteCount(format); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = format) - { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; - } - } - else { native_format = null; } - float power = 1.0f; - fixed (float* native_v = &v) + byte clip = 1; + byte ret = ImGuiNative.igIsMouseHoveringRect(r_min, r_max, clip); + return ret != 0; + } + public static bool IsMouseHoveringRect(Vector2 r_min, Vector2 r_max, bool clip) + { + byte native_clip = clip ? (byte)1 : (byte)0; + byte ret = ImGuiNative.igIsMouseHoveringRect(r_min, r_max, native_clip); + return ret != 0; + } + public static bool IsMousePosValid() + { + Vector2* mouse_pos = null; + byte ret = ImGuiNative.igIsMousePosValid(mouse_pos); + return ret != 0; + } + public static bool IsMousePosValid(ref Vector2 mouse_pos) + { + fixed (Vector2* native_mouse_pos = &mouse_pos) { - byte ret = ImGuiNative.igDragFloat(native_label, native_v, v_speed, v_min, v_max, native_format, power); + byte ret = ImGuiNative.igIsMousePosValid(native_mouse_pos); return ret != 0; } } - public static bool DragFloat(string label, ref float v, float v_speed, float v_min, float v_max, string format, float power) + public static bool IsMouseReleased(int button) { - byte* native_label; - if (label != null) - { - int label_byteCount = Encoding.UTF8.GetByteCount(label); - byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; - native_label = native_label_stackBytes; - fixed (char* label_ptr = label) - { - int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); - native_label[native_label_offset] = 0; - } - } - else { native_label = null; } - byte* native_format; - if (format != null) + byte ret = ImGuiNative.igIsMouseReleased(button); + return ret != 0; + } + public static bool IsPopupOpen(string str_id) + { + byte* native_str_id; + if (str_id != null) { - int format_byteCount = Encoding.UTF8.GetByteCount(format); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = format) + int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + fixed (char* str_id_ptr = str_id) { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; + int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; } } - else { native_format = null; } - fixed (float* native_v = &v) - { - byte ret = ImGuiNative.igDragFloat(native_label, native_v, v_speed, v_min, v_max, native_format, power); - return ret != 0; - } + else { native_str_id = null; } + byte ret = ImGuiNative.igIsPopupOpen(native_str_id); + return ret != 0; } - public static float GetWindowHeight() + public static bool IsRectVisible(Vector2 size) { - float ret = ImGuiNative.igGetWindowHeight(); - return ret; + byte ret = ImGuiNative.igIsRectVisible(size); + return ret != 0; } - public static Vector2 GetMousePosOnOpeningCurrentPopup() + public static bool IsRectVisible(Vector2 rect_min, Vector2 rect_max) { - Vector2 ret = ImGuiNative.igGetMousePosOnOpeningCurrentPopup(); - return ret; + byte ret = ImGuiNative.igIsRectVisibleVec2(rect_min, rect_max); + return ret != 0; } - public static void EndDragDropSource() + public static bool IsWindowAppearing() { - ImGuiNative.igEndDragDropSource(); + byte ret = ImGuiNative.igIsWindowAppearing(); + return ret != 0; } - public static float GetFrameHeightWithSpacing() + public static bool IsWindowCollapsed() { - float ret = ImGuiNative.igGetFrameHeightWithSpacing(); - return ret; + byte ret = ImGuiNative.igIsWindowCollapsed(); + return ret != 0; } - public static void CloseCurrentPopup() + public static bool IsWindowFocused() { - ImGuiNative.igCloseCurrentPopup(); + ImGuiFocusedFlags flags = 0; + byte ret = ImGuiNative.igIsWindowFocused(flags); + return ret != 0; } - public static void BeginGroup() + public static bool IsWindowFocused(ImGuiFocusedFlags flags) { - ImGuiNative.igBeginGroup(); + byte ret = ImGuiNative.igIsWindowFocused(flags); + return ret != 0; } - public static bool SliderScalar(string label, ImGuiDataType data_type, IntPtr v, IntPtr v_min, IntPtr v_max) + public static bool IsWindowHovered() { - byte* native_label; - if (label != null) - { - int label_byteCount = Encoding.UTF8.GetByteCount(label); - byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; - native_label = native_label_stackBytes; - fixed (char* label_ptr = label) - { - int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); - native_label[native_label_offset] = 0; - } - } - else { native_label = null; } - void* native_v = (void*)v.ToPointer(); - void* native_v_min = (void*)v_min.ToPointer(); - void* native_v_max = (void*)v_max.ToPointer(); - byte* native_format = null; - float power = 1.0f; - byte ret = ImGuiNative.igSliderScalar(native_label, data_type, native_v, native_v_min, native_v_max, native_format, power); + ImGuiHoveredFlags flags = 0; + byte ret = ImGuiNative.igIsWindowHovered(flags); return ret != 0; } - public static bool SliderScalar(string label, ImGuiDataType data_type, IntPtr v, IntPtr v_min, IntPtr v_max, string format) + public static bool IsWindowHovered(ImGuiHoveredFlags flags) + { + byte ret = ImGuiNative.igIsWindowHovered(flags); + return ret != 0; + } + public static void LabelText(string label, string fmt) { byte* native_label; if (label != null) @@ -5895,27 +5503,22 @@ namespace ImGuiNET } } else { native_label = null; } - void* native_v = (void*)v.ToPointer(); - void* native_v_min = (void*)v_min.ToPointer(); - void* native_v_max = (void*)v_max.ToPointer(); - byte* native_format; - if (format != null) + byte* native_fmt; + if (fmt != null) { - int format_byteCount = Encoding.UTF8.GetByteCount(format); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = format) + int fmt_byteCount = Encoding.UTF8.GetByteCount(fmt); + byte* native_fmt_stackBytes = stackalloc byte[fmt_byteCount + 1]; + native_fmt = native_fmt_stackBytes; + fixed (char* fmt_ptr = fmt) { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; + int native_fmt_offset = Encoding.UTF8.GetBytes(fmt_ptr, fmt.Length, native_fmt, fmt_byteCount); + native_fmt[native_fmt_offset] = 0; } } - else { native_format = null; } - float power = 1.0f; - byte ret = ImGuiNative.igSliderScalar(native_label, data_type, native_v, native_v_min, native_v_max, native_format, power); - return ret != 0; + else { native_fmt = null; } + ImGuiNative.igLabelText(native_label, native_fmt); } - public static bool SliderScalar(string label, ImGuiDataType data_type, IntPtr v, IntPtr v_min, IntPtr v_max, string format, float power) + public static bool ListBox(string label, ref int current_item, string[] items, int items_count) { byte* native_label; if (label != null) @@ -5930,58 +5533,41 @@ namespace ImGuiNET } } else { native_label = null; } - void* native_v = (void*)v.ToPointer(); - void* native_v_min = (void*)v_min.ToPointer(); - void* native_v_max = (void*)v_max.ToPointer(); - byte* native_format; - if (format != null) + int* items_byteCounts = stackalloc int[items.Length]; + int items_byteCount = 0; + for (int i = 0; i < items.Length; i++) { - int format_byteCount = Encoding.UTF8.GetByteCount(format); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = format) - { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; - } + string s = items[i]; + items_byteCounts[i] = Encoding.UTF8.GetByteCount(s); + items_byteCount += items_byteCounts[i] + 1; } - else { native_format = null; } - byte ret = ImGuiNative.igSliderScalar(native_label, data_type, native_v, native_v_min, native_v_max, native_format, power); - return ret != 0; - } - public static bool BeginCombo(string label, string preview_value) - { - byte* native_label; - if (label != null) + byte* native_items_data = stackalloc byte[items_byteCount]; + int offset = 0; + for (int i = 0; i < items.Length; i++) { - int label_byteCount = Encoding.UTF8.GetByteCount(label); - byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; - native_label = native_label_stackBytes; - fixed (char* label_ptr = label) + string s = items[i]; + fixed (char* sPtr = s) { - int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); - native_label[native_label_offset] = 0; + offset += Encoding.UTF8.GetBytes(sPtr, s.Length, native_items_data + offset, items_byteCounts[i]); + native_items_data[offset] = 0; + offset += 1; } } - else { native_label = null; } - byte* native_preview_value; - if (preview_value != null) + byte** native_items = stackalloc byte*[items.Length]; + offset = 0; + for (int i = 0; i < items.Length; i++) { - int preview_value_byteCount = Encoding.UTF8.GetByteCount(preview_value); - byte* native_preview_value_stackBytes = stackalloc byte[preview_value_byteCount + 1]; - native_preview_value = native_preview_value_stackBytes; - fixed (char* preview_value_ptr = preview_value) - { - int native_preview_value_offset = Encoding.UTF8.GetBytes(preview_value_ptr, preview_value.Length, native_preview_value, preview_value_byteCount); - native_preview_value[native_preview_value_offset] = 0; - } + native_items[i] = &native_items_data[offset]; + offset += items_byteCounts[i] + 1; + } + int height_in_items = -1; + fixed (int* native_current_item = ¤t_item) + { + byte ret = ImGuiNative.igListBoxStr_arr(native_label, native_current_item, native_items, items_count, height_in_items); + return ret != 0; } - else { native_preview_value = null; } - ImGuiComboFlags flags = 0; - byte ret = ImGuiNative.igBeginCombo(native_label, native_preview_value, flags); - return ret != 0; } - public static bool BeginCombo(string label, string preview_value, ImGuiComboFlags flags) + public static bool ListBox(string label, ref int current_item, string[] items, int items_count, int height_in_items) { byte* native_label; if (label != null) @@ -5996,23 +5582,44 @@ namespace ImGuiNET } } else { native_label = null; } - byte* native_preview_value; - if (preview_value != null) + int* items_byteCounts = stackalloc int[items.Length]; + int items_byteCount = 0; + for (int i = 0; i < items.Length; i++) { - int preview_value_byteCount = Encoding.UTF8.GetByteCount(preview_value); - byte* native_preview_value_stackBytes = stackalloc byte[preview_value_byteCount + 1]; - native_preview_value = native_preview_value_stackBytes; - fixed (char* preview_value_ptr = preview_value) + string s = items[i]; + items_byteCounts[i] = Encoding.UTF8.GetByteCount(s); + items_byteCount += items_byteCounts[i] + 1; + } + byte* native_items_data = stackalloc byte[items_byteCount]; + int offset = 0; + for (int i = 0; i < items.Length; i++) + { + string s = items[i]; + fixed (char* sPtr = s) { - int native_preview_value_offset = Encoding.UTF8.GetBytes(preview_value_ptr, preview_value.Length, native_preview_value, preview_value_byteCount); - native_preview_value[native_preview_value_offset] = 0; + offset += Encoding.UTF8.GetBytes(sPtr, s.Length, native_items_data + offset, items_byteCounts[i]); + native_items_data[offset] = 0; + offset += 1; } } - else { native_preview_value = null; } - byte ret = ImGuiNative.igBeginCombo(native_label, native_preview_value, flags); - return ret != 0; + byte** native_items = stackalloc byte*[items.Length]; + offset = 0; + for (int i = 0; i < items.Length; i++) + { + native_items[i] = &native_items_data[offset]; + offset += items_byteCounts[i] + 1; + } + fixed (int* native_current_item = ¤t_item) + { + byte ret = ImGuiNative.igListBoxStr_arr(native_label, native_current_item, native_items, items_count, height_in_items); + return ret != 0; + } } - public static bool BeginMenu(string label) + public static void ListBoxFooter() + { + ImGuiNative.igListBoxFooter(); + } + public static bool ListBoxHeader(string label) { byte* native_label; if (label != null) @@ -6027,11 +5634,11 @@ namespace ImGuiNET } } else { native_label = null; } - byte enabled = 1; - byte ret = ImGuiNative.igBeginMenu(native_label, enabled); + Vector2 size = new Vector2(); + byte ret = ImGuiNative.igListBoxHeaderVec2(native_label, size); return ret != 0; } - public static bool BeginMenu(string label, bool enabled) + public static bool ListBoxHeader(string label, Vector2 size) { byte* native_label; if (label != null) @@ -6046,26 +5653,10 @@ namespace ImGuiNET } } else { native_label = null; } - byte native_enabled = enabled ? (byte)1 : (byte)0; - byte ret = ImGuiNative.igBeginMenu(native_label, native_enabled); - return ret != 0; - } - public static bool IsItemHovered() - { - ImGuiHoveredFlags flags = 0; - byte ret = ImGuiNative.igIsItemHovered(flags); - return ret != 0; - } - public static bool IsItemHovered(ImGuiHoveredFlags flags) - { - byte ret = ImGuiNative.igIsItemHovered(flags); + byte ret = ImGuiNative.igListBoxHeaderVec2(native_label, size); return ret != 0; } - public static void Bullet() - { - ImGuiNative.igBullet(); - } - public static bool InputInt3(string label, ref int v) + public static bool ListBoxHeader(string label, int items_count) { byte* native_label; if (label != null) @@ -6080,14 +5671,11 @@ namespace ImGuiNET } } else { native_label = null; } - ImGuiInputTextFlags extra_flags = 0; - fixed (int* native_v = &v) - { - byte ret = ImGuiNative.igInputInt3(native_label, native_v, extra_flags); - return ret != 0; - } + int height_in_items = -1; + byte ret = ImGuiNative.igListBoxHeaderInt(native_label, items_count, height_in_items); + return ret != 0; } - public static bool InputInt3(string label, ref int v, ImGuiInputTextFlags extra_flags) + public static bool ListBoxHeader(string label, int items_count, int height_in_items) { byte* native_label; if (label != null) @@ -6102,117 +5690,143 @@ namespace ImGuiNET } } else { native_label = null; } - fixed (int* native_v = &v) - { - byte ret = ImGuiNative.igInputInt3(native_label, native_v, extra_flags); - return ret != 0; - } - } - public static void StyleColorsDark() - { - ImGuiStyle* dst = null; - ImGuiNative.igStyleColorsDark(dst); - } - public static void StyleColorsDark(ImGuiStylePtr dst) - { - ImGuiStyle* native_dst = dst.NativePtr; - ImGuiNative.igStyleColorsDark(native_dst); + byte ret = ImGuiNative.igListBoxHeaderInt(native_label, items_count, height_in_items); + return ret != 0; } - public static bool InputInt(string label, ref int v) + public static void LoadIniSettingsFromDisk(string ini_filename) { - byte* native_label; - if (label != null) + byte* native_ini_filename; + if (ini_filename != null) { - int label_byteCount = Encoding.UTF8.GetByteCount(label); - byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; - native_label = native_label_stackBytes; - fixed (char* label_ptr = label) + int ini_filename_byteCount = Encoding.UTF8.GetByteCount(ini_filename); + byte* native_ini_filename_stackBytes = stackalloc byte[ini_filename_byteCount + 1]; + native_ini_filename = native_ini_filename_stackBytes; + fixed (char* ini_filename_ptr = ini_filename) { - int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); - native_label[native_label_offset] = 0; + int native_ini_filename_offset = Encoding.UTF8.GetBytes(ini_filename_ptr, ini_filename.Length, native_ini_filename, ini_filename_byteCount); + native_ini_filename[native_ini_filename_offset] = 0; } } - else { native_label = null; } - int step = 1; - int step_fast = 100; - ImGuiInputTextFlags extra_flags = 0; - fixed (int* native_v = &v) - { - byte ret = ImGuiNative.igInputInt(native_label, native_v, step, step_fast, extra_flags); - return ret != 0; - } + else { native_ini_filename = null; } + ImGuiNative.igLoadIniSettingsFromDisk(native_ini_filename); } - public static bool InputInt(string label, ref int v, int step) + public static void LoadIniSettingsFromMemory(string ini_data) { - byte* native_label; - if (label != null) + byte* native_ini_data; + if (ini_data != null) { - int label_byteCount = Encoding.UTF8.GetByteCount(label); - byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; - native_label = native_label_stackBytes; - fixed (char* label_ptr = label) + int ini_data_byteCount = Encoding.UTF8.GetByteCount(ini_data); + byte* native_ini_data_stackBytes = stackalloc byte[ini_data_byteCount + 1]; + native_ini_data = native_ini_data_stackBytes; + fixed (char* ini_data_ptr = ini_data) { - int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); - native_label[native_label_offset] = 0; + int native_ini_data_offset = Encoding.UTF8.GetBytes(ini_data_ptr, ini_data.Length, native_ini_data, ini_data_byteCount); + native_ini_data[native_ini_data_offset] = 0; } } - else { native_label = null; } - int step_fast = 100; - ImGuiInputTextFlags extra_flags = 0; - fixed (int* native_v = &v) - { - byte ret = ImGuiNative.igInputInt(native_label, native_v, step, step_fast, extra_flags); - return ret != 0; - } + else { native_ini_data = null; } + uint ini_size = 0; + ImGuiNative.igLoadIniSettingsFromMemory(native_ini_data, ini_size); } - public static bool InputInt(string label, ref int v, int step, int step_fast) + public static void LoadIniSettingsFromMemory(string ini_data, uint ini_size) { - byte* native_label; - if (label != null) + byte* native_ini_data; + if (ini_data != null) { - int label_byteCount = Encoding.UTF8.GetByteCount(label); - byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; - native_label = native_label_stackBytes; - fixed (char* label_ptr = label) + int ini_data_byteCount = Encoding.UTF8.GetByteCount(ini_data); + byte* native_ini_data_stackBytes = stackalloc byte[ini_data_byteCount + 1]; + native_ini_data = native_ini_data_stackBytes; + fixed (char* ini_data_ptr = ini_data) { - int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); - native_label[native_label_offset] = 0; + int native_ini_data_offset = Encoding.UTF8.GetBytes(ini_data_ptr, ini_data.Length, native_ini_data, ini_data_byteCount); + native_ini_data[native_ini_data_offset] = 0; } } - else { native_label = null; } - ImGuiInputTextFlags extra_flags = 0; - fixed (int* native_v = &v) - { - byte ret = ImGuiNative.igInputInt(native_label, native_v, step, step_fast, extra_flags); - return ret != 0; - } + else { native_ini_data = null; } + ImGuiNative.igLoadIniSettingsFromMemory(native_ini_data, ini_size); } - public static bool InputInt(string label, ref int v, int step, int step_fast, ImGuiInputTextFlags extra_flags) + public static void LogButtons() { - byte* native_label; - if (label != null) + ImGuiNative.igLogButtons(); + } + public static void LogFinish() + { + ImGuiNative.igLogFinish(); + } + public static void LogText(string fmt) + { + byte* native_fmt; + if (fmt != null) { - int label_byteCount = Encoding.UTF8.GetByteCount(label); - byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; - native_label = native_label_stackBytes; - fixed (char* label_ptr = label) + int fmt_byteCount = Encoding.UTF8.GetByteCount(fmt); + byte* native_fmt_stackBytes = stackalloc byte[fmt_byteCount + 1]; + native_fmt = native_fmt_stackBytes; + fixed (char* fmt_ptr = fmt) { - int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); - native_label[native_label_offset] = 0; + int native_fmt_offset = Encoding.UTF8.GetBytes(fmt_ptr, fmt.Length, native_fmt, fmt_byteCount); + native_fmt[native_fmt_offset] = 0; } } - else { native_label = null; } - fixed (int* native_v = &v) + else { native_fmt = null; } + ImGuiNative.igLogText(native_fmt); + } + public static void LogToClipboard() + { + int max_depth = -1; + ImGuiNative.igLogToClipboard(max_depth); + } + public static void LogToClipboard(int max_depth) + { + ImGuiNative.igLogToClipboard(max_depth); + } + public static void LogToFile() + { + int max_depth = -1; + byte* native_filename = null; + ImGuiNative.igLogToFile(max_depth, native_filename); + } + public static void LogToFile(int max_depth) + { + byte* native_filename = null; + ImGuiNative.igLogToFile(max_depth, native_filename); + } + public static void LogToFile(int max_depth, string filename) + { + byte* native_filename; + if (filename != null) { - byte ret = ImGuiNative.igInputInt(native_label, native_v, step, step_fast, extra_flags); - return ret != 0; + int filename_byteCount = Encoding.UTF8.GetByteCount(filename); + byte* native_filename_stackBytes = stackalloc byte[filename_byteCount + 1]; + native_filename = native_filename_stackBytes; + fixed (char* filename_ptr = filename) + { + int native_filename_offset = Encoding.UTF8.GetBytes(filename_ptr, filename.Length, native_filename, filename_byteCount); + native_filename[native_filename_offset] = 0; + } } + else { native_filename = null; } + ImGuiNative.igLogToFile(max_depth, native_filename); + } + public static void LogToTTY() + { + int max_depth = -1; + ImGuiNative.igLogToTTY(max_depth); } - public static void SetWindowFontScale(float scale) + public static void LogToTTY(int max_depth) { - ImGuiNative.igSetWindowFontScale(scale); + ImGuiNative.igLogToTTY(max_depth); } - public static bool SliderInt(string label, ref int v, int v_min, int v_max) + public static IntPtr MemAlloc(uint size) + { + void* ret = ImGuiNative.igMemAlloc(size); + return (IntPtr)ret; + } + public static void MemFree(IntPtr ptr) + { + void* native_ptr = (void*)ptr.ToPointer(); + ImGuiNative.igMemFree(native_ptr); + } + public static bool MenuItem(string label) { byte* native_label; if (label != null) @@ -6227,22 +5841,13 @@ namespace ImGuiNET } } else { native_label = null; } - byte* native_format; - int format_byteCount = Encoding.UTF8.GetByteCount("%d"); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = "%d") - { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; - } - fixed (int* native_v = &v) - { - byte ret = ImGuiNative.igSliderInt(native_label, native_v, v_min, v_max, native_format); - return ret != 0; - } + byte* native_shortcut = null; + byte selected = 0; + byte enabled = 1; + byte ret = ImGuiNative.igMenuItemBool(native_label, native_shortcut, selected, enabled); + return ret != 0; } - public static bool SliderInt(string label, ref int v, int v_min, int v_max, string format) + public static bool MenuItem(string label, string shortcut) { byte* native_label; if (label != null) @@ -6257,41 +5862,25 @@ namespace ImGuiNET } } else { native_label = null; } - byte* native_format; - if (format != null) + byte* native_shortcut; + if (shortcut != null) { - int format_byteCount = Encoding.UTF8.GetByteCount(format); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = format) + int shortcut_byteCount = Encoding.UTF8.GetByteCount(shortcut); + byte* native_shortcut_stackBytes = stackalloc byte[shortcut_byteCount + 1]; + native_shortcut = native_shortcut_stackBytes; + fixed (char* shortcut_ptr = shortcut) { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; + int native_shortcut_offset = Encoding.UTF8.GetBytes(shortcut_ptr, shortcut.Length, native_shortcut, shortcut_byteCount); + native_shortcut[native_shortcut_offset] = 0; } } - else { native_format = null; } - fixed (int* native_v = &v) - { - byte ret = ImGuiNative.igSliderInt(native_label, native_v, v_min, v_max, native_format); - return ret != 0; - } - } - public static void SetNextWindowPos(Vector2 pos) - { - ImGuiCond cond = 0; - Vector2 pivot = new Vector2(); - ImGuiNative.igSetNextWindowPos(pos, cond, pivot); - } - public static void SetNextWindowPos(Vector2 pos, ImGuiCond cond) - { - Vector2 pivot = new Vector2(); - ImGuiNative.igSetNextWindowPos(pos, cond, pivot); - } - public static void SetNextWindowPos(Vector2 pos, ImGuiCond cond, Vector2 pivot) - { - ImGuiNative.igSetNextWindowPos(pos, cond, pivot); + else { native_shortcut = null; } + byte selected = 0; + byte enabled = 1; + byte ret = ImGuiNative.igMenuItemBool(native_label, native_shortcut, selected, enabled); + return ret != 0; } - public static bool DragInt3(string label, ref int v) + public static bool MenuItem(string label, string shortcut, bool selected) { byte* native_label; if (label != null) @@ -6306,25 +5895,25 @@ namespace ImGuiNET } } else { native_label = null; } - float v_speed = 1.0f; - int v_min = 0; - int v_max = 0; - byte* native_format; - int format_byteCount = Encoding.UTF8.GetByteCount("%d"); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = "%d") + byte* native_shortcut; + if (shortcut != null) + { + int shortcut_byteCount = Encoding.UTF8.GetByteCount(shortcut); + byte* native_shortcut_stackBytes = stackalloc byte[shortcut_byteCount + 1]; + native_shortcut = native_shortcut_stackBytes; + fixed (char* shortcut_ptr = shortcut) { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; + int native_shortcut_offset = Encoding.UTF8.GetBytes(shortcut_ptr, shortcut.Length, native_shortcut, shortcut_byteCount); + native_shortcut[native_shortcut_offset] = 0; } - fixed (int* native_v = &v) - { - byte ret = ImGuiNative.igDragInt3(native_label, native_v, v_speed, v_min, v_max, native_format); - return ret != 0; } + else { native_shortcut = null; } + byte native_selected = selected ? (byte)1 : (byte)0; + byte enabled = 1; + byte ret = ImGuiNative.igMenuItemBool(native_label, native_shortcut, native_selected, enabled); + return ret != 0; } - public static bool DragInt3(string label, ref int v, float v_speed) + public static bool MenuItem(string label, string shortcut, bool selected, bool enabled) { byte* native_label; if (label != null) @@ -6339,24 +5928,25 @@ namespace ImGuiNET } } else { native_label = null; } - int v_min = 0; - int v_max = 0; - byte* native_format; - int format_byteCount = Encoding.UTF8.GetByteCount("%d"); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = "%d") + byte* native_shortcut; + if (shortcut != null) + { + int shortcut_byteCount = Encoding.UTF8.GetByteCount(shortcut); + byte* native_shortcut_stackBytes = stackalloc byte[shortcut_byteCount + 1]; + native_shortcut = native_shortcut_stackBytes; + fixed (char* shortcut_ptr = shortcut) { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; + int native_shortcut_offset = Encoding.UTF8.GetBytes(shortcut_ptr, shortcut.Length, native_shortcut, shortcut_byteCount); + native_shortcut[native_shortcut_offset] = 0; } - fixed (int* native_v = &v) - { - byte ret = ImGuiNative.igDragInt3(native_label, native_v, v_speed, v_min, v_max, native_format); - return ret != 0; } + else { native_shortcut = null; } + byte native_selected = selected ? (byte)1 : (byte)0; + byte native_enabled = enabled ? (byte)1 : (byte)0; + byte ret = ImGuiNative.igMenuItemBool(native_label, native_shortcut, native_selected, native_enabled); + return ret != 0; } - public static bool DragInt3(string label, ref int v, float v_speed, int v_min) + public static bool MenuItem(string label, string shortcut, ref bool p_selected) { byte* native_label; if (label != null) @@ -6371,23 +5961,27 @@ namespace ImGuiNET } } else { native_label = null; } - int v_max = 0; - byte* native_format; - int format_byteCount = Encoding.UTF8.GetByteCount("%d"); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = "%d") + byte* native_shortcut; + if (shortcut != null) + { + int shortcut_byteCount = Encoding.UTF8.GetByteCount(shortcut); + byte* native_shortcut_stackBytes = stackalloc byte[shortcut_byteCount + 1]; + native_shortcut = native_shortcut_stackBytes; + fixed (char* shortcut_ptr = shortcut) { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; + int native_shortcut_offset = Encoding.UTF8.GetBytes(shortcut_ptr, shortcut.Length, native_shortcut, shortcut_byteCount); + native_shortcut[native_shortcut_offset] = 0; } - fixed (int* native_v = &v) - { - byte ret = ImGuiNative.igDragInt3(native_label, native_v, v_speed, v_min, v_max, native_format); - return ret != 0; } + else { native_shortcut = null; } + byte native_p_selected_val = p_selected ? (byte)1 : (byte)0; + byte* native_p_selected = &native_p_selected_val; + byte enabled = 1; + byte ret = ImGuiNative.igMenuItemBoolPtr(native_label, native_shortcut, native_p_selected, enabled); + p_selected = native_p_selected_val != 0; + return ret != 0; } - public static bool DragInt3(string label, ref int v, float v_speed, int v_min, int v_max) + public static bool MenuItem(string label, string shortcut, ref bool p_selected, bool enabled) { byte* native_label; if (label != null) @@ -6402,56 +5996,63 @@ namespace ImGuiNET } } else { native_label = null; } - byte* native_format; - int format_byteCount = Encoding.UTF8.GetByteCount("%d"); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = "%d") + byte* native_shortcut; + if (shortcut != null) + { + int shortcut_byteCount = Encoding.UTF8.GetByteCount(shortcut); + byte* native_shortcut_stackBytes = stackalloc byte[shortcut_byteCount + 1]; + native_shortcut = native_shortcut_stackBytes; + fixed (char* shortcut_ptr = shortcut) { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; + int native_shortcut_offset = Encoding.UTF8.GetBytes(shortcut_ptr, shortcut.Length, native_shortcut, shortcut_byteCount); + native_shortcut[native_shortcut_offset] = 0; } - fixed (int* native_v = &v) - { - byte ret = ImGuiNative.igDragInt3(native_label, native_v, v_speed, v_min, v_max, native_format); - return ret != 0; } + else { native_shortcut = null; } + byte native_p_selected_val = p_selected ? (byte)1 : (byte)0; + byte* native_p_selected = &native_p_selected_val; + byte native_enabled = enabled ? (byte)1 : (byte)0; + byte ret = ImGuiNative.igMenuItemBoolPtr(native_label, native_shortcut, native_p_selected, native_enabled); + p_selected = native_p_selected_val != 0; + return ret != 0; } - public static bool DragInt3(string label, ref int v, float v_speed, int v_min, int v_max, string format) + public static void NewFrame() { - byte* native_label; - if (label != null) - { - int label_byteCount = Encoding.UTF8.GetByteCount(label); - byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; - native_label = native_label_stackBytes; - fixed (char* label_ptr = label) - { - int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); - native_label[native_label_offset] = 0; - } - } - else { native_label = null; } - byte* native_format; - if (format != null) + ImGuiNative.igNewFrame(); + } + public static void NewLine() + { + ImGuiNative.igNewLine(); + } + public static void NextColumn() + { + ImGuiNative.igNextColumn(); + } + public static void OpenPopup(string str_id) + { + byte* native_str_id; + if (str_id != null) { - int format_byteCount = Encoding.UTF8.GetByteCount(format); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = format) + int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + fixed (char* str_id_ptr = str_id) { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; + int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; } } - else { native_format = null; } - fixed (int* native_v = &v) - { - byte ret = ImGuiNative.igDragInt3(native_label, native_v, v_speed, v_min, v_max, native_format); - return ret != 0; - } + else { native_str_id = null; } + ImGuiNative.igOpenPopup(native_str_id); + } + public static bool OpenPopupOnItemClick() + { + byte* native_str_id = null; + int mouse_button = 1; + byte ret = ImGuiNative.igOpenPopupOnItemClick(native_str_id, mouse_button); + return ret != 0; } - public static void OpenPopup(string str_id) + public static bool OpenPopupOnItemClick(string str_id) { byte* native_str_id; if (str_id != null) @@ -6466,94 +6067,55 @@ namespace ImGuiNET } } else { native_str_id = null; } - ImGuiNative.igOpenPopup(native_str_id); + int mouse_button = 1; + byte ret = ImGuiNative.igOpenPopupOnItemClick(native_str_id, mouse_button); + return ret != 0; } - public static Vector2 CalcTextSize(string text) + public static bool OpenPopupOnItemClick(string str_id, int mouse_button) { - byte* native_text; - if (text != null) + byte* native_str_id; + if (str_id != null) { - int text_byteCount = Encoding.UTF8.GetByteCount(text); - byte* native_text_stackBytes = stackalloc byte[text_byteCount + 1]; - native_text = native_text_stackBytes; - fixed (char* text_ptr = text) + int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + fixed (char* str_id_ptr = str_id) { - int native_text_offset = Encoding.UTF8.GetBytes(text_ptr, text.Length, native_text, text_byteCount); - native_text[native_text_offset] = 0; + int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; } } - else { native_text = null; } - byte* native_text_end = null; - byte hide_text_after_double_hash = 0; - float wrap_width = -1.0f; - Vector2 ret = ImGuiNative.igCalcTextSize(native_text, native_text_end, hide_text_after_double_hash, wrap_width); - return ret; - } - public static IntPtr GetDrawListSharedData() - { - IntPtr ret = ImGuiNative.igGetDrawListSharedData(); - return ret; - } - public static void Columns() - { - int count = 1; - byte* native_id = null; - byte border = 1; - ImGuiNative.igColumns(count, native_id, border); - } - public static void Columns(int count) - { - byte* native_id = null; - byte border = 1; - ImGuiNative.igColumns(count, native_id, border); + else { native_str_id = null; } + byte ret = ImGuiNative.igOpenPopupOnItemClick(native_str_id, mouse_button); + return ret != 0; } - public static void Columns(int count, string id) + public static void PlotHistogram(string label, ref float values, int values_count) { - byte* native_id; - if (id != null) + byte* native_label; + if (label != null) { - int id_byteCount = Encoding.UTF8.GetByteCount(id); - byte* native_id_stackBytes = stackalloc byte[id_byteCount + 1]; - native_id = native_id_stackBytes; - fixed (char* id_ptr = id) + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + fixed (char* label_ptr = label) { - int native_id_offset = Encoding.UTF8.GetBytes(id_ptr, id.Length, native_id, id_byteCount); - native_id[native_id_offset] = 0; + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; } } - else { native_id = null; } - byte border = 1; - ImGuiNative.igColumns(count, native_id, border); - } - public static void Columns(int count, string id, bool border) - { - byte* native_id; - if (id != null) + else { native_label = null; } + int values_offset = 0; + byte* native_overlay_text = null; + float scale_min = float.MaxValue; + float scale_max = float.MaxValue; + Vector2 graph_size = new Vector2(); + int stride = sizeof(float); + fixed (float* native_values = &values) { - int id_byteCount = Encoding.UTF8.GetByteCount(id); - byte* native_id_stackBytes = stackalloc byte[id_byteCount + 1]; - native_id = native_id_stackBytes; - fixed (char* id_ptr = id) - { - int native_id_offset = Encoding.UTF8.GetBytes(id_ptr, id.Length, native_id, id_byteCount); - native_id[native_id_offset] = 0; - } + ImGuiNative.igPlotHistogramFloatPtr(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); } - else { native_id = null; } - byte native_border = border ? (byte)1 : (byte)0; - ImGuiNative.igColumns(count, native_id, native_border); - } - public static bool IsItemActive() - { - byte ret = ImGuiNative.igIsItemActive(); - return ret != 0; - } - public static bool BeginDragDropTarget() - { - byte ret = ImGuiNative.igBeginDragDropTarget(); - return ret != 0; } - public static bool ColorPicker3(string label, ref Vector3 col) + public static void PlotHistogram(string label, ref float values, int values_count, int values_offset) { byte* native_label; if (label != null) @@ -6568,14 +6130,17 @@ namespace ImGuiNET } } else { native_label = null; } - ImGuiColorEditFlags flags = 0; - fixed (Vector3* native_col = &col) + byte* native_overlay_text = null; + float scale_min = float.MaxValue; + float scale_max = float.MaxValue; + Vector2 graph_size = new Vector2(); + int stride = sizeof(float); + fixed (float* native_values = &values) { - byte ret = ImGuiNative.igColorPicker3(native_label, native_col, flags); - return ret != 0; + ImGuiNative.igPlotHistogramFloatPtr(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); } } - public static bool ColorPicker3(string label, ref Vector3 col, ImGuiColorEditFlags flags) + public static void PlotHistogram(string label, ref float values, int values_count, int values_offset, string overlay_text) { byte* native_label; if (label != null) @@ -6590,131 +6155,100 @@ namespace ImGuiNET } } else { native_label = null; } - fixed (Vector3* native_col = &col) + byte* native_overlay_text; + if (overlay_text != null) { - byte ret = ImGuiNative.igColorPicker3(native_label, native_col, flags); - return ret != 0; + int overlay_text_byteCount = Encoding.UTF8.GetByteCount(overlay_text); + byte* native_overlay_text_stackBytes = stackalloc byte[overlay_text_byteCount + 1]; + native_overlay_text = native_overlay_text_stackBytes; + fixed (char* overlay_text_ptr = overlay_text) + { + int native_overlay_text_offset = Encoding.UTF8.GetBytes(overlay_text_ptr, overlay_text.Length, native_overlay_text, overlay_text_byteCount); + native_overlay_text[native_overlay_text_offset] = 0; + } + } + else { native_overlay_text = null; } + float scale_min = float.MaxValue; + float scale_max = float.MaxValue; + Vector2 graph_size = new Vector2(); + int stride = sizeof(float); + fixed (float* native_values = &values) + { + ImGuiNative.igPlotHistogramFloatPtr(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); } } - public static Vector2 GetContentRegionMax() - { - Vector2 ret = ImGuiNative.igGetContentRegionMax(); - return ret; - } - public static bool BeginChildFrame(uint id, Vector2 size) - { - ImGuiWindowFlags flags = 0; - byte ret = ImGuiNative.igBeginChildFrame(id, size, flags); - return ret != 0; - } - public static bool BeginChildFrame(uint id, Vector2 size, ImGuiWindowFlags flags) - { - byte ret = ImGuiNative.igBeginChildFrame(id, size, flags); - return ret != 0; - } - public static void SaveIniSettingsToDisk(string ini_filename) + public static void PlotHistogram(string label, ref float values, int values_count, int values_offset, string overlay_text, float scale_min) { - byte* native_ini_filename; - if (ini_filename != null) + byte* native_label; + if (label != null) { - int ini_filename_byteCount = Encoding.UTF8.GetByteCount(ini_filename); - byte* native_ini_filename_stackBytes = stackalloc byte[ini_filename_byteCount + 1]; - native_ini_filename = native_ini_filename_stackBytes; - fixed (char* ini_filename_ptr = ini_filename) + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + fixed (char* label_ptr = label) { - int native_ini_filename_offset = Encoding.UTF8.GetBytes(ini_filename_ptr, ini_filename.Length, native_ini_filename, ini_filename_byteCount); - native_ini_filename[native_ini_filename_offset] = 0; + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; } } - else { native_ini_filename = null; } - ImGuiNative.igSaveIniSettingsToDisk(native_ini_filename); - } - public static void EndDragDropTarget() - { - ImGuiNative.igEndDragDropTarget(); - } - public static int GetKeyPressedAmount(int key_index, float repeat_delay, float rate) - { - int ret = ImGuiNative.igGetKeyPressedAmount(key_index, repeat_delay, rate); - return ret; - } - public static void NewFrame() - { - ImGuiNative.igNewFrame(); - } - public static void ResetMouseDragDelta() - { - int button = 0; - ImGuiNative.igResetMouseDragDelta(button); - } - public static void ResetMouseDragDelta(int button) - { - ImGuiNative.igResetMouseDragDelta(button); - } - public static float GetTreeNodeToLabelSpacing() - { - float ret = ImGuiNative.igGetTreeNodeToLabelSpacing(); - return ret; - } - public static Vector2 GetMousePos() - { - Vector2 ret = ImGuiNative.igGetMousePos(); - return ret; - } - public static void PopID() - { - ImGuiNative.igPopID(); - } - public static bool IsMouseDoubleClicked(int button) - { - byte ret = ImGuiNative.igIsMouseDoubleClicked(button); - return ret != 0; - } - public static void StyleColorsClassic() - { - ImGuiStyle* dst = null; - ImGuiNative.igStyleColorsClassic(dst); - } - public static void StyleColorsClassic(ImGuiStylePtr dst) - { - ImGuiStyle* native_dst = dst.NativePtr; - ImGuiNative.igStyleColorsClassic(native_dst); - } - public static void SetWindowFocus() - { - ImGuiNative.igSetWindowFocus(); + else { native_label = null; } + byte* native_overlay_text; + if (overlay_text != null) + { + int overlay_text_byteCount = Encoding.UTF8.GetByteCount(overlay_text); + byte* native_overlay_text_stackBytes = stackalloc byte[overlay_text_byteCount + 1]; + native_overlay_text = native_overlay_text_stackBytes; + fixed (char* overlay_text_ptr = overlay_text) + { + int native_overlay_text_offset = Encoding.UTF8.GetBytes(overlay_text_ptr, overlay_text.Length, native_overlay_text, overlay_text_byteCount); + native_overlay_text[native_overlay_text_offset] = 0; + } + } + else { native_overlay_text = null; } + float scale_max = float.MaxValue; + Vector2 graph_size = new Vector2(); + int stride = sizeof(float); + fixed (float* native_values = &values) + { + ImGuiNative.igPlotHistogramFloatPtr(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); + } } - public static void SetWindowFocus(string name) + public static void PlotHistogram(string label, ref float values, int values_count, int values_offset, string overlay_text, float scale_min, float scale_max) { - byte* native_name; - if (name != null) + byte* native_label; + if (label != null) { - int name_byteCount = Encoding.UTF8.GetByteCount(name); - byte* native_name_stackBytes = stackalloc byte[name_byteCount + 1]; - native_name = native_name_stackBytes; - fixed (char* name_ptr = name) + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + fixed (char* label_ptr = label) { - int native_name_offset = Encoding.UTF8.GetBytes(name_ptr, name.Length, native_name, name_byteCount); - native_name[native_name_offset] = 0; + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; } } - else { native_name = null; } - ImGuiNative.igSetWindowFocusStr(native_name); - } - public static void ColorConvertHSVtoRGB(float h, float s, float v, out float out_r, out float out_g, out float out_b) - { - fixed (float* native_out_r = &out_r) + else { native_label = null; } + byte* native_overlay_text; + if (overlay_text != null) { - fixed (float* native_out_g = &out_g) + int overlay_text_byteCount = Encoding.UTF8.GetByteCount(overlay_text); + byte* native_overlay_text_stackBytes = stackalloc byte[overlay_text_byteCount + 1]; + native_overlay_text = native_overlay_text_stackBytes; + fixed (char* overlay_text_ptr = overlay_text) { - fixed (float* native_out_b = &out_b) - { - ImGuiNative.igColorConvertHSVtoRGB(h, s, v, native_out_r, native_out_g, native_out_b); - } + int native_overlay_text_offset = Encoding.UTF8.GetBytes(overlay_text_ptr, overlay_text.Length, native_overlay_text, overlay_text_byteCount); + native_overlay_text[native_overlay_text_offset] = 0; } } + else { native_overlay_text = null; } + Vector2 graph_size = new Vector2(); + int stride = sizeof(float); + fixed (float* native_values = &values) + { + ImGuiNative.igPlotHistogramFloatPtr(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); + } } - public static bool VSliderFloat(string label, Vector2 size, ref float v, float v_min, float v_max) + public static void PlotHistogram(string label, ref float values, int values_count, int values_offset, string overlay_text, float scale_min, float scale_max, Vector2 graph_size) { byte* native_label; if (label != null) @@ -6729,23 +6263,26 @@ namespace ImGuiNET } } else { native_label = null; } - byte* native_format; - int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = "%.3f") + byte* native_overlay_text; + if (overlay_text != null) + { + int overlay_text_byteCount = Encoding.UTF8.GetByteCount(overlay_text); + byte* native_overlay_text_stackBytes = stackalloc byte[overlay_text_byteCount + 1]; + native_overlay_text = native_overlay_text_stackBytes; + fixed (char* overlay_text_ptr = overlay_text) { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; + int native_overlay_text_offset = Encoding.UTF8.GetBytes(overlay_text_ptr, overlay_text.Length, native_overlay_text, overlay_text_byteCount); + native_overlay_text[native_overlay_text_offset] = 0; } - float power = 1.0f; - fixed (float* native_v = &v) + } + else { native_overlay_text = null; } + int stride = sizeof(float); + fixed (float* native_values = &values) { - byte ret = ImGuiNative.igVSliderFloat(native_label, size, native_v, v_min, v_max, native_format, power); - return ret != 0; + ImGuiNative.igPlotHistogramFloatPtr(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); } } - public static bool VSliderFloat(string label, Vector2 size, ref float v, float v_min, float v_max, string format) + public static void PlotHistogram(string label, ref float values, int values_count, int values_offset, string overlay_text, float scale_min, float scale_max, Vector2 graph_size, int stride) { byte* native_label; if (label != null) @@ -6760,27 +6297,25 @@ namespace ImGuiNET } } else { native_label = null; } - byte* native_format; - if (format != null) + byte* native_overlay_text; + if (overlay_text != null) { - int format_byteCount = Encoding.UTF8.GetByteCount(format); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = format) + int overlay_text_byteCount = Encoding.UTF8.GetByteCount(overlay_text); + byte* native_overlay_text_stackBytes = stackalloc byte[overlay_text_byteCount + 1]; + native_overlay_text = native_overlay_text_stackBytes; + fixed (char* overlay_text_ptr = overlay_text) { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; + int native_overlay_text_offset = Encoding.UTF8.GetBytes(overlay_text_ptr, overlay_text.Length, native_overlay_text, overlay_text_byteCount); + native_overlay_text[native_overlay_text_offset] = 0; } } - else { native_format = null; } - float power = 1.0f; - fixed (float* native_v = &v) + else { native_overlay_text = null; } + fixed (float* native_values = &values) { - byte ret = ImGuiNative.igVSliderFloat(native_label, size, native_v, v_min, v_max, native_format, power); - return ret != 0; + ImGuiNative.igPlotHistogramFloatPtr(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); } } - public static bool VSliderFloat(string label, Vector2 size, ref float v, float v_min, float v_max, string format, float power) + public static void PlotLines(string label, ref float values, int values_count) { byte* native_label; if (label != null) @@ -6795,112 +6330,43 @@ namespace ImGuiNET } } else { native_label = null; } - byte* native_format; - if (format != null) + int values_offset = 0; + byte* native_overlay_text = null; + float scale_min = float.MaxValue; + float scale_max = float.MaxValue; + Vector2 graph_size = new Vector2(); + int stride = sizeof(float); + fixed (float* native_values = &values) { - int format_byteCount = Encoding.UTF8.GetByteCount(format); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = format) + ImGuiNative.igPlotLines(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); + } + } + public static void PlotLines(string label, ref float values, int values_count, int values_offset) + { + byte* native_label; + if (label != null) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + fixed (char* label_ptr = label) { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; } } - else { native_format = null; } - fixed (float* native_v = &v) + else { native_label = null; } + byte* native_overlay_text = null; + float scale_min = float.MaxValue; + float scale_max = float.MaxValue; + Vector2 graph_size = new Vector2(); + int stride = sizeof(float); + fixed (float* native_values = &values) { - byte ret = ImGuiNative.igVSliderFloat(native_label, size, native_v, v_min, v_max, native_format, power); - return ret != 0; + ImGuiNative.igPlotLines(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); } } - public static Vector4 ColorConvertU32ToFloat4(uint @in) - { - Vector4 ret = ImGuiNative.igColorConvertU32ToFloat4(@in); - return ret; - } - public static void PopTextWrapPos() - { - ImGuiNative.igPopTextWrapPos(); - } - public static float GetColumnWidth() - { - int column_index = -1; - float ret = ImGuiNative.igGetColumnWidth(column_index); - return ret; - } - public static float GetColumnWidth(int column_index) - { - float ret = ImGuiNative.igGetColumnWidth(column_index); - return ret; - } - public static void EndMenuBar() - { - ImGuiNative.igEndMenuBar(); - } - public static string GetStyleColorName(ImGuiCol idx) - { - byte* ret = ImGuiNative.igGetStyleColorName(idx); - return Util.StringFromPtr(ret); - } - public static bool IsMouseDragging() - { - int button = 0; - float lock_threshold = -1.0f; - byte ret = ImGuiNative.igIsMouseDragging(button, lock_threshold); - return ret != 0; - } - public static bool IsMouseDragging(int button) - { - float lock_threshold = -1.0f; - byte ret = ImGuiNative.igIsMouseDragging(button, lock_threshold); - return ret != 0; - } - public static bool IsMouseDragging(int button, float lock_threshold) - { - byte ret = ImGuiNative.igIsMouseDragging(button, lock_threshold); - return ret != 0; - } - public static void PushStyleColor(ImGuiCol idx, uint col) - { - ImGuiNative.igPushStyleColorU32(idx, col); - } - public static void PushStyleColor(ImGuiCol idx, Vector4 col) - { - ImGuiNative.igPushStyleColor(idx, col); - } - public static IntPtr MemAlloc(uint size) - { - void* ret = ImGuiNative.igMemAlloc(size); - return (IntPtr)ret; - } - public static void SetCurrentContext(IntPtr ctx) - { - ImGuiNative.igSetCurrentContext(ctx); - } - public static void PushItemWidth(float item_width) - { - ImGuiNative.igPushItemWidth(item_width); - } - public static bool IsWindowAppearing() - { - byte ret = ImGuiNative.igIsWindowAppearing(); - return ret != 0; - } - public static ImGuiStylePtr GetStyle() - { - ImGuiStyle* ret = ImGuiNative.igGetStyle(); - return new ImGuiStylePtr(ret); - } - public static void SetItemAllowOverlap() - { - ImGuiNative.igSetItemAllowOverlap(); - } - public static void EndChild() - { - ImGuiNative.igEndChild(); - } - public static bool CollapsingHeader(string label) + public static void PlotLines(string label, ref float values, int values_count, int values_offset, string overlay_text) { byte* native_label; if (label != null) @@ -6915,11 +6381,29 @@ namespace ImGuiNET } } else { native_label = null; } - ImGuiTreeNodeFlags flags = 0; - byte ret = ImGuiNative.igCollapsingHeader(native_label, flags); - return ret != 0; + byte* native_overlay_text; + if (overlay_text != null) + { + int overlay_text_byteCount = Encoding.UTF8.GetByteCount(overlay_text); + byte* native_overlay_text_stackBytes = stackalloc byte[overlay_text_byteCount + 1]; + native_overlay_text = native_overlay_text_stackBytes; + fixed (char* overlay_text_ptr = overlay_text) + { + int native_overlay_text_offset = Encoding.UTF8.GetBytes(overlay_text_ptr, overlay_text.Length, native_overlay_text, overlay_text_byteCount); + native_overlay_text[native_overlay_text_offset] = 0; + } + } + else { native_overlay_text = null; } + float scale_min = float.MaxValue; + float scale_max = float.MaxValue; + Vector2 graph_size = new Vector2(); + int stride = sizeof(float); + fixed (float* native_values = &values) + { + ImGuiNative.igPlotLines(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); + } } - public static bool CollapsingHeader(string label, ImGuiTreeNodeFlags flags) + public static void PlotLines(string label, ref float values, int values_count, int values_offset, string overlay_text, float scale_min) { byte* native_label; if (label != null) @@ -6934,10 +6418,28 @@ namespace ImGuiNET } } else { native_label = null; } - byte ret = ImGuiNative.igCollapsingHeader(native_label, flags); - return ret != 0; + byte* native_overlay_text; + if (overlay_text != null) + { + int overlay_text_byteCount = Encoding.UTF8.GetByteCount(overlay_text); + byte* native_overlay_text_stackBytes = stackalloc byte[overlay_text_byteCount + 1]; + native_overlay_text = native_overlay_text_stackBytes; + fixed (char* overlay_text_ptr = overlay_text) + { + int native_overlay_text_offset = Encoding.UTF8.GetBytes(overlay_text_ptr, overlay_text.Length, native_overlay_text, overlay_text_byteCount); + native_overlay_text[native_overlay_text_offset] = 0; + } + } + else { native_overlay_text = null; } + float scale_max = float.MaxValue; + Vector2 graph_size = new Vector2(); + int stride = sizeof(float); + fixed (float* native_values = &values) + { + ImGuiNative.igPlotLines(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); + } } - public static bool CollapsingHeader(string label, ref bool p_open) + public static void PlotLines(string label, ref float values, int values_count, int values_offset, string overlay_text, float scale_min, float scale_max) { byte* native_label; if (label != null) @@ -6952,14 +6454,27 @@ namespace ImGuiNET } } else { native_label = null; } - byte native_p_open_val = p_open ? (byte)1 : (byte)0; - byte* native_p_open = &native_p_open_val; - ImGuiTreeNodeFlags flags = 0; - byte ret = ImGuiNative.igCollapsingHeaderBoolPtr(native_label, native_p_open, flags); - p_open = native_p_open_val != 0; - return ret != 0; + byte* native_overlay_text; + if (overlay_text != null) + { + int overlay_text_byteCount = Encoding.UTF8.GetByteCount(overlay_text); + byte* native_overlay_text_stackBytes = stackalloc byte[overlay_text_byteCount + 1]; + native_overlay_text = native_overlay_text_stackBytes; + fixed (char* overlay_text_ptr = overlay_text) + { + int native_overlay_text_offset = Encoding.UTF8.GetBytes(overlay_text_ptr, overlay_text.Length, native_overlay_text, overlay_text_byteCount); + native_overlay_text[native_overlay_text_offset] = 0; + } + } + else { native_overlay_text = null; } + Vector2 graph_size = new Vector2(); + int stride = sizeof(float); + fixed (float* native_values = &values) + { + ImGuiNative.igPlotLines(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); + } } - public static bool CollapsingHeader(string label, ref bool p_open, ImGuiTreeNodeFlags flags) + public static void PlotLines(string label, ref float values, int values_count, int values_offset, string overlay_text, float scale_min, float scale_max, Vector2 graph_size) { byte* native_label; if (label != null) @@ -6974,13 +6489,26 @@ namespace ImGuiNET } } else { native_label = null; } - byte native_p_open_val = p_open ? (byte)1 : (byte)0; - byte* native_p_open = &native_p_open_val; - byte ret = ImGuiNative.igCollapsingHeaderBoolPtr(native_label, native_p_open, flags); - p_open = native_p_open_val != 0; - return ret != 0; + byte* native_overlay_text; + if (overlay_text != null) + { + int overlay_text_byteCount = Encoding.UTF8.GetByteCount(overlay_text); + byte* native_overlay_text_stackBytes = stackalloc byte[overlay_text_byteCount + 1]; + native_overlay_text = native_overlay_text_stackBytes; + fixed (char* overlay_text_ptr = overlay_text) + { + int native_overlay_text_offset = Encoding.UTF8.GetBytes(overlay_text_ptr, overlay_text.Length, native_overlay_text, overlay_text_byteCount); + native_overlay_text[native_overlay_text_offset] = 0; + } + } + else { native_overlay_text = null; } + int stride = sizeof(float); + fixed (float* native_values = &values) + { + ImGuiNative.igPlotLines(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); + } } - public static bool DragFloatRange2(string label, ref float v_current_min, ref float v_current_max) + public static void PlotLines(string label, ref float values, int values_count, int values_offset, string overlay_text, float scale_min, float scale_max, Vector2 graph_size, int stride) { byte* native_label; if (label != null) @@ -6995,30 +6523,174 @@ namespace ImGuiNET } } else { native_label = null; } - float v_speed = 1.0f; - float v_min = 0.0f; - float v_max = 0.0f; - byte* native_format; - int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = "%.3f") + byte* native_overlay_text; + if (overlay_text != null) + { + int overlay_text_byteCount = Encoding.UTF8.GetByteCount(overlay_text); + byte* native_overlay_text_stackBytes = stackalloc byte[overlay_text_byteCount + 1]; + native_overlay_text = native_overlay_text_stackBytes; + fixed (char* overlay_text_ptr = overlay_text) { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; + int native_overlay_text_offset = Encoding.UTF8.GetBytes(overlay_text_ptr, overlay_text.Length, native_overlay_text, overlay_text_byteCount); + native_overlay_text[native_overlay_text_offset] = 0; } - byte* native_format_max = null; - float power = 1.0f; - fixed (float* native_v_current_min = &v_current_min) + } + else { native_overlay_text = null; } + fixed (float* native_values = &values) { - fixed (float* native_v_current_max = &v_current_max) + ImGuiNative.igPlotLines(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); + } + } + public static void PopAllowKeyboardFocus() + { + ImGuiNative.igPopAllowKeyboardFocus(); + } + public static void PopButtonRepeat() + { + ImGuiNative.igPopButtonRepeat(); + } + public static void PopClipRect() + { + ImGuiNative.igPopClipRect(); + } + public static void PopFont() + { + ImGuiNative.igPopFont(); + } + public static void PopID() + { + ImGuiNative.igPopID(); + } + public static void PopItemWidth() + { + ImGuiNative.igPopItemWidth(); + } + public static void PopStyleColor() + { + int count = 1; + ImGuiNative.igPopStyleColor(count); + } + public static void PopStyleColor(int count) + { + ImGuiNative.igPopStyleColor(count); + } + public static void PopStyleVar() + { + int count = 1; + ImGuiNative.igPopStyleVar(count); + } + public static void PopStyleVar(int count) + { + ImGuiNative.igPopStyleVar(count); + } + public static void PopTextWrapPos() + { + ImGuiNative.igPopTextWrapPos(); + } + public static void ProgressBar(float fraction) + { + Vector2 size_arg = new Vector2(-1, 0); + byte* native_overlay = null; + ImGuiNative.igProgressBar(fraction, size_arg, native_overlay); + } + public static void ProgressBar(float fraction, Vector2 size_arg) + { + byte* native_overlay = null; + ImGuiNative.igProgressBar(fraction, size_arg, native_overlay); + } + public static void ProgressBar(float fraction, Vector2 size_arg, string overlay) + { + byte* native_overlay; + if (overlay != null) + { + int overlay_byteCount = Encoding.UTF8.GetByteCount(overlay); + byte* native_overlay_stackBytes = stackalloc byte[overlay_byteCount + 1]; + native_overlay = native_overlay_stackBytes; + fixed (char* overlay_ptr = overlay) { - byte ret = ImGuiNative.igDragFloatRange2(native_label, native_v_current_min, native_v_current_max, v_speed, v_min, v_max, native_format, native_format_max, power); - return ret != 0; + int native_overlay_offset = Encoding.UTF8.GetBytes(overlay_ptr, overlay.Length, native_overlay, overlay_byteCount); + native_overlay[native_overlay_offset] = 0; } } + else { native_overlay = null; } + ImGuiNative.igProgressBar(fraction, size_arg, native_overlay); } - public static bool DragFloatRange2(string label, ref float v_current_min, ref float v_current_max, float v_speed) + public static void PushAllowKeyboardFocus(bool allow_keyboard_focus) + { + byte native_allow_keyboard_focus = allow_keyboard_focus ? (byte)1 : (byte)0; + ImGuiNative.igPushAllowKeyboardFocus(native_allow_keyboard_focus); + } + public static void PushButtonRepeat(bool repeat) + { + byte native_repeat = repeat ? (byte)1 : (byte)0; + ImGuiNative.igPushButtonRepeat(native_repeat); + } + public static void PushClipRect(Vector2 clip_rect_min, Vector2 clip_rect_max, bool intersect_with_current_clip_rect) + { + byte native_intersect_with_current_clip_rect = intersect_with_current_clip_rect ? (byte)1 : (byte)0; + ImGuiNative.igPushClipRect(clip_rect_min, clip_rect_max, native_intersect_with_current_clip_rect); + } + public static void PushFont(ImFontPtr font) + { + ImFont* native_font = font.NativePtr; + ImGuiNative.igPushFont(native_font); + } + public static void PushID(string str_id) + { + byte* native_str_id; + if (str_id != null) + { + int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + fixed (char* str_id_ptr = str_id) + { + int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + } + else { native_str_id = null; } + ImGuiNative.igPushIDStr(native_str_id); + } + public static void PushID(IntPtr ptr_id) + { + void* native_ptr_id = (void*)ptr_id.ToPointer(); + ImGuiNative.igPushIDPtr(native_ptr_id); + } + public static void PushID(int int_id) + { + ImGuiNative.igPushIDInt(int_id); + } + public static void PushItemWidth(float item_width) + { + ImGuiNative.igPushItemWidth(item_width); + } + public static void PushStyleColor(ImGuiCol idx, uint col) + { + ImGuiNative.igPushStyleColorU32(idx, col); + } + public static void PushStyleColor(ImGuiCol idx, Vector4 col) + { + ImGuiNative.igPushStyleColor(idx, col); + } + public static void PushStyleVar(ImGuiStyleVar idx, float val) + { + ImGuiNative.igPushStyleVarFloat(idx, val); + } + public static void PushStyleVar(ImGuiStyleVar idx, Vector2 val) + { + ImGuiNative.igPushStyleVarVec2(idx, val); + } + public static void PushTextWrapPos() + { + float wrap_pos_x = 0.0f; + ImGuiNative.igPushTextWrapPos(wrap_pos_x); + } + public static void PushTextWrapPos(float wrap_pos_x) + { + ImGuiNative.igPushTextWrapPos(wrap_pos_x); + } + public static bool RadioButton(string label, bool active) { byte* native_label; if (label != null) @@ -7033,29 +6705,11 @@ namespace ImGuiNET } } else { native_label = null; } - float v_min = 0.0f; - float v_max = 0.0f; - byte* native_format; - int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = "%.3f") - { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; - } - byte* native_format_max = null; - float power = 1.0f; - fixed (float* native_v_current_min = &v_current_min) - { - fixed (float* native_v_current_max = &v_current_max) - { - byte ret = ImGuiNative.igDragFloatRange2(native_label, native_v_current_min, native_v_current_max, v_speed, v_min, v_max, native_format, native_format_max, power); - return ret != 0; - } - } + byte native_active = active ? (byte)1 : (byte)0; + byte ret = ImGuiNative.igRadioButtonBool(native_label, native_active); + return ret != 0; } - public static bool DragFloatRange2(string label, ref float v_current_min, ref float v_current_max, float v_speed, float v_min) + public static bool RadioButton(string label, ref int v, int v_button) { byte* native_label; if (label != null) @@ -7070,63 +6724,72 @@ namespace ImGuiNET } } else { native_label = null; } - float v_max = 0.0f; - byte* native_format; - int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = "%.3f") - { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; - } - byte* native_format_max = null; - float power = 1.0f; - fixed (float* native_v_current_min = &v_current_min) + fixed (int* native_v = &v) { - fixed (float* native_v_current_max = &v_current_max) - { - byte ret = ImGuiNative.igDragFloatRange2(native_label, native_v_current_min, native_v_current_max, v_speed, v_min, v_max, native_format, native_format_max, power); - return ret != 0; - } + byte ret = ImGuiNative.igRadioButtonIntPtr(native_label, native_v, v_button); + return ret != 0; } } - public static bool DragFloatRange2(string label, ref float v_current_min, ref float v_current_max, float v_speed, float v_min, float v_max) + public static void Render() { - byte* native_label; - if (label != null) + ImGuiNative.igRender(); + } + public static void ResetMouseDragDelta() + { + int button = 0; + ImGuiNative.igResetMouseDragDelta(button); + } + public static void ResetMouseDragDelta(int button) + { + ImGuiNative.igResetMouseDragDelta(button); + } + public static void SameLine() + { + float pos_x = 0.0f; + float spacing_w = -1.0f; + ImGuiNative.igSameLine(pos_x, spacing_w); + } + public static void SameLine(float pos_x) + { + float spacing_w = -1.0f; + ImGuiNative.igSameLine(pos_x, spacing_w); + } + public static void SameLine(float pos_x, float spacing_w) + { + ImGuiNative.igSameLine(pos_x, spacing_w); + } + public static void SaveIniSettingsToDisk(string ini_filename) + { + byte* native_ini_filename; + if (ini_filename != null) { - int label_byteCount = Encoding.UTF8.GetByteCount(label); - byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; - native_label = native_label_stackBytes; - fixed (char* label_ptr = label) + int ini_filename_byteCount = Encoding.UTF8.GetByteCount(ini_filename); + byte* native_ini_filename_stackBytes = stackalloc byte[ini_filename_byteCount + 1]; + native_ini_filename = native_ini_filename_stackBytes; + fixed (char* ini_filename_ptr = ini_filename) { - int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); - native_label[native_label_offset] = 0; + int native_ini_filename_offset = Encoding.UTF8.GetBytes(ini_filename_ptr, ini_filename.Length, native_ini_filename, ini_filename_byteCount); + native_ini_filename[native_ini_filename_offset] = 0; } } - else { native_label = null; } - byte* native_format; - int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = "%.3f") - { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; - } - byte* native_format_max = null; - float power = 1.0f; - fixed (float* native_v_current_min = &v_current_min) + else { native_ini_filename = null; } + ImGuiNative.igSaveIniSettingsToDisk(native_ini_filename); + } + public static string SaveIniSettingsToMemory() + { + uint* out_ini_size = null; + byte* ret = ImGuiNative.igSaveIniSettingsToMemory(out_ini_size); + return Util.StringFromPtr(ret); + } + public static string SaveIniSettingsToMemory(out uint out_ini_size) + { + fixed (uint* native_out_ini_size = &out_ini_size) { - fixed (float* native_v_current_max = &v_current_max) - { - byte ret = ImGuiNative.igDragFloatRange2(native_label, native_v_current_min, native_v_current_max, v_speed, v_min, v_max, native_format, native_format_max, power); - return ret != 0; - } + byte* ret = ImGuiNative.igSaveIniSettingsToMemory(native_out_ini_size); + return Util.StringFromPtr(ret); } } - public static bool DragFloatRange2(string label, ref float v_current_min, ref float v_current_max, float v_speed, float v_min, float v_max, string format) + public static bool Selectable(string label) { byte* native_label; if (label != null) @@ -7141,31 +6804,13 @@ namespace ImGuiNET } } else { native_label = null; } - byte* native_format; - if (format != null) - { - int format_byteCount = Encoding.UTF8.GetByteCount(format); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = format) - { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; - } - } - else { native_format = null; } - byte* native_format_max = null; - float power = 1.0f; - fixed (float* native_v_current_min = &v_current_min) - { - fixed (float* native_v_current_max = &v_current_max) - { - byte ret = ImGuiNative.igDragFloatRange2(native_label, native_v_current_min, native_v_current_max, v_speed, v_min, v_max, native_format, native_format_max, power); - return ret != 0; - } - } + byte selected = 0; + ImGuiSelectableFlags flags = 0; + Vector2 size = new Vector2(); + byte ret = ImGuiNative.igSelectable(native_label, selected, flags, size); + return ret != 0; } - public static bool DragFloatRange2(string label, ref float v_current_min, ref float v_current_max, float v_speed, float v_min, float v_max, string format, string format_max) + public static bool Selectable(string label, bool selected) { byte* native_label; if (label != null) @@ -7180,43 +6825,13 @@ namespace ImGuiNET } } else { native_label = null; } - byte* native_format; - if (format != null) - { - int format_byteCount = Encoding.UTF8.GetByteCount(format); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = format) - { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; - } - } - else { native_format = null; } - byte* native_format_max; - if (format_max != null) - { - int format_max_byteCount = Encoding.UTF8.GetByteCount(format_max); - byte* native_format_max_stackBytes = stackalloc byte[format_max_byteCount + 1]; - native_format_max = native_format_max_stackBytes; - fixed (char* format_max_ptr = format_max) - { - int native_format_max_offset = Encoding.UTF8.GetBytes(format_max_ptr, format_max.Length, native_format_max, format_max_byteCount); - native_format_max[native_format_max_offset] = 0; - } - } - else { native_format_max = null; } - float power = 1.0f; - fixed (float* native_v_current_min = &v_current_min) - { - fixed (float* native_v_current_max = &v_current_max) - { - byte ret = ImGuiNative.igDragFloatRange2(native_label, native_v_current_min, native_v_current_max, v_speed, v_min, v_max, native_format, native_format_max, power); - return ret != 0; - } - } + byte native_selected = selected ? (byte)1 : (byte)0; + ImGuiSelectableFlags flags = 0; + Vector2 size = new Vector2(); + byte ret = ImGuiNative.igSelectable(native_label, native_selected, flags, size); + return ret != 0; } - public static bool DragFloatRange2(string label, ref float v_current_min, ref float v_current_max, float v_speed, float v_min, float v_max, string format, string format_max, float power) + public static bool Selectable(string label, bool selected, ImGuiSelectableFlags flags) { byte* native_label; if (label != null) @@ -7231,51 +6846,12 @@ namespace ImGuiNET } } else { native_label = null; } - byte* native_format; - if (format != null) - { - int format_byteCount = Encoding.UTF8.GetByteCount(format); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = format) - { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; - } - } - else { native_format = null; } - byte* native_format_max; - if (format_max != null) - { - int format_max_byteCount = Encoding.UTF8.GetByteCount(format_max); - byte* native_format_max_stackBytes = stackalloc byte[format_max_byteCount + 1]; - native_format_max = native_format_max_stackBytes; - fixed (char* format_max_ptr = format_max) - { - int native_format_max_offset = Encoding.UTF8.GetBytes(format_max_ptr, format_max.Length, native_format_max, format_max_byteCount); - native_format_max[native_format_max_offset] = 0; - } - } - else { native_format_max = null; } - fixed (float* native_v_current_min = &v_current_min) - { - fixed (float* native_v_current_max = &v_current_max) - { - byte ret = ImGuiNative.igDragFloatRange2(native_label, native_v_current_min, native_v_current_max, v_speed, v_min, v_max, native_format, native_format_max, power); - return ret != 0; - } - } - } - public static void SetMouseCursor(ImGuiMouseCursor type) - { - ImGuiNative.igSetMouseCursor(type); - } - public static Vector2 GetWindowContentRegionMax() - { - Vector2 ret = ImGuiNative.igGetWindowContentRegionMax(); - return ret; + byte native_selected = selected ? (byte)1 : (byte)0; + Vector2 size = new Vector2(); + byte ret = ImGuiNative.igSelectable(native_label, native_selected, flags, size); + return ret != 0; } - public static bool InputScalar(string label, ImGuiDataType data_type, IntPtr v) + public static bool Selectable(string label, bool selected, ImGuiSelectableFlags flags, Vector2 size) { byte* native_label; if (label != null) @@ -7288,17 +6864,13 @@ namespace ImGuiNET int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); native_label[native_label_offset] = 0; } - } - else { native_label = null; } - void* native_v = (void*)v.ToPointer(); - void* step = null; - void* step_fast = null; - byte* native_format = null; - ImGuiInputTextFlags extra_flags = 0; - byte ret = ImGuiNative.igInputScalar(native_label, data_type, native_v, step, step_fast, native_format, extra_flags); + } + else { native_label = null; } + byte native_selected = selected ? (byte)1 : (byte)0; + byte ret = ImGuiNative.igSelectable(native_label, native_selected, flags, size); return ret != 0; } - public static bool InputScalar(string label, ImGuiDataType data_type, IntPtr v, IntPtr step) + public static bool Selectable(string label, ref bool p_selected) { byte* native_label; if (label != null) @@ -7313,15 +6885,15 @@ namespace ImGuiNET } } else { native_label = null; } - void* native_v = (void*)v.ToPointer(); - void* native_step = (void*)step.ToPointer(); - void* step_fast = null; - byte* native_format = null; - ImGuiInputTextFlags extra_flags = 0; - byte ret = ImGuiNative.igInputScalar(native_label, data_type, native_v, native_step, step_fast, native_format, extra_flags); + byte native_p_selected_val = p_selected ? (byte)1 : (byte)0; + byte* native_p_selected = &native_p_selected_val; + ImGuiSelectableFlags flags = 0; + Vector2 size = new Vector2(); + byte ret = ImGuiNative.igSelectableBoolPtr(native_label, native_p_selected, flags, size); + p_selected = native_p_selected_val != 0; return ret != 0; } - public static bool InputScalar(string label, ImGuiDataType data_type, IntPtr v, IntPtr step, IntPtr step_fast) + public static bool Selectable(string label, ref bool p_selected, ImGuiSelectableFlags flags) { byte* native_label; if (label != null) @@ -7336,15 +6908,14 @@ namespace ImGuiNET } } else { native_label = null; } - void* native_v = (void*)v.ToPointer(); - void* native_step = (void*)step.ToPointer(); - void* native_step_fast = (void*)step_fast.ToPointer(); - byte* native_format = null; - ImGuiInputTextFlags extra_flags = 0; - byte ret = ImGuiNative.igInputScalar(native_label, data_type, native_v, native_step, native_step_fast, native_format, extra_flags); + byte native_p_selected_val = p_selected ? (byte)1 : (byte)0; + byte* native_p_selected = &native_p_selected_val; + Vector2 size = new Vector2(); + byte ret = ImGuiNative.igSelectableBoolPtr(native_label, native_p_selected, flags, size); + p_selected = native_p_selected_val != 0; return ret != 0; } - public static bool InputScalar(string label, ImGuiDataType data_type, IntPtr v, IntPtr step, IntPtr step_fast, string format) + public static bool Selectable(string label, ref bool p_selected, ImGuiSelectableFlags flags, Vector2 size) { byte* native_label; if (label != null) @@ -7359,180 +6930,319 @@ namespace ImGuiNET } } else { native_label = null; } - void* native_v = (void*)v.ToPointer(); - void* native_step = (void*)step.ToPointer(); - void* native_step_fast = (void*)step_fast.ToPointer(); - byte* native_format; - if (format != null) + byte native_p_selected_val = p_selected ? (byte)1 : (byte)0; + byte* native_p_selected = &native_p_selected_val; + byte ret = ImGuiNative.igSelectableBoolPtr(native_label, native_p_selected, flags, size); + p_selected = native_p_selected_val != 0; + return ret != 0; + } + public static void Separator() + { + ImGuiNative.igSeparator(); + } + public static void SetClipboardText(string text) + { + byte* native_text; + if (text != null) { - int format_byteCount = Encoding.UTF8.GetByteCount(format); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = format) + int text_byteCount = Encoding.UTF8.GetByteCount(text); + byte* native_text_stackBytes = stackalloc byte[text_byteCount + 1]; + native_text = native_text_stackBytes; + fixed (char* text_ptr = text) { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; + int native_text_offset = Encoding.UTF8.GetBytes(text_ptr, text.Length, native_text, text_byteCount); + native_text[native_text_offset] = 0; } } - else { native_format = null; } - ImGuiInputTextFlags extra_flags = 0; - byte ret = ImGuiNative.igInputScalar(native_label, data_type, native_v, native_step, native_step_fast, native_format, extra_flags); - return ret != 0; + else { native_text = null; } + ImGuiNative.igSetClipboardText(native_text); } - public static bool InputScalar(string label, ImGuiDataType data_type, IntPtr v, IntPtr step, IntPtr step_fast, string format, ImGuiInputTextFlags extra_flags) + public static void SetColorEditOptions(ImGuiColorEditFlags flags) { - byte* native_label; - if (label != null) + ImGuiNative.igSetColorEditOptions(flags); + } + public static void SetColumnOffset(int column_index, float offset_x) + { + ImGuiNative.igSetColumnOffset(column_index, offset_x); + } + public static void SetColumnWidth(int column_index, float width) + { + ImGuiNative.igSetColumnWidth(column_index, width); + } + public static void SetCurrentContext(IntPtr ctx) + { + ImGuiNative.igSetCurrentContext(ctx); + } + public static void SetCursorPos(Vector2 local_pos) + { + ImGuiNative.igSetCursorPos(local_pos); + } + public static void SetCursorPosX(float x) + { + ImGuiNative.igSetCursorPosX(x); + } + public static void SetCursorPosY(float y) + { + ImGuiNative.igSetCursorPosY(y); + } + public static void SetCursorScreenPos(Vector2 screen_pos) + { + ImGuiNative.igSetCursorScreenPos(screen_pos); + } + public static bool SetDragDropPayload(string type, IntPtr data, uint size) + { + byte* native_type; + if (type != null) { - int label_byteCount = Encoding.UTF8.GetByteCount(label); - byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; - native_label = native_label_stackBytes; - fixed (char* label_ptr = label) + int type_byteCount = Encoding.UTF8.GetByteCount(type); + byte* native_type_stackBytes = stackalloc byte[type_byteCount + 1]; + native_type = native_type_stackBytes; + fixed (char* type_ptr = type) { - int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); - native_label[native_label_offset] = 0; + int native_type_offset = Encoding.UTF8.GetBytes(type_ptr, type.Length, native_type, type_byteCount); + native_type[native_type_offset] = 0; } } - else { native_label = null; } - void* native_v = (void*)v.ToPointer(); - void* native_step = (void*)step.ToPointer(); - void* native_step_fast = (void*)step_fast.ToPointer(); - byte* native_format; - if (format != null) + else { native_type = null; } + void* native_data = (void*)data.ToPointer(); + ImGuiCond cond = 0; + byte ret = ImGuiNative.igSetDragDropPayload(native_type, native_data, size, cond); + return ret != 0; + } + public static bool SetDragDropPayload(string type, IntPtr data, uint size, ImGuiCond cond) + { + byte* native_type; + if (type != null) { - int format_byteCount = Encoding.UTF8.GetByteCount(format); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = format) + int type_byteCount = Encoding.UTF8.GetByteCount(type); + byte* native_type_stackBytes = stackalloc byte[type_byteCount + 1]; + native_type = native_type_stackBytes; + fixed (char* type_ptr = type) { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; + int native_type_offset = Encoding.UTF8.GetBytes(type_ptr, type.Length, native_type, type_byteCount); + native_type[native_type_offset] = 0; } } - else { native_format = null; } - byte ret = ImGuiNative.igInputScalar(native_label, data_type, native_v, native_step, native_step_fast, native_format, extra_flags); + else { native_type = null; } + void* native_data = (void*)data.ToPointer(); + byte ret = ImGuiNative.igSetDragDropPayload(native_type, native_data, size, cond); return ret != 0; } - public static uint GetColorU32(ImGuiCol idx) + public static void SetItemAllowOverlap() { - float alpha_mul = 1.0f; - uint ret = ImGuiNative.igGetColorU32(idx, alpha_mul); - return ret; + ImGuiNative.igSetItemAllowOverlap(); } - public static uint GetColorU32(ImGuiCol idx, float alpha_mul) + public static void SetItemDefaultFocus() { - uint ret = ImGuiNative.igGetColorU32(idx, alpha_mul); - return ret; + ImGuiNative.igSetItemDefaultFocus(); + } + public static void SetKeyboardFocusHere() + { + int offset = 0; + ImGuiNative.igSetKeyboardFocusHere(offset); + } + public static void SetKeyboardFocusHere(int offset) + { + ImGuiNative.igSetKeyboardFocusHere(offset); + } + public static void SetMouseCursor(ImGuiMouseCursor type) + { + ImGuiNative.igSetMouseCursor(type); + } + public static void SetNextTreeNodeOpen(bool is_open) + { + byte native_is_open = is_open ? (byte)1 : (byte)0; + ImGuiCond cond = 0; + ImGuiNative.igSetNextTreeNodeOpen(native_is_open, cond); + } + public static void SetNextTreeNodeOpen(bool is_open, ImGuiCond cond) + { + byte native_is_open = is_open ? (byte)1 : (byte)0; + ImGuiNative.igSetNextTreeNodeOpen(native_is_open, cond); + } + public static void SetNextWindowBgAlpha(float alpha) + { + ImGuiNative.igSetNextWindowBgAlpha(alpha); + } + public static void SetNextWindowCollapsed(bool collapsed) + { + byte native_collapsed = collapsed ? (byte)1 : (byte)0; + ImGuiCond cond = 0; + ImGuiNative.igSetNextWindowCollapsed(native_collapsed, cond); + } + public static void SetNextWindowCollapsed(bool collapsed, ImGuiCond cond) + { + byte native_collapsed = collapsed ? (byte)1 : (byte)0; + ImGuiNative.igSetNextWindowCollapsed(native_collapsed, cond); + } + public static void SetNextWindowContentSize(Vector2 size) + { + ImGuiNative.igSetNextWindowContentSize(size); + } + public static void SetNextWindowFocus() + { + ImGuiNative.igSetNextWindowFocus(); + } + public static void SetNextWindowPos(Vector2 pos) + { + ImGuiCond cond = 0; + Vector2 pivot = new Vector2(); + ImGuiNative.igSetNextWindowPos(pos, cond, pivot); + } + public static void SetNextWindowPos(Vector2 pos, ImGuiCond cond) + { + Vector2 pivot = new Vector2(); + ImGuiNative.igSetNextWindowPos(pos, cond, pivot); + } + public static void SetNextWindowPos(Vector2 pos, ImGuiCond cond, Vector2 pivot) + { + ImGuiNative.igSetNextWindowPos(pos, cond, pivot); + } + public static void SetNextWindowSize(Vector2 size) + { + ImGuiCond cond = 0; + ImGuiNative.igSetNextWindowSize(size, cond); + } + public static void SetNextWindowSize(Vector2 size, ImGuiCond cond) + { + ImGuiNative.igSetNextWindowSize(size, cond); + } + public static void SetNextWindowSizeConstraints(Vector2 size_min, Vector2 size_max) + { + ImGuiSizeCallback custom_callback = null; + void* custom_callback_data = null; + ImGuiNative.igSetNextWindowSizeConstraints(size_min, size_max, custom_callback, custom_callback_data); + } + public static void SetNextWindowSizeConstraints(Vector2 size_min, Vector2 size_max, ImGuiSizeCallback custom_callback) + { + void* custom_callback_data = null; + ImGuiNative.igSetNextWindowSizeConstraints(size_min, size_max, custom_callback, custom_callback_data); + } + public static void SetNextWindowSizeConstraints(Vector2 size_min, Vector2 size_max, ImGuiSizeCallback custom_callback, IntPtr custom_callback_data) + { + void* native_custom_callback_data = (void*)custom_callback_data.ToPointer(); + ImGuiNative.igSetNextWindowSizeConstraints(size_min, size_max, custom_callback, native_custom_callback_data); + } + public static void SetScrollFromPosY(float pos_y) + { + float center_y_ratio = 0.5f; + ImGuiNative.igSetScrollFromPosY(pos_y, center_y_ratio); } - public static uint GetColorU32(Vector4 col) + public static void SetScrollFromPosY(float pos_y, float center_y_ratio) { - uint ret = ImGuiNative.igGetColorU32Vec4(col); - return ret; + ImGuiNative.igSetScrollFromPosY(pos_y, center_y_ratio); } - public static uint GetColorU32(uint col) + public static void SetScrollHere() { - uint ret = ImGuiNative.igGetColorU32U32(col); - return ret; + float center_y_ratio = 0.5f; + ImGuiNative.igSetScrollHere(center_y_ratio); } - public static double GetTime() + public static void SetScrollHere(float center_y_ratio) { - double ret = ImGuiNative.igGetTime(); - return ret; + ImGuiNative.igSetScrollHere(center_y_ratio); } - public static int GetColumnIndex() + public static void SetScrollX(float scroll_x) { - int ret = ImGuiNative.igGetColumnIndex(); - return ret; + ImGuiNative.igSetScrollX(scroll_x); } - public static bool BeginPopupContextItem() + public static void SetScrollY(float scroll_y) { - byte* native_str_id = null; - int mouse_button = 1; - byte ret = ImGuiNative.igBeginPopupContextItem(native_str_id, mouse_button); - return ret != 0; + ImGuiNative.igSetScrollY(scroll_y); } - public static bool BeginPopupContextItem(string str_id) + public static void SetStateStorage(ImGuiStoragePtr storage) { - byte* native_str_id; - if (str_id != null) - { - int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); - byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; - native_str_id = native_str_id_stackBytes; - fixed (char* str_id_ptr = str_id) - { - int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); - native_str_id[native_str_id_offset] = 0; - } - } - else { native_str_id = null; } - int mouse_button = 1; - byte ret = ImGuiNative.igBeginPopupContextItem(native_str_id, mouse_button); - return ret != 0; + ImGuiStorage* native_storage = storage.NativePtr; + ImGuiNative.igSetStateStorage(native_storage); } - public static bool BeginPopupContextItem(string str_id, int mouse_button) + public static void SetTooltip(string fmt) { - byte* native_str_id; - if (str_id != null) + byte* native_fmt; + if (fmt != null) { - int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); - byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; - native_str_id = native_str_id_stackBytes; - fixed (char* str_id_ptr = str_id) + int fmt_byteCount = Encoding.UTF8.GetByteCount(fmt); + byte* native_fmt_stackBytes = stackalloc byte[fmt_byteCount + 1]; + native_fmt = native_fmt_stackBytes; + fixed (char* fmt_ptr = fmt) { - int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); - native_str_id[native_str_id_offset] = 0; + int native_fmt_offset = Encoding.UTF8.GetBytes(fmt_ptr, fmt.Length, native_fmt, fmt_byteCount); + native_fmt[native_fmt_offset] = 0; } } - else { native_str_id = null; } - byte ret = ImGuiNative.igBeginPopupContextItem(native_str_id, mouse_button); - return ret != 0; + else { native_fmt = null; } + ImGuiNative.igSetTooltip(native_fmt); } - public static void SetCursorPosX(float x) + public static void SetWindowCollapsed(bool collapsed) { - ImGuiNative.igSetCursorPosX(x); + byte native_collapsed = collapsed ? (byte)1 : (byte)0; + ImGuiCond cond = 0; + ImGuiNative.igSetWindowCollapsedBool(native_collapsed, cond); } - public static Vector2 GetItemRectSize() + public static void SetWindowCollapsed(bool collapsed, ImGuiCond cond) { - Vector2 ret = ImGuiNative.igGetItemRectSize(); - return ret; + byte native_collapsed = collapsed ? (byte)1 : (byte)0; + ImGuiNative.igSetWindowCollapsedBool(native_collapsed, cond); } - public static bool ArrowButton(string str_id, ImGuiDir dir) + public static void SetWindowCollapsed(string name, bool collapsed) { - byte* native_str_id; - if (str_id != null) + byte* native_name; + if (name != null) { - int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); - byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; - native_str_id = native_str_id_stackBytes; - fixed (char* str_id_ptr = str_id) + int name_byteCount = Encoding.UTF8.GetByteCount(name); + byte* native_name_stackBytes = stackalloc byte[name_byteCount + 1]; + native_name = native_name_stackBytes; + fixed (char* name_ptr = name) { - int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); - native_str_id[native_str_id_offset] = 0; + int native_name_offset = Encoding.UTF8.GetBytes(name_ptr, name.Length, native_name, name_byteCount); + native_name[native_name_offset] = 0; } } - else { native_str_id = null; } - byte ret = ImGuiNative.igArrowButton(native_str_id, dir); - return ret != 0; + else { native_name = null; } + byte native_collapsed = collapsed ? (byte)1 : (byte)0; + ImGuiCond cond = 0; + ImGuiNative.igSetWindowCollapsedStr(native_name, native_collapsed, cond); } - public static ImGuiMouseCursor GetMouseCursor() + public static void SetWindowCollapsed(string name, bool collapsed, ImGuiCond cond) { - ImGuiMouseCursor ret = ImGuiNative.igGetMouseCursor(); - return ret; + byte* native_name; + if (name != null) + { + int name_byteCount = Encoding.UTF8.GetByteCount(name); + byte* native_name_stackBytes = stackalloc byte[name_byteCount + 1]; + native_name = native_name_stackBytes; + fixed (char* name_ptr = name) + { + int native_name_offset = Encoding.UTF8.GetBytes(name_ptr, name.Length, native_name, name_byteCount); + native_name[native_name_offset] = 0; + } + } + else { native_name = null; } + byte native_collapsed = collapsed ? (byte)1 : (byte)0; + ImGuiNative.igSetWindowCollapsedStr(native_name, native_collapsed, cond); } - public static void PushAllowKeyboardFocus(bool allow_keyboard_focus) + public static void SetWindowFocus() { - byte native_allow_keyboard_focus = allow_keyboard_focus ? (byte)1 : (byte)0; - ImGuiNative.igPushAllowKeyboardFocus(native_allow_keyboard_focus); + ImGuiNative.igSetWindowFocus(); } - public static float GetScrollY() + public static void SetWindowFocus(string name) { - float ret = ImGuiNative.igGetScrollY(); - return ret; + byte* native_name; + if (name != null) + { + int name_byteCount = Encoding.UTF8.GetByteCount(name); + byte* native_name_stackBytes = stackalloc byte[name_byteCount + 1]; + native_name = native_name_stackBytes; + fixed (char* name_ptr = name) + { + int native_name_offset = Encoding.UTF8.GetBytes(name_ptr, name.Length, native_name, name_byteCount); + native_name[native_name_offset] = 0; + } + } + else { native_name = null; } + ImGuiNative.igSetWindowFocusStr(native_name); } - public static void SetColumnOffset(int column_index, float offset_x) + public static void SetWindowFontScale(float scale) { - ImGuiNative.igSetColumnOffset(column_index, offset_x); + ImGuiNative.igSetWindowFontScale(scale); } public static void SetWindowPos(Vector2 pos) { @@ -7578,52 +7288,122 @@ namespace ImGuiNET else { native_name = null; } ImGuiNative.igSetWindowPosStr(native_name, pos, cond); } - public static void SetKeyboardFocusHere() + public static void SetWindowSize(Vector2 size) { - int offset = 0; - ImGuiNative.igSetKeyboardFocusHere(offset); + ImGuiCond cond = 0; + ImGuiNative.igSetWindowSizeVec2(size, cond); } - public static void SetKeyboardFocusHere(int offset) + public static void SetWindowSize(Vector2 size, ImGuiCond cond) { - ImGuiNative.igSetKeyboardFocusHere(offset); + ImGuiNative.igSetWindowSizeVec2(size, cond); } - public static float GetCursorPosY() + public static void SetWindowSize(string name, Vector2 size) { - float ret = ImGuiNative.igGetCursorPosY(); - return ret; + byte* native_name; + if (name != null) + { + int name_byteCount = Encoding.UTF8.GetByteCount(name); + byte* native_name_stackBytes = stackalloc byte[name_byteCount + 1]; + native_name = native_name_stackBytes; + fixed (char* name_ptr = name) + { + int native_name_offset = Encoding.UTF8.GetBytes(name_ptr, name.Length, native_name, name_byteCount); + native_name[native_name_offset] = 0; + } + } + else { native_name = null; } + ImGuiCond cond = 0; + ImGuiNative.igSetWindowSizeStr(native_name, size, cond); } - public static void EndMainMenuBar() + public static void SetWindowSize(string name, Vector2 size, ImGuiCond cond) { - ImGuiNative.igEndMainMenuBar(); + byte* native_name; + if (name != null) + { + int name_byteCount = Encoding.UTF8.GetByteCount(name); + byte* native_name_stackBytes = stackalloc byte[name_byteCount + 1]; + native_name = native_name_stackBytes; + fixed (char* name_ptr = name) + { + int native_name_offset = Encoding.UTF8.GetBytes(name_ptr, name.Length, native_name, name_byteCount); + native_name[native_name_offset] = 0; + } + } + else { native_name = null; } + ImGuiNative.igSetWindowSizeStr(native_name, size, cond); } - public static float GetContentRegionAvailWidth() + public static void ShowDemoWindow() { - float ret = ImGuiNative.igGetContentRegionAvailWidth(); - return ret; + byte* p_open = null; + ImGuiNative.igShowDemoWindow(p_open); } - public static bool IsKeyDown(int user_key_index) + public static void ShowDemoWindow(ref bool p_open) { - byte ret = ImGuiNative.igIsKeyDown(user_key_index); - return ret != 0; + byte native_p_open_val = p_open ? (byte)1 : (byte)0; + byte* native_p_open = &native_p_open_val; + ImGuiNative.igShowDemoWindow(native_p_open); + p_open = native_p_open_val != 0; } - public static bool IsMouseDown(int button) + public static void ShowFontSelector(string label) { - byte ret = ImGuiNative.igIsMouseDown(button); - return ret != 0; + byte* native_label; + if (label != null) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + } + else { native_label = null; } + ImGuiNative.igShowFontSelector(native_label); } - public static Vector2 GetWindowContentRegionMin() + public static void ShowMetricsWindow() { - Vector2 ret = ImGuiNative.igGetWindowContentRegionMin(); - return ret; + byte* p_open = null; + ImGuiNative.igShowMetricsWindow(p_open); } - public static void LogButtons() + public static void ShowMetricsWindow(ref bool p_open) + { + byte native_p_open_val = p_open ? (byte)1 : (byte)0; + byte* native_p_open = &native_p_open_val; + ImGuiNative.igShowMetricsWindow(native_p_open); + p_open = native_p_open_val != 0; + } + public static void ShowStyleEditor() + { + ImGuiStyle* @ref = null; + ImGuiNative.igShowStyleEditor(@ref); + } + public static void ShowStyleEditor(ImGuiStylePtr @ref) + { + ImGuiStyle* native_ref = @ref.NativePtr; + ImGuiNative.igShowStyleEditor(native_ref); + } + public static bool ShowStyleSelector(string label) { - ImGuiNative.igLogButtons(); + byte* native_label; + if (label != null) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + } + else { native_label = null; } + byte ret = ImGuiNative.igShowStyleSelector(native_label); + return ret != 0; } - public static float GetWindowContentRegionWidth() + public static void ShowUserGuide() { - float ret = ImGuiNative.igGetWindowContentRegionWidth(); - return ret; + ImGuiNative.igShowUserGuide(); } public static bool SliderAngle(string label, ref float v_rad) { @@ -7691,7 +7471,7 @@ namespace ImGuiNET return ret != 0; } } - public static bool TreeNodeEx(string label) + public static bool SliderFloat(string label, ref float v, float v_min, float v_max) { byte* native_label; if (label != null) @@ -7706,11 +7486,23 @@ namespace ImGuiNET } } else { native_label = null; } - ImGuiTreeNodeFlags flags = 0; - byte ret = ImGuiNative.igTreeNodeExStr(native_label, flags); - return ret != 0; + byte* native_format; + int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = "%.3f") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + float power = 1.0f; + fixed (float* native_v = &v) + { + byte ret = ImGuiNative.igSliderFloat(native_label, native_v, v_min, v_max, native_format, power); + return ret != 0; + } } - public static bool TreeNodeEx(string label, ImGuiTreeNodeFlags flags) + public static bool SliderFloat(string label, ref float v, float v_min, float v_max, string format) { byte* native_label; if (label != null) @@ -7725,74 +7517,192 @@ namespace ImGuiNET } } else { native_label = null; } - byte ret = ImGuiNative.igTreeNodeExStr(native_label, flags); - return ret != 0; + byte* native_format; + if (format != null) + { + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + } + else { native_format = null; } + float power = 1.0f; + fixed (float* native_v = &v) + { + byte ret = ImGuiNative.igSliderFloat(native_label, native_v, v_min, v_max, native_format, power); + return ret != 0; + } } - public static bool TreeNodeEx(string str_id, ImGuiTreeNodeFlags flags, string fmt) + public static bool SliderFloat(string label, ref float v, float v_min, float v_max, string format, float power) { - byte* native_str_id; - if (str_id != null) + byte* native_label; + if (label != null) { - int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); - byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; - native_str_id = native_str_id_stackBytes; - fixed (char* str_id_ptr = str_id) + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + fixed (char* label_ptr = label) { - int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); - native_str_id[native_str_id_offset] = 0; + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; } } - else { native_str_id = null; } - byte* native_fmt; - if (fmt != null) + else { native_label = null; } + byte* native_format; + if (format != null) { - int fmt_byteCount = Encoding.UTF8.GetByteCount(fmt); - byte* native_fmt_stackBytes = stackalloc byte[fmt_byteCount + 1]; - native_fmt = native_fmt_stackBytes; - fixed (char* fmt_ptr = fmt) + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = format) { - int native_fmt_offset = Encoding.UTF8.GetBytes(fmt_ptr, fmt.Length, native_fmt, fmt_byteCount); - native_fmt[native_fmt_offset] = 0; + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; } } - else { native_fmt = null; } - byte ret = ImGuiNative.igTreeNodeExStrStr(native_str_id, flags, native_fmt); - return ret != 0; + else { native_format = null; } + fixed (float* native_v = &v) + { + byte ret = ImGuiNative.igSliderFloat(native_label, native_v, v_min, v_max, native_format, power); + return ret != 0; + } } - public static bool TreeNodeEx(IntPtr ptr_id, ImGuiTreeNodeFlags flags, string fmt) + public static bool SliderFloat2(string label, ref Vector2 v, float v_min, float v_max) { - void* native_ptr_id = (void*)ptr_id.ToPointer(); - byte* native_fmt; - if (fmt != null) + byte* native_label; + if (label != null) { - int fmt_byteCount = Encoding.UTF8.GetByteCount(fmt); - byte* native_fmt_stackBytes = stackalloc byte[fmt_byteCount + 1]; - native_fmt = native_fmt_stackBytes; - fixed (char* fmt_ptr = fmt) + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + fixed (char* label_ptr = label) { - int native_fmt_offset = Encoding.UTF8.GetBytes(fmt_ptr, fmt.Length, native_fmt, fmt_byteCount); - native_fmt[native_fmt_offset] = 0; + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; } } - else { native_fmt = null; } - byte ret = ImGuiNative.igTreeNodeExPtr(native_ptr_id, flags, native_fmt); - return ret != 0; + else { native_label = null; } + byte* native_format; + int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = "%.3f") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + float power = 1.0f; + fixed (Vector2* native_v = &v) + { + byte ret = ImGuiNative.igSliderFloat2(native_label, native_v, v_min, v_max, native_format, power); + return ret != 0; + } } - public static float GetWindowWidth() + public static bool SliderFloat2(string label, ref Vector2 v, float v_min, float v_max, string format) { - float ret = ImGuiNative.igGetWindowWidth(); - return ret; + byte* native_label; + if (label != null) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + } + else { native_label = null; } + byte* native_format; + if (format != null) + { + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + } + else { native_format = null; } + float power = 1.0f; + fixed (Vector2* native_v = &v) + { + byte ret = ImGuiNative.igSliderFloat2(native_label, native_v, v_min, v_max, native_format, power); + return ret != 0; + } } - public static void PushTextWrapPos() + public static bool SliderFloat2(string label, ref Vector2 v, float v_min, float v_max, string format, float power) { - float wrap_pos_x = 0.0f; - ImGuiNative.igPushTextWrapPos(wrap_pos_x); + byte* native_label; + if (label != null) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + } + else { native_label = null; } + byte* native_format; + if (format != null) + { + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + } + else { native_format = null; } + fixed (Vector2* native_v = &v) + { + byte ret = ImGuiNative.igSliderFloat2(native_label, native_v, v_min, v_max, native_format, power); + return ret != 0; + } } - public static void PushTextWrapPos(float wrap_pos_x) + public static bool SliderFloat3(string label, ref Vector3 v, float v_min, float v_max) { - ImGuiNative.igPushTextWrapPos(wrap_pos_x); + byte* native_label; + if (label != null) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + } + else { native_label = null; } + byte* native_format; + int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = "%.3f") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + float power = 1.0f; + fixed (Vector3* native_v = &v) + { + byte ret = ImGuiNative.igSliderFloat3(native_label, native_v, v_min, v_max, native_format, power); + return ret != 0; + } } - public static bool SliderInt3(string label, ref int v, int v_min, int v_max) + public static bool SliderFloat3(string label, ref Vector3 v, float v_min, float v_max, string format) { byte* native_label; if (label != null) @@ -7808,21 +7718,26 @@ namespace ImGuiNET } else { native_label = null; } byte* native_format; - int format_byteCount = Encoding.UTF8.GetByteCount("%d"); + if (format != null) + { + int format_byteCount = Encoding.UTF8.GetByteCount(format); byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; native_format = native_format_stackBytes; - fixed (char* format_ptr = "%d") + fixed (char* format_ptr = format) { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); native_format[native_format_offset] = 0; } - fixed (int* native_v = &v) + } + else { native_format = null; } + float power = 1.0f; + fixed (Vector3* native_v = &v) { - byte ret = ImGuiNative.igSliderInt3(native_label, native_v, v_min, v_max, native_format); + byte ret = ImGuiNative.igSliderFloat3(native_label, native_v, v_min, v_max, native_format, power); return ret != 0; } } - public static bool SliderInt3(string label, ref int v, int v_min, int v_max, string format) + public static bool SliderFloat3(string label, ref Vector3 v, float v_min, float v_max, string format, float power) { byte* native_label; if (label != null) @@ -7850,17 +7765,13 @@ namespace ImGuiNET } } else { native_format = null; } - fixed (int* native_v = &v) + fixed (Vector3* native_v = &v) { - byte ret = ImGuiNative.igSliderInt3(native_label, native_v, v_min, v_max, native_format); + byte ret = ImGuiNative.igSliderFloat3(native_label, native_v, v_min, v_max, native_format, power); return ret != 0; } } - public static void ShowUserGuide() - { - ImGuiNative.igShowUserGuide(); - } - public static bool SliderScalarN(string label, ImGuiDataType data_type, IntPtr v, int components, IntPtr v_min, IntPtr v_max) + public static bool SliderFloat4(string label, ref Vector4 v, float v_min, float v_max) { byte* native_label; if (label != null) @@ -7875,15 +7786,23 @@ namespace ImGuiNET } } else { native_label = null; } - void* native_v = (void*)v.ToPointer(); - void* native_v_min = (void*)v_min.ToPointer(); - void* native_v_max = (void*)v_max.ToPointer(); - byte* native_format = null; + byte* native_format; + int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = "%.3f") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } float power = 1.0f; - byte ret = ImGuiNative.igSliderScalarN(native_label, data_type, native_v, components, native_v_min, native_v_max, native_format, power); - return ret != 0; + fixed (Vector4* native_v = &v) + { + byte ret = ImGuiNative.igSliderFloat4(native_label, native_v, v_min, v_max, native_format, power); + return ret != 0; + } } - public static bool SliderScalarN(string label, ImGuiDataType data_type, IntPtr v, int components, IntPtr v_min, IntPtr v_max, string format) + public static bool SliderFloat4(string label, ref Vector4 v, float v_min, float v_max, string format) { byte* native_label; if (label != null) @@ -7898,9 +7817,6 @@ namespace ImGuiNET } } else { native_label = null; } - void* native_v = (void*)v.ToPointer(); - void* native_v_min = (void*)v_min.ToPointer(); - void* native_v_max = (void*)v_max.ToPointer(); byte* native_format; if (format != null) { @@ -7915,10 +7831,13 @@ namespace ImGuiNET } else { native_format = null; } float power = 1.0f; - byte ret = ImGuiNative.igSliderScalarN(native_label, data_type, native_v, components, native_v_min, native_v_max, native_format, power); - return ret != 0; + fixed (Vector4* native_v = &v) + { + byte ret = ImGuiNative.igSliderFloat4(native_label, native_v, v_min, v_max, native_format, power); + return ret != 0; + } } - public static bool SliderScalarN(string label, ImGuiDataType data_type, IntPtr v, int components, IntPtr v_min, IntPtr v_max, string format, float power) + public static bool SliderFloat4(string label, ref Vector4 v, float v_min, float v_max, string format, float power) { byte* native_label; if (label != null) @@ -7933,9 +7852,6 @@ namespace ImGuiNET } } else { native_label = null; } - void* native_v = (void*)v.ToPointer(); - void* native_v_min = (void*)v_min.ToPointer(); - void* native_v_max = (void*)v_max.ToPointer(); byte* native_format; if (format != null) { @@ -7949,56 +7865,13 @@ namespace ImGuiNET } } else { native_format = null; } - byte ret = ImGuiNative.igSliderScalarN(native_label, data_type, native_v, components, native_v_min, native_v_max, native_format, power); - return ret != 0; - } - public static void Image(IntPtr user_texture_id, Vector2 size) - { - Vector2 uv0 = new Vector2(); - Vector2 uv1 = new Vector2(1, 1); - Vector4 tint_col = new Vector4(1, 1, 1, 1); - Vector4 border_col = new Vector4(); - ImGuiNative.igImage(user_texture_id, size, uv0, uv1, tint_col, border_col); - } - public static void Image(IntPtr user_texture_id, Vector2 size, Vector2 uv0) - { - Vector2 uv1 = new Vector2(1, 1); - Vector4 tint_col = new Vector4(1, 1, 1, 1); - Vector4 border_col = new Vector4(); - ImGuiNative.igImage(user_texture_id, size, uv0, uv1, tint_col, border_col); - } - public static void Image(IntPtr user_texture_id, Vector2 size, Vector2 uv0, Vector2 uv1) - { - Vector4 tint_col = new Vector4(1, 1, 1, 1); - Vector4 border_col = new Vector4(); - ImGuiNative.igImage(user_texture_id, size, uv0, uv1, tint_col, border_col); - } - public static void Image(IntPtr user_texture_id, Vector2 size, Vector2 uv0, Vector2 uv1, Vector4 tint_col) - { - Vector4 border_col = new Vector4(); - ImGuiNative.igImage(user_texture_id, size, uv0, uv1, tint_col, border_col); - } - public static void Image(IntPtr user_texture_id, Vector2 size, Vector2 uv0, Vector2 uv1, Vector4 tint_col, Vector4 border_col) - { - ImGuiNative.igImage(user_texture_id, size, uv0, uv1, tint_col, border_col); - } - public static void SetNextWindowSizeConstraints(Vector2 size_min, Vector2 size_max) - { - ImGuiSizeCallback custom_callback = null; - void* custom_callback_data = null; - ImGuiNative.igSetNextWindowSizeConstraints(size_min, size_max, custom_callback, custom_callback_data); - } - public static void SetNextWindowSizeConstraints(Vector2 size_min, Vector2 size_max, ImGuiSizeCallback custom_callback) - { - void* custom_callback_data = null; - ImGuiNative.igSetNextWindowSizeConstraints(size_min, size_max, custom_callback, custom_callback_data); - } - public static void SetNextWindowSizeConstraints(Vector2 size_min, Vector2 size_max, ImGuiSizeCallback custom_callback, IntPtr custom_callback_data) - { - void* native_custom_callback_data = (void*)custom_callback_data.ToPointer(); - ImGuiNative.igSetNextWindowSizeConstraints(size_min, size_max, custom_callback, native_custom_callback_data); + fixed (Vector4* native_v = &v) + { + byte ret = ImGuiNative.igSliderFloat4(native_label, native_v, v_min, v_max, native_format, power); + return ret != 0; + } } - public static bool VSliderInt(string label, Vector2 size, ref int v, int v_min, int v_max) + public static bool SliderInt(string label, ref int v, int v_min, int v_max) { byte* native_label; if (label != null) @@ -8024,11 +7897,11 @@ namespace ImGuiNET } fixed (int* native_v = &v) { - byte ret = ImGuiNative.igVSliderInt(native_label, size, native_v, v_min, v_max, native_format); + byte ret = ImGuiNative.igSliderInt(native_label, native_v, v_min, v_max, native_format); return ret != 0; } } - public static bool VSliderInt(string label, Vector2 size, ref int v, int v_min, int v_max, string format) + public static bool SliderInt(string label, ref int v, int v_min, int v_max, string format) { byte* native_label; if (label != null) @@ -8058,28 +7931,11 @@ namespace ImGuiNET else { native_format = null; } fixed (int* native_v = &v) { - byte ret = ImGuiNative.igVSliderInt(native_label, size, native_v, v_min, v_max, native_format); + byte ret = ImGuiNative.igSliderInt(native_label, native_v, v_min, v_max, native_format); return ret != 0; } } - public static void BulletText(string fmt) - { - byte* native_fmt; - if (fmt != null) - { - int fmt_byteCount = Encoding.UTF8.GetByteCount(fmt); - byte* native_fmt_stackBytes = stackalloc byte[fmt_byteCount + 1]; - native_fmt = native_fmt_stackBytes; - fixed (char* fmt_ptr = fmt) - { - int native_fmt_offset = Encoding.UTF8.GetBytes(fmt_ptr, fmt.Length, native_fmt, fmt_byteCount); - native_fmt[native_fmt_offset] = 0; - } - } - else { native_fmt = null; } - ImGuiNative.igBulletText(native_fmt); - } - public static bool ColorEdit4(string label, ref Vector4 col) + public static bool SliderInt2(string label, ref int v, int v_min, int v_max) { byte* native_label; if (label != null) @@ -8094,14 +7950,22 @@ namespace ImGuiNET } } else { native_label = null; } - ImGuiColorEditFlags flags = 0; - fixed (Vector4* native_col = &col) + byte* native_format; + int format_byteCount = Encoding.UTF8.GetByteCount("%d"); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = "%d") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + fixed (int* native_v = &v) { - byte ret = ImGuiNative.igColorEdit4(native_label, native_col, flags); + byte ret = ImGuiNative.igSliderInt2(native_label, native_v, v_min, v_max, native_format); return ret != 0; } } - public static bool ColorEdit4(string label, ref Vector4 col, ImGuiColorEditFlags flags) + public static bool SliderInt2(string label, ref int v, int v_min, int v_max, string format) { byte* native_label; if (label != null) @@ -8116,13 +7980,26 @@ namespace ImGuiNET } } else { native_label = null; } - fixed (Vector4* native_col = &col) + byte* native_format; + if (format != null) { - byte ret = ImGuiNative.igColorEdit4(native_label, native_col, flags); + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + } + else { native_format = null; } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igSliderInt2(native_label, native_v, v_min, v_max, native_format); return ret != 0; } } - public static bool ColorPicker4(string label, ref Vector4 col) + public static bool SliderInt3(string label, ref int v, int v_min, int v_max) { byte* native_label; if (label != null) @@ -8137,15 +8014,22 @@ namespace ImGuiNET } } else { native_label = null; } - ImGuiColorEditFlags flags = 0; - float* ref_col = null; - fixed (Vector4* native_col = &col) + byte* native_format; + int format_byteCount = Encoding.UTF8.GetByteCount("%d"); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = "%d") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + fixed (int* native_v = &v) { - byte ret = ImGuiNative.igColorPicker4(native_label, native_col, flags, ref_col); + byte ret = ImGuiNative.igSliderInt3(native_label, native_v, v_min, v_max, native_format); return ret != 0; } } - public static bool ColorPicker4(string label, ref Vector4 col, ImGuiColorEditFlags flags) + public static bool SliderInt3(string label, ref int v, int v_min, int v_max, string format) { byte* native_label; if (label != null) @@ -8160,14 +8044,26 @@ namespace ImGuiNET } } else { native_label = null; } - float* ref_col = null; - fixed (Vector4* native_col = &col) + byte* native_format; + if (format != null) { - byte ret = ImGuiNative.igColorPicker4(native_label, native_col, flags, ref_col); + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + } + else { native_format = null; } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igSliderInt3(native_label, native_v, v_min, v_max, native_format); return ret != 0; } } - public static bool ColorPicker4(string label, ref Vector4 col, ImGuiColorEditFlags flags, ref float ref_col) + public static bool SliderInt4(string label, ref int v, int v_min, int v_max) { byte* native_label; if (label != null) @@ -8182,109 +8078,79 @@ namespace ImGuiNET } } else { native_label = null; } - fixed (Vector4* native_col = &col) - { - fixed (float* native_ref_col = &ref_col) - { - byte ret = ImGuiNative.igColorPicker4(native_label, native_col, flags, native_ref_col); - return ret != 0; - } - } - } - public static bool InvisibleButton(string str_id, Vector2 size) - { - byte* native_str_id; - if (str_id != null) - { - int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); - byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; - native_str_id = native_str_id_stackBytes; - fixed (char* str_id_ptr = str_id) - { - int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); - native_str_id[native_str_id_offset] = 0; - } - } - else { native_str_id = null; } - byte ret = ImGuiNative.igInvisibleButton(native_str_id, size); - return ret != 0; - } - public static void LogToClipboard() - { - int max_depth = -1; - ImGuiNative.igLogToClipboard(max_depth); - } - public static void LogToClipboard(int max_depth) - { - ImGuiNative.igLogToClipboard(max_depth); - } - public static bool BeginPopupContextWindow() - { - byte* native_str_id = null; - int mouse_button = 1; - byte also_over_items = 1; - byte ret = ImGuiNative.igBeginPopupContextWindow(native_str_id, mouse_button, also_over_items); - return ret != 0; + byte* native_format; + int format_byteCount = Encoding.UTF8.GetByteCount("%d"); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = "%d") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igSliderInt4(native_label, native_v, v_min, v_max, native_format); + return ret != 0; + } } - public static bool BeginPopupContextWindow(string str_id) + public static bool SliderInt4(string label, ref int v, int v_min, int v_max, string format) { - byte* native_str_id; - if (str_id != null) + byte* native_label; + if (label != null) { - int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); - byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; - native_str_id = native_str_id_stackBytes; - fixed (char* str_id_ptr = str_id) + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + fixed (char* label_ptr = label) { - int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); - native_str_id[native_str_id_offset] = 0; + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; } } - else { native_str_id = null; } - int mouse_button = 1; - byte also_over_items = 1; - byte ret = ImGuiNative.igBeginPopupContextWindow(native_str_id, mouse_button, also_over_items); - return ret != 0; - } - public static bool BeginPopupContextWindow(string str_id, int mouse_button) - { - byte* native_str_id; - if (str_id != null) + else { native_label = null; } + byte* native_format; + if (format != null) { - int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); - byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; - native_str_id = native_str_id_stackBytes; - fixed (char* str_id_ptr = str_id) + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = format) { - int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); - native_str_id[native_str_id_offset] = 0; + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; } } - else { native_str_id = null; } - byte also_over_items = 1; - byte ret = ImGuiNative.igBeginPopupContextWindow(native_str_id, mouse_button, also_over_items); - return ret != 0; + else { native_format = null; } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igSliderInt4(native_label, native_v, v_min, v_max, native_format); + return ret != 0; + } } - public static bool BeginPopupContextWindow(string str_id, int mouse_button, bool also_over_items) + public static bool SliderScalar(string label, ImGuiDataType data_type, IntPtr v, IntPtr v_min, IntPtr v_max) { - byte* native_str_id; - if (str_id != null) + byte* native_label; + if (label != null) { - int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); - byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; - native_str_id = native_str_id_stackBytes; - fixed (char* str_id_ptr = str_id) + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + fixed (char* label_ptr = label) { - int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); - native_str_id[native_str_id_offset] = 0; + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; } } - else { native_str_id = null; } - byte native_also_over_items = also_over_items ? (byte)1 : (byte)0; - byte ret = ImGuiNative.igBeginPopupContextWindow(native_str_id, mouse_button, native_also_over_items); + else { native_label = null; } + void* native_v = (void*)v.ToPointer(); + void* native_v_min = (void*)v_min.ToPointer(); + void* native_v_max = (void*)v_max.ToPointer(); + byte* native_format = null; + float power = 1.0f; + byte ret = ImGuiNative.igSliderScalar(native_label, data_type, native_v, native_v_min, native_v_max, native_format, power); return ret != 0; } - public static bool DragScalar(string label, ImGuiDataType data_type, IntPtr v, float v_speed) + public static bool SliderScalar(string label, ImGuiDataType data_type, IntPtr v, IntPtr v_min, IntPtr v_max, string format) { byte* native_label; if (label != null) @@ -8300,14 +8166,26 @@ namespace ImGuiNET } else { native_label = null; } void* native_v = (void*)v.ToPointer(); - void* v_min = null; - void* v_max = null; - byte* native_format = null; + void* native_v_min = (void*)v_min.ToPointer(); + void* native_v_max = (void*)v_max.ToPointer(); + byte* native_format; + if (format != null) + { + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + } + else { native_format = null; } float power = 1.0f; - byte ret = ImGuiNative.igDragScalar(native_label, data_type, native_v, v_speed, v_min, v_max, native_format, power); + byte ret = ImGuiNative.igSliderScalar(native_label, data_type, native_v, native_v_min, native_v_max, native_format, power); return ret != 0; } - public static bool DragScalar(string label, ImGuiDataType data_type, IntPtr v, float v_speed, IntPtr v_min) + public static bool SliderScalar(string label, ImGuiDataType data_type, IntPtr v, IntPtr v_min, IntPtr v_max, string format, float power) { byte* native_label; if (label != null) @@ -8324,13 +8202,24 @@ namespace ImGuiNET else { native_label = null; } void* native_v = (void*)v.ToPointer(); void* native_v_min = (void*)v_min.ToPointer(); - void* v_max = null; - byte* native_format = null; - float power = 1.0f; - byte ret = ImGuiNative.igDragScalar(native_label, data_type, native_v, v_speed, native_v_min, v_max, native_format, power); + void* native_v_max = (void*)v_max.ToPointer(); + byte* native_format; + if (format != null) + { + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + } + else { native_format = null; } + byte ret = ImGuiNative.igSliderScalar(native_label, data_type, native_v, native_v_min, native_v_max, native_format, power); return ret != 0; } - public static bool DragScalar(string label, ImGuiDataType data_type, IntPtr v, float v_speed, IntPtr v_min, IntPtr v_max) + public static bool SliderScalarN(string label, ImGuiDataType data_type, IntPtr v, int components, IntPtr v_min, IntPtr v_max) { byte* native_label; if (label != null) @@ -8350,10 +8239,10 @@ namespace ImGuiNET void* native_v_max = (void*)v_max.ToPointer(); byte* native_format = null; float power = 1.0f; - byte ret = ImGuiNative.igDragScalar(native_label, data_type, native_v, v_speed, native_v_min, native_v_max, native_format, power); + byte ret = ImGuiNative.igSliderScalarN(native_label, data_type, native_v, components, native_v_min, native_v_max, native_format, power); return ret != 0; } - public static bool DragScalar(string label, ImGuiDataType data_type, IntPtr v, float v_speed, IntPtr v_min, IntPtr v_max, string format) + public static bool SliderScalarN(string label, ImGuiDataType data_type, IntPtr v, int components, IntPtr v_min, IntPtr v_max, string format) { byte* native_label; if (label != null) @@ -8385,10 +8274,10 @@ namespace ImGuiNET } else { native_format = null; } float power = 1.0f; - byte ret = ImGuiNative.igDragScalar(native_label, data_type, native_v, v_speed, native_v_min, native_v_max, native_format, power); + byte ret = ImGuiNative.igSliderScalarN(native_label, data_type, native_v, components, native_v_min, native_v_max, native_format, power); return ret != 0; } - public static bool DragScalar(string label, ImGuiDataType data_type, IntPtr v, float v_speed, IntPtr v_min, IntPtr v_max, string format, float power) + public static bool SliderScalarN(string label, ImGuiDataType data_type, IntPtr v, int components, IntPtr v_min, IntPtr v_max, string format, float power) { byte* native_label; if (label != null) @@ -8419,60 +8308,152 @@ namespace ImGuiNET } } else { native_format = null; } - byte ret = ImGuiNative.igDragScalar(native_label, data_type, native_v, v_speed, native_v_min, native_v_max, native_format, power); + byte ret = ImGuiNative.igSliderScalarN(native_label, data_type, native_v, components, native_v_min, native_v_max, native_format, power); return ret != 0; } - public static void SetItemDefaultFocus() + public static bool SmallButton(string label) { - ImGuiNative.igSetItemDefaultFocus(); + byte* native_label; + if (label != null) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + } + else { native_label = null; } + byte ret = ImGuiNative.igSmallButton(native_label); + return ret != 0; } - public static void CaptureMouseFromApp() + public static void Spacing() { - byte capture = 1; - ImGuiNative.igCaptureMouseFromApp(capture); + ImGuiNative.igSpacing(); } - public static void CaptureMouseFromApp(bool capture) + public static void StyleColorsClassic() { - byte native_capture = capture ? (byte)1 : (byte)0; - ImGuiNative.igCaptureMouseFromApp(native_capture); + ImGuiStyle* dst = null; + ImGuiNative.igStyleColorsClassic(dst); } - public static bool IsAnyItemHovered() + public static void StyleColorsClassic(ImGuiStylePtr dst) { - byte ret = ImGuiNative.igIsAnyItemHovered(); - return ret != 0; + ImGuiStyle* native_dst = dst.NativePtr; + ImGuiNative.igStyleColorsClassic(native_dst); } - public static void PushFont(ImFontPtr font) + public static void StyleColorsDark() { - ImFont* native_font = font.NativePtr; - ImGuiNative.igPushFont(native_font); + ImGuiStyle* dst = null; + ImGuiNative.igStyleColorsDark(dst); } - public static void TreePop() + public static void StyleColorsDark(ImGuiStylePtr dst) { - ImGuiNative.igTreePop(); + ImGuiStyle* native_dst = dst.NativePtr; + ImGuiNative.igStyleColorsDark(native_dst); } - public static void End() + public static void StyleColorsLight() { - ImGuiNative.igEnd(); + ImGuiStyle* dst = null; + ImGuiNative.igStyleColorsLight(dst); } - public static void DestroyContext() + public static void StyleColorsLight(ImGuiStylePtr dst) { - IntPtr ctx = IntPtr.Zero; - ImGuiNative.igDestroyContext(ctx); + ImGuiStyle* native_dst = dst.NativePtr; + ImGuiNative.igStyleColorsLight(native_dst); + } + public static void Text(string fmt) + { + byte* native_fmt; + if (fmt != null) + { + int fmt_byteCount = Encoding.UTF8.GetByteCount(fmt); + byte* native_fmt_stackBytes = stackalloc byte[fmt_byteCount + 1]; + native_fmt = native_fmt_stackBytes; + fixed (char* fmt_ptr = fmt) + { + int native_fmt_offset = Encoding.UTF8.GetBytes(fmt_ptr, fmt.Length, native_fmt, fmt_byteCount); + native_fmt[native_fmt_offset] = 0; + } + } + else { native_fmt = null; } + ImGuiNative.igText(native_fmt); + } + public static void TextColored(Vector4 col, string fmt) + { + byte* native_fmt; + if (fmt != null) + { + int fmt_byteCount = Encoding.UTF8.GetByteCount(fmt); + byte* native_fmt_stackBytes = stackalloc byte[fmt_byteCount + 1]; + native_fmt = native_fmt_stackBytes; + fixed (char* fmt_ptr = fmt) + { + int native_fmt_offset = Encoding.UTF8.GetBytes(fmt_ptr, fmt.Length, native_fmt, fmt_byteCount); + native_fmt[native_fmt_offset] = 0; + } + } + else { native_fmt = null; } + ImGuiNative.igTextColored(col, native_fmt); + } + public static void TextDisabled(string fmt) + { + byte* native_fmt; + if (fmt != null) + { + int fmt_byteCount = Encoding.UTF8.GetByteCount(fmt); + byte* native_fmt_stackBytes = stackalloc byte[fmt_byteCount + 1]; + native_fmt = native_fmt_stackBytes; + fixed (char* fmt_ptr = fmt) + { + int native_fmt_offset = Encoding.UTF8.GetBytes(fmt_ptr, fmt.Length, native_fmt, fmt_byteCount); + native_fmt[native_fmt_offset] = 0; + } + } + else { native_fmt = null; } + ImGuiNative.igTextDisabled(native_fmt); } - public static void DestroyContext(IntPtr ctx) + public static void TextUnformatted(string text) { - ImGuiNative.igDestroyContext(ctx); + byte* native_text; + if (text != null) + { + int text_byteCount = Encoding.UTF8.GetByteCount(text); + byte* native_text_stackBytes = stackalloc byte[text_byteCount + 1]; + native_text = native_text_stackBytes; + fixed (char* text_ptr = text) + { + int native_text_offset = Encoding.UTF8.GetBytes(text_ptr, text.Length, native_text, text_byteCount); + native_text[native_text_offset] = 0; + } + } + else { native_text = null; } + byte* native_text_end = null; + ImGuiNative.igTextUnformatted(native_text, native_text_end); } - public static void PopStyleVar() + public static void TextWrapped(string fmt) { - int count = 1; - ImGuiNative.igPopStyleVar(count); + byte* native_fmt; + if (fmt != null) + { + int fmt_byteCount = Encoding.UTF8.GetByteCount(fmt); + byte* native_fmt_stackBytes = stackalloc byte[fmt_byteCount + 1]; + native_fmt = native_fmt_stackBytes; + fixed (char* fmt_ptr = fmt) + { + int native_fmt_offset = Encoding.UTF8.GetBytes(fmt_ptr, fmt.Length, native_fmt, fmt_byteCount); + native_fmt[native_fmt_offset] = 0; + } + } + else { native_fmt = null; } + ImGuiNative.igTextWrapped(native_fmt); } - public static void PopStyleVar(int count) + public static void TreeAdvanceToLabelPos() { - ImGuiNative.igPopStyleVar(count); + ImGuiNative.igTreeAdvanceToLabelPos(); } - public static bool InputScalarN(string label, ImGuiDataType data_type, IntPtr v, int components) + public static bool TreeNode(string label) { byte* native_label; if (label != null) @@ -8487,38 +8468,60 @@ namespace ImGuiNET } } else { native_label = null; } - void* native_v = (void*)v.ToPointer(); - void* step = null; - void* step_fast = null; - byte* native_format = null; - ImGuiInputTextFlags extra_flags = 0; - byte ret = ImGuiNative.igInputScalarN(native_label, data_type, native_v, components, step, step_fast, native_format, extra_flags); + byte ret = ImGuiNative.igTreeNodeStr(native_label); return ret != 0; } - public static bool InputScalarN(string label, ImGuiDataType data_type, IntPtr v, int components, IntPtr step) + public static bool TreeNode(string str_id, string fmt) { - byte* native_label; - if (label != null) + byte* native_str_id; + if (str_id != null) { - int label_byteCount = Encoding.UTF8.GetByteCount(label); - byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; - native_label = native_label_stackBytes; - fixed (char* label_ptr = label) + int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + fixed (char* str_id_ptr = str_id) { - int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); - native_label[native_label_offset] = 0; + int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; } } - else { native_label = null; } - void* native_v = (void*)v.ToPointer(); - void* native_step = (void*)step.ToPointer(); - void* step_fast = null; - byte* native_format = null; - ImGuiInputTextFlags extra_flags = 0; - byte ret = ImGuiNative.igInputScalarN(native_label, data_type, native_v, components, native_step, step_fast, native_format, extra_flags); + else { native_str_id = null; } + byte* native_fmt; + if (fmt != null) + { + int fmt_byteCount = Encoding.UTF8.GetByteCount(fmt); + byte* native_fmt_stackBytes = stackalloc byte[fmt_byteCount + 1]; + native_fmt = native_fmt_stackBytes; + fixed (char* fmt_ptr = fmt) + { + int native_fmt_offset = Encoding.UTF8.GetBytes(fmt_ptr, fmt.Length, native_fmt, fmt_byteCount); + native_fmt[native_fmt_offset] = 0; + } + } + else { native_fmt = null; } + byte ret = ImGuiNative.igTreeNodeStrStr(native_str_id, native_fmt); return ret != 0; } - public static bool InputScalarN(string label, ImGuiDataType data_type, IntPtr v, int components, IntPtr step, IntPtr step_fast) + public static bool TreeNode(IntPtr ptr_id, string fmt) + { + void* native_ptr_id = (void*)ptr_id.ToPointer(); + byte* native_fmt; + if (fmt != null) + { + int fmt_byteCount = Encoding.UTF8.GetByteCount(fmt); + byte* native_fmt_stackBytes = stackalloc byte[fmt_byteCount + 1]; + native_fmt = native_fmt_stackBytes; + fixed (char* fmt_ptr = fmt) + { + int native_fmt_offset = Encoding.UTF8.GetBytes(fmt_ptr, fmt.Length, native_fmt, fmt_byteCount); + native_fmt[native_fmt_offset] = 0; + } + } + else { native_fmt = null; } + byte ret = ImGuiNative.igTreeNodePtr(native_ptr_id, native_fmt); + return ret != 0; + } + public static bool TreeNodeEx(string label) { byte* native_label; if (label != null) @@ -8533,15 +8536,11 @@ namespace ImGuiNET } } else { native_label = null; } - void* native_v = (void*)v.ToPointer(); - void* native_step = (void*)step.ToPointer(); - void* native_step_fast = (void*)step_fast.ToPointer(); - byte* native_format = null; - ImGuiInputTextFlags extra_flags = 0; - byte ret = ImGuiNative.igInputScalarN(native_label, data_type, native_v, components, native_step, native_step_fast, native_format, extra_flags); + ImGuiTreeNodeFlags flags = 0; + byte ret = ImGuiNative.igTreeNodeExStr(native_label, flags); return ret != 0; } - public static bool InputScalarN(string label, ImGuiDataType data_type, IntPtr v, int components, IntPtr step, IntPtr step_fast, string format) + public static bool TreeNodeEx(string label, ImGuiTreeNodeFlags flags) { byte* native_label; if (label != null) @@ -8556,156 +8555,200 @@ namespace ImGuiNET } } else { native_label = null; } - void* native_v = (void*)v.ToPointer(); - void* native_step = (void*)step.ToPointer(); - void* native_step_fast = (void*)step_fast.ToPointer(); - byte* native_format; - if (format != null) + byte ret = ImGuiNative.igTreeNodeExStr(native_label, flags); + return ret != 0; + } + public static bool TreeNodeEx(string str_id, ImGuiTreeNodeFlags flags, string fmt) + { + byte* native_str_id; + if (str_id != null) { - int format_byteCount = Encoding.UTF8.GetByteCount(format); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = format) + int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + fixed (char* str_id_ptr = str_id) { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; + int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; } } - else { native_format = null; } - ImGuiInputTextFlags extra_flags = 0; - byte ret = ImGuiNative.igInputScalarN(native_label, data_type, native_v, components, native_step, native_step_fast, native_format, extra_flags); + else { native_str_id = null; } + byte* native_fmt; + if (fmt != null) + { + int fmt_byteCount = Encoding.UTF8.GetByteCount(fmt); + byte* native_fmt_stackBytes = stackalloc byte[fmt_byteCount + 1]; + native_fmt = native_fmt_stackBytes; + fixed (char* fmt_ptr = fmt) + { + int native_fmt_offset = Encoding.UTF8.GetBytes(fmt_ptr, fmt.Length, native_fmt, fmt_byteCount); + native_fmt[native_fmt_offset] = 0; + } + } + else { native_fmt = null; } + byte ret = ImGuiNative.igTreeNodeExStrStr(native_str_id, flags, native_fmt); return ret != 0; } - public static bool InputScalarN(string label, ImGuiDataType data_type, IntPtr v, int components, IntPtr step, IntPtr step_fast, string format, ImGuiInputTextFlags extra_flags) + public static bool TreeNodeEx(IntPtr ptr_id, ImGuiTreeNodeFlags flags, string fmt) { - byte* native_label; - if (label != null) + void* native_ptr_id = (void*)ptr_id.ToPointer(); + byte* native_fmt; + if (fmt != null) { - int label_byteCount = Encoding.UTF8.GetByteCount(label); - byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; - native_label = native_label_stackBytes; - fixed (char* label_ptr = label) + int fmt_byteCount = Encoding.UTF8.GetByteCount(fmt); + byte* native_fmt_stackBytes = stackalloc byte[fmt_byteCount + 1]; + native_fmt = native_fmt_stackBytes; + fixed (char* fmt_ptr = fmt) { - int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); - native_label[native_label_offset] = 0; + int native_fmt_offset = Encoding.UTF8.GetBytes(fmt_ptr, fmt.Length, native_fmt, fmt_byteCount); + native_fmt[native_fmt_offset] = 0; } } - else { native_label = null; } - void* native_v = (void*)v.ToPointer(); - void* native_step = (void*)step.ToPointer(); - void* native_step_fast = (void*)step_fast.ToPointer(); - byte* native_format; - if (format != null) + else { native_fmt = null; } + byte ret = ImGuiNative.igTreeNodeExPtr(native_ptr_id, flags, native_fmt); + return ret != 0; + } + public static void TreePop() + { + ImGuiNative.igTreePop(); + } + public static void TreePush(string str_id) + { + byte* native_str_id; + if (str_id != null) { - int format_byteCount = Encoding.UTF8.GetByteCount(format); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = format) + int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + fixed (char* str_id_ptr = str_id) { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; + int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; } } - else { native_format = null; } - byte ret = ImGuiNative.igInputScalarN(native_label, data_type, native_v, components, native_step, native_step_fast, native_format, extra_flags); - return ret != 0; + else { native_str_id = null; } + ImGuiNative.igTreePushStr(native_str_id); } - public static bool TreeNode(string label) + public static void TreePush() + { + void* ptr_id = null; + ImGuiNative.igTreePushPtr(ptr_id); + } + public static void TreePush(IntPtr ptr_id) + { + void* native_ptr_id = (void*)ptr_id.ToPointer(); + ImGuiNative.igTreePushPtr(native_ptr_id); + } + public static void Unindent() + { + float indent_w = 0.0f; + ImGuiNative.igUnindent(indent_w); + } + public static void Unindent(float indent_w) + { + ImGuiNative.igUnindent(indent_w); + } + public static void Value(string prefix, bool b) + { + byte* native_prefix; + if (prefix != null) + { + int prefix_byteCount = Encoding.UTF8.GetByteCount(prefix); + byte* native_prefix_stackBytes = stackalloc byte[prefix_byteCount + 1]; + native_prefix = native_prefix_stackBytes; + fixed (char* prefix_ptr = prefix) + { + int native_prefix_offset = Encoding.UTF8.GetBytes(prefix_ptr, prefix.Length, native_prefix, prefix_byteCount); + native_prefix[native_prefix_offset] = 0; + } + } + else { native_prefix = null; } + byte native_b = b ? (byte)1 : (byte)0; + ImGuiNative.igValueBool(native_prefix, native_b); + } + public static void Value(string prefix, int v) { - byte* native_label; - if (label != null) + byte* native_prefix; + if (prefix != null) { - int label_byteCount = Encoding.UTF8.GetByteCount(label); - byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; - native_label = native_label_stackBytes; - fixed (char* label_ptr = label) + int prefix_byteCount = Encoding.UTF8.GetByteCount(prefix); + byte* native_prefix_stackBytes = stackalloc byte[prefix_byteCount + 1]; + native_prefix = native_prefix_stackBytes; + fixed (char* prefix_ptr = prefix) { - int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); - native_label[native_label_offset] = 0; + int native_prefix_offset = Encoding.UTF8.GetBytes(prefix_ptr, prefix.Length, native_prefix, prefix_byteCount); + native_prefix[native_prefix_offset] = 0; } } - else { native_label = null; } - byte ret = ImGuiNative.igTreeNodeStr(native_label); - return ret != 0; + else { native_prefix = null; } + ImGuiNative.igValueInt(native_prefix, v); } - public static bool TreeNode(string str_id, string fmt) + public static void Value(string prefix, uint v) { - byte* native_str_id; - if (str_id != null) + byte* native_prefix; + if (prefix != null) { - int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); - byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; - native_str_id = native_str_id_stackBytes; - fixed (char* str_id_ptr = str_id) + int prefix_byteCount = Encoding.UTF8.GetByteCount(prefix); + byte* native_prefix_stackBytes = stackalloc byte[prefix_byteCount + 1]; + native_prefix = native_prefix_stackBytes; + fixed (char* prefix_ptr = prefix) { - int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); - native_str_id[native_str_id_offset] = 0; + int native_prefix_offset = Encoding.UTF8.GetBytes(prefix_ptr, prefix.Length, native_prefix, prefix_byteCount); + native_prefix[native_prefix_offset] = 0; } } - else { native_str_id = null; } - byte* native_fmt; - if (fmt != null) + else { native_prefix = null; } + ImGuiNative.igValueUint(native_prefix, v); + } + public static void Value(string prefix, float v) + { + byte* native_prefix; + if (prefix != null) { - int fmt_byteCount = Encoding.UTF8.GetByteCount(fmt); - byte* native_fmt_stackBytes = stackalloc byte[fmt_byteCount + 1]; - native_fmt = native_fmt_stackBytes; - fixed (char* fmt_ptr = fmt) + int prefix_byteCount = Encoding.UTF8.GetByteCount(prefix); + byte* native_prefix_stackBytes = stackalloc byte[prefix_byteCount + 1]; + native_prefix = native_prefix_stackBytes; + fixed (char* prefix_ptr = prefix) { - int native_fmt_offset = Encoding.UTF8.GetBytes(fmt_ptr, fmt.Length, native_fmt, fmt_byteCount); - native_fmt[native_fmt_offset] = 0; + int native_prefix_offset = Encoding.UTF8.GetBytes(prefix_ptr, prefix.Length, native_prefix, prefix_byteCount); + native_prefix[native_prefix_offset] = 0; } } - else { native_fmt = null; } - byte ret = ImGuiNative.igTreeNodeStrStr(native_str_id, native_fmt); - return ret != 0; + else { native_prefix = null; } + byte* native_float_format = null; + ImGuiNative.igValueFloat(native_prefix, v, native_float_format); } - public static bool TreeNode(IntPtr ptr_id, string fmt) + public static void Value(string prefix, float v, string float_format) { - void* native_ptr_id = (void*)ptr_id.ToPointer(); - byte* native_fmt; - if (fmt != null) + byte* native_prefix; + if (prefix != null) { - int fmt_byteCount = Encoding.UTF8.GetByteCount(fmt); - byte* native_fmt_stackBytes = stackalloc byte[fmt_byteCount + 1]; - native_fmt = native_fmt_stackBytes; - fixed (char* fmt_ptr = fmt) + int prefix_byteCount = Encoding.UTF8.GetByteCount(prefix); + byte* native_prefix_stackBytes = stackalloc byte[prefix_byteCount + 1]; + native_prefix = native_prefix_stackBytes; + fixed (char* prefix_ptr = prefix) { - int native_fmt_offset = Encoding.UTF8.GetBytes(fmt_ptr, fmt.Length, native_fmt, fmt_byteCount); - native_fmt[native_fmt_offset] = 0; + int native_prefix_offset = Encoding.UTF8.GetBytes(prefix_ptr, prefix.Length, native_prefix, prefix_byteCount); + native_prefix[native_prefix_offset] = 0; } } - else { native_fmt = null; } - byte ret = ImGuiNative.igTreeNodePtr(native_ptr_id, native_fmt); - return ret != 0; - } - public static float GetScrollMaxX() - { - float ret = ImGuiNative.igGetScrollMaxX(); - return ret; - } - public static void SetTooltip(string fmt) - { - byte* native_fmt; - if (fmt != null) + else { native_prefix = null; } + byte* native_float_format; + if (float_format != null) { - int fmt_byteCount = Encoding.UTF8.GetByteCount(fmt); - byte* native_fmt_stackBytes = stackalloc byte[fmt_byteCount + 1]; - native_fmt = native_fmt_stackBytes; - fixed (char* fmt_ptr = fmt) + int float_format_byteCount = Encoding.UTF8.GetByteCount(float_format); + byte* native_float_format_stackBytes = stackalloc byte[float_format_byteCount + 1]; + native_float_format = native_float_format_stackBytes; + fixed (char* float_format_ptr = float_format) { - int native_fmt_offset = Encoding.UTF8.GetBytes(fmt_ptr, fmt.Length, native_fmt, fmt_byteCount); - native_fmt[native_fmt_offset] = 0; + int native_float_format_offset = Encoding.UTF8.GetBytes(float_format_ptr, float_format.Length, native_float_format, float_format_byteCount); + native_float_format[native_float_format_offset] = 0; } } - else { native_fmt = null; } - ImGuiNative.igSetTooltip(native_fmt); - } - public static Vector2 GetContentRegionAvail() - { - Vector2 ret = ImGuiNative.igGetContentRegionAvail(); - return ret; + else { native_float_format = null; } + ImGuiNative.igValueFloat(native_prefix, v, native_float_format); } - public static bool InputFloat3(string label, ref Vector3 v) + public static bool VSliderFloat(string label, Vector2 size, ref float v, float v_min, float v_max) { byte* native_label; if (label != null) @@ -8729,14 +8772,14 @@ namespace ImGuiNET int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); native_format[native_format_offset] = 0; } - ImGuiInputTextFlags extra_flags = 0; - fixed (Vector3* native_v = &v) + float power = 1.0f; + fixed (float* native_v = &v) { - byte ret = ImGuiNative.igInputFloat3(native_label, native_v, native_format, extra_flags); + byte ret = ImGuiNative.igVSliderFloat(native_label, size, native_v, v_min, v_max, native_format, power); return ret != 0; } } - public static bool InputFloat3(string label, ref Vector3 v, string format) + public static bool VSliderFloat(string label, Vector2 size, ref float v, float v_min, float v_max, string format) { byte* native_label; if (label != null) @@ -8764,14 +8807,14 @@ namespace ImGuiNET } } else { native_format = null; } - ImGuiInputTextFlags extra_flags = 0; - fixed (Vector3* native_v = &v) + float power = 1.0f; + fixed (float* native_v = &v) { - byte ret = ImGuiNative.igInputFloat3(native_label, native_v, native_format, extra_flags); + byte ret = ImGuiNative.igVSliderFloat(native_label, size, native_v, v_min, v_max, native_format, power); return ret != 0; } } - public static bool InputFloat3(string label, ref Vector3 v, string format, ImGuiInputTextFlags extra_flags) + public static bool VSliderFloat(string label, Vector2 size, ref float v, float v_min, float v_max, string format, float power) { byte* native_label; if (label != null) @@ -8799,13 +8842,13 @@ namespace ImGuiNET } } else { native_format = null; } - fixed (Vector3* native_v = &v) + fixed (float* native_v = &v) { - byte ret = ImGuiNative.igInputFloat3(native_label, native_v, native_format, extra_flags); + byte ret = ImGuiNative.igVSliderFloat(native_label, size, native_v, v_min, v_max, native_format, power); return ret != 0; } } - public static bool DragFloat2(string label, ref Vector2 v) + public static bool VSliderInt(string label, Vector2 size, ref int v, int v_min, int v_max) { byte* native_label; if (label != null) @@ -8820,26 +8863,22 @@ namespace ImGuiNET } } else { native_label = null; } - float v_speed = 1.0f; - float v_min = 0.0f; - float v_max = 0.0f; byte* native_format; - int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + int format_byteCount = Encoding.UTF8.GetByteCount("%d"); byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; native_format = native_format_stackBytes; - fixed (char* format_ptr = "%.3f") + fixed (char* format_ptr = "%d") { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); native_format[native_format_offset] = 0; } - float power = 1.0f; - fixed (Vector2* native_v = &v) + fixed (int* native_v = &v) { - byte ret = ImGuiNative.igDragFloat2(native_label, native_v, v_speed, v_min, v_max, native_format, power); + byte ret = ImGuiNative.igVSliderInt(native_label, size, native_v, v_min, v_max, native_format); return ret != 0; } } - public static bool DragFloat2(string label, ref Vector2 v, float v_speed) + public static bool VSliderInt(string label, Vector2 size, ref int v, int v_min, int v_max, string format) { byte* native_label; if (label != null) @@ -8854,57 +8893,26 @@ namespace ImGuiNET } } else { native_label = null; } - float v_min = 0.0f; - float v_max = 0.0f; byte* native_format; - int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = "%.3f") - { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; - } - float power = 1.0f; - fixed (Vector2* native_v = &v) - { - byte ret = ImGuiNative.igDragFloat2(native_label, native_v, v_speed, v_min, v_max, native_format, power); - return ret != 0; - } - } - public static bool DragFloat2(string label, ref Vector2 v, float v_speed, float v_min) - { - byte* native_label; - if (label != null) + if (format != null) { - int label_byteCount = Encoding.UTF8.GetByteCount(label); - byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; - native_label = native_label_stackBytes; - fixed (char* label_ptr = label) - { - int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); - native_label[native_label_offset] = 0; - } - } - else { native_label = null; } - float v_max = 0.0f; - byte* native_format; - int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + int format_byteCount = Encoding.UTF8.GetByteCount(format); byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; native_format = native_format_stackBytes; - fixed (char* format_ptr = "%.3f") + fixed (char* format_ptr = format) { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); native_format[native_format_offset] = 0; } - float power = 1.0f; - fixed (Vector2* native_v = &v) + } + else { native_format = null; } + fixed (int* native_v = &v) { - byte ret = ImGuiNative.igDragFloat2(native_label, native_v, v_speed, v_min, v_max, native_format, power); + byte ret = ImGuiNative.igVSliderInt(native_label, size, native_v, v_min, v_max, native_format); return ret != 0; } } - public static bool DragFloat2(string label, ref Vector2 v, float v_speed, float v_min, float v_max) + public static bool VSliderScalar(string label, Vector2 size, ImGuiDataType data_type, IntPtr v, IntPtr v_min, IntPtr v_max) { byte* native_label; if (label != null) @@ -8919,23 +8927,15 @@ namespace ImGuiNET } } else { native_label = null; } - byte* native_format; - int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - fixed (char* format_ptr = "%.3f") - { - int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); - native_format[native_format_offset] = 0; - } + void* native_v = (void*)v.ToPointer(); + void* native_v_min = (void*)v_min.ToPointer(); + void* native_v_max = (void*)v_max.ToPointer(); + byte* native_format = null; float power = 1.0f; - fixed (Vector2* native_v = &v) - { - byte ret = ImGuiNative.igDragFloat2(native_label, native_v, v_speed, v_min, v_max, native_format, power); - return ret != 0; - } + byte ret = ImGuiNative.igVSliderScalar(native_label, size, data_type, native_v, native_v_min, native_v_max, native_format, power); + return ret != 0; } - public static bool DragFloat2(string label, ref Vector2 v, float v_speed, float v_min, float v_max, string format) + public static bool VSliderScalar(string label, Vector2 size, ImGuiDataType data_type, IntPtr v, IntPtr v_min, IntPtr v_max, string format) { byte* native_label; if (label != null) @@ -8950,6 +8950,9 @@ namespace ImGuiNET } } else { native_label = null; } + void* native_v = (void*)v.ToPointer(); + void* native_v_min = (void*)v_min.ToPointer(); + void* native_v_max = (void*)v_max.ToPointer(); byte* native_format; if (format != null) { @@ -8964,13 +8967,10 @@ namespace ImGuiNET } else { native_format = null; } float power = 1.0f; - fixed (Vector2* native_v = &v) - { - byte ret = ImGuiNative.igDragFloat2(native_label, native_v, v_speed, v_min, v_max, native_format, power); - return ret != 0; - } + byte ret = ImGuiNative.igVSliderScalar(native_label, size, data_type, native_v, native_v_min, native_v_max, native_format, power); + return ret != 0; } - public static bool DragFloat2(string label, ref Vector2 v, float v_speed, float v_min, float v_max, string format, float power) + public static bool VSliderScalar(string label, Vector2 size, ImGuiDataType data_type, IntPtr v, IntPtr v_min, IntPtr v_max, string format, float power) { byte* native_label; if (label != null) @@ -8985,6 +8985,9 @@ namespace ImGuiNET } } else { native_label = null; } + void* native_v = (void*)v.ToPointer(); + void* native_v_min = (void*)v_min.ToPointer(); + void* native_v_max = (void*)v_max.ToPointer(); byte* native_format; if (format != null) { @@ -8998,11 +9001,8 @@ namespace ImGuiNET } } else { native_format = null; } - fixed (Vector2* native_v = &v) - { - byte ret = ImGuiNative.igDragFloat2(native_label, native_v, v_speed, v_min, v_max, native_format, power); - return ret != 0; - } + byte ret = ImGuiNative.igVSliderScalar(native_label, size, data_type, native_v, native_v_min, native_v_max, native_format, power); + return ret != 0; } } } diff --git a/src/ImGui.NET/Generated/ImGuiIO.gen.cs b/src/ImGui.NET/Generated/ImGuiIO.gen.cs index a151afa..c8dfa27 100644 --- a/src/ImGui.NET/Generated/ImGuiIO.gen.cs +++ b/src/ImGui.NET/Generated/ImGuiIO.gen.cs @@ -166,6 +166,10 @@ namespace ImGuiNET public RangeAccessor KeysDownDurationPrev => new RangeAccessor(NativePtr->KeysDownDurationPrev, 512); public RangeAccessor NavInputsDownDuration => new RangeAccessor(NativePtr->NavInputsDownDuration, 21); public RangeAccessor NavInputsDownDurationPrev => new RangeAccessor(NativePtr->NavInputsDownDurationPrev, 21); + public void AddInputCharacter(ushort c) + { + ImGuiNative.ImGuiIO_AddInputCharacter(NativePtr, c); + } public void AddInputCharactersUTF8(string utf8_chars) { byte* native_utf8_chars; @@ -187,9 +191,5 @@ namespace ImGuiNET { ImGuiNative.ImGuiIO_ClearInputCharacters(NativePtr); } - public void AddInputCharacter(ushort c) - { - ImGuiNative.ImGuiIO_AddInputCharacter(NativePtr, c); - } } } diff --git a/src/ImGui.NET/Generated/ImGuiListClipper.gen.cs b/src/ImGui.NET/Generated/ImGuiListClipper.gen.cs index 7b7eb01..c9bf353 100644 --- a/src/ImGui.NET/Generated/ImGuiListClipper.gen.cs +++ b/src/ImGui.NET/Generated/ImGuiListClipper.gen.cs @@ -28,10 +28,6 @@ namespace ImGuiNET public ref int StepNo => ref Unsafe.AsRef(&NativePtr->StepNo); public ref int DisplayStart => ref Unsafe.AsRef(&NativePtr->DisplayStart); public ref int DisplayEnd => ref Unsafe.AsRef(&NativePtr->DisplayEnd); - public void End() - { - ImGuiNative.ImGuiListClipper_End(NativePtr); - } public void Begin(int items_count) { float items_height = -1.0f; @@ -41,6 +37,10 @@ namespace ImGuiNET { ImGuiNative.ImGuiListClipper_Begin(NativePtr, items_count, items_height); } + public void End() + { + ImGuiNative.ImGuiListClipper_End(NativePtr); + } public bool Step() { byte ret = ImGuiNative.ImGuiListClipper_Step(NativePtr); diff --git a/src/ImGui.NET/Generated/ImGuiNative.gen.cs b/src/ImGui.NET/Generated/ImGuiNative.gen.cs index 0a25542..e77ef3f 100644 --- a/src/ImGui.NET/Generated/ImGuiNative.gen.cs +++ b/src/ImGui.NET/Generated/ImGuiNative.gen.cs @@ -7,1006 +7,1006 @@ namespace ImGuiNET public static unsafe partial class ImGuiNative { [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern float igGetFrameHeight(); - [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr igCreateContext(ImFontAtlas* shared_font_atlas); + public static extern void CustomRect_CustomRect(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igTextUnformatted(byte* text, byte* text_end); + public static extern byte CustomRect_IsPacked(CustomRect* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igPopFont(); + public static extern void GlyphRangesBuilder_AddChar(GlyphRangesBuilder* self, ushort c); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igCombo(byte* label, int* current_item, byte** items, int items_count, int popup_max_height_in_items); + public static extern void GlyphRangesBuilder_AddRanges(GlyphRangesBuilder* self, ushort* ranges); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igComboStr(byte* label, int* current_item, byte* items_separated_by_zeros, int popup_max_height_in_items); + public static extern void GlyphRangesBuilder_AddText(GlyphRangesBuilder* self, byte* text, byte* text_end); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igCaptureKeyboardFromApp(byte capture); + public static extern void GlyphRangesBuilder_BuildRanges(GlyphRangesBuilder* self, ImVector* out_ranges); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igIsWindowFocused(ImGuiFocusedFlags flags); + public static extern byte GlyphRangesBuilder_GetBit(GlyphRangesBuilder* self, int n); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igRender(); + public static extern void GlyphRangesBuilder_GlyphRangesBuilder(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_ChannelsSetCurrent(ImDrawList* self, int channel_index); + public static extern void GlyphRangesBuilder_SetBit(GlyphRangesBuilder* self, int n); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igDragFloat4(byte* label, Vector4* v, float v_speed, float v_min, float v_max, byte* format, float power); + public static extern ImGuiPayload* igAcceptDragDropPayload(byte* type, ImGuiDragDropFlags flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_ChannelsSplit(ImDrawList* self, int channels_count); + public static extern void igAlignTextToFramePadding(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igIsMousePosValid(Vector2* mouse_pos); - [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetCursorScreenPos_nonUDT2")] - public static extern Vector2 igGetCursorScreenPos(); + public static extern byte igArrowButton(byte* str_id, ImGuiDir dir); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igDebugCheckVersionAndDataLayout(byte* version_str, uint sz_io, uint sz_style, uint sz_vec2, uint sz_vec4, uint sz_drawvert); + public static extern byte igBegin(byte* name, byte* p_open, ImGuiWindowFlags flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetScrollHere(float center_y_ratio); + public static extern byte igBeginChild(byte* str_id, Vector2 size, byte border, ImGuiWindowFlags flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetScrollY(float scroll_y); + public static extern byte igBeginChildID(uint id, Vector2 size, byte border, ImGuiWindowFlags flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igDummy(Vector2 size); + public static extern byte igBeginChildFrame(uint id, Vector2 size, ImGuiWindowFlags flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetColorEditOptions(ImGuiColorEditFlags flags); + public static extern byte igBeginCombo(byte* label, byte* preview_value, ImGuiComboFlags flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern ImGuiStorage* igGetStateStorage(); + public static extern byte igBeginDragDropSource(ImGuiDragDropFlags flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void** ImGuiStorage_GetVoidPtrRef(ImGuiStorage* self, uint key, void* default_val); + public static extern byte igBeginDragDropTarget(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetScrollFromPosY(float pos_y, float center_y_ratio); + public static extern void igBeginGroup(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igInputInt2(byte* label, int* v, ImGuiInputTextFlags extra_flags); + public static extern byte igBeginMainMenuBar(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImFont_GrowIndex(ImFont* self, int new_size); + public static extern byte igBeginMenu(byte* label, byte enabled); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern Vector4* igGetStyleColorVec4(ImGuiCol idx); + public static extern byte igBeginMenuBar(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igIsMouseHoveringRect(Vector2 r_min, Vector2 r_max, byte clip); + public static extern byte igBeginPopup(byte* str_id, ImGuiWindowFlags flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImVec4_ImVec4(); + public static extern byte igBeginPopupContextItem(byte* str_id, int mouse_button); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImVec4_ImVec4Float(float _x, float _y, float _z, float _w); + public static extern byte igBeginPopupContextVoid(byte* str_id, int mouse_button); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_AddQuad(ImDrawList* self, Vector2 a, Vector2 b, Vector2 c, Vector2 d, uint col, float thickness); + public static extern byte igBeginPopupContextWindow(byte* str_id, int mouse_button, byte also_over_items); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImColor_SetHSV(ImColor* self, float h, float s, float v, float a); + public static extern byte igBeginPopupModal(byte* name, byte* p_open, ImGuiWindowFlags flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte* igGetClipboardText(); + public static extern void igBeginTooltip(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igDragFloat3(byte* label, Vector3* v, float v_speed, float v_min, float v_max, byte* format, float power); + public static extern void igBullet(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_AddPolyline(ImDrawList* self, Vector2* points, int num_points, uint col, byte closed, float thickness); + public static extern void igBulletText(byte* fmt); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igValueBool(byte* prefix, byte b); + public static extern byte igButton(byte* label, Vector2 size); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igValueInt(byte* prefix, int v); + public static extern float igCalcItemWidth(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igValueUint(byte* prefix, uint v); + public static extern void igCalcListClipping(int items_count, float items_height, int* out_items_display_start, int* out_items_display_end); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igCalcTextSize_nonUDT2")] + public static extern Vector2 igCalcTextSize(byte* text, byte* text_end, byte hide_text_after_double_hash, float wrap_width); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igValueFloat(byte* prefix, float v, byte* float_format); + public static extern void igCaptureKeyboardFromApp(byte capture); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImFontAtlas_ClearFonts(ImFontAtlas* self); + public static extern void igCaptureMouseFromApp(byte capture); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImGuiTextFilter_Build(ImGuiTextFilter* self); + public static extern byte igCheckbox(byte* label, byte* v); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetStateStorage(ImGuiStorage* storage); - [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetItemRectMax_nonUDT2")] - public static extern Vector2 igGetItemRectMax(); + public static extern byte igCheckboxFlags(byte* label, uint* flags, uint flags_value); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igShowStyleSelector(byte* label); + public static extern void igCloseCurrentPopup(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igIsItemDeactivated(); + public static extern byte igCollapsingHeader(byte* label, ImGuiTreeNodeFlags flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igPushStyleVarFloat(ImGuiStyleVar idx, float val); + public static extern byte igCollapsingHeaderBoolPtr(byte* label, byte* p_open, ImGuiTreeNodeFlags flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igPushStyleVarVec2(ImGuiStyleVar idx, Vector2 val); + public static extern byte igColorButton(byte* desc_id, Vector4 col, ImGuiColorEditFlags flags, Vector2 size); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte* igSaveIniSettingsToMemory(uint* out_ini_size); + public static extern uint igColorConvertFloat4ToU32(Vector4 @in); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igDragIntRange2(byte* label, int* v_current_min, int* v_current_max, float v_speed, int v_min, int v_max, byte* format, byte* format_max); + public static extern void igColorConvertHSVtoRGB(float h, float s, float v, float* out_r, float* out_g, float* out_b); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igUnindent(float indent_w); + public static extern void igColorConvertRGBtoHSV(float r, float g, float b, float* out_h, float* out_s, float* out_v); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igColorConvertU32ToFloat4_nonUDT2")] + public static extern Vector4 igColorConvertU32ToFloat4(uint @in); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern ImFont* ImFontAtlas_AddFontFromMemoryCompressedBase85TTF(ImFontAtlas* self, byte* compressed_font_data_base85, float size_pixels, ImFontConfig* font_cfg, ushort* glyph_ranges); + public static extern byte igColorEdit3(byte* label, Vector3* col, ImGuiColorEditFlags flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igPopAllowKeyboardFocus(); + public static extern byte igColorEdit4(byte* label, Vector4* col, ImGuiColorEditFlags flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igLoadIniSettingsFromDisk(byte* ini_filename); - [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetCursorStartPos_nonUDT2")] - public static extern Vector2 igGetCursorStartPos(); + public static extern byte igColorPicker3(byte* label, Vector3* col, ImGuiColorEditFlags flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetCursorScreenPos(Vector2 screen_pos); + public static extern byte igColorPicker4(byte* label, Vector4* col, ImGuiColorEditFlags flags, float* ref_col); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte ImGuiTextBuffer_empty(ImGuiTextBuffer* self); + public static extern void igColumns(int count, byte* id, byte border); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igInputInt4(byte* label, int* v, ImGuiInputTextFlags extra_flags); + public static extern byte igCombo(byte* label, int* current_item, byte** items, int items_count, int popup_max_height_in_items); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImFont_AddRemapChar(ImFont* self, ushort dst, ushort src, byte overwrite_dst); + public static extern byte igComboStr(byte* label, int* current_item, byte* items_separated_by_zeros, int popup_max_height_in_items); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImFont_AddGlyph(ImFont* self, ushort c, float x0, float y0, float x1, float y1, float u0, float v0, float u1, float v1, float advance_x); + public static extern IntPtr igCreateContext(ImFontAtlas* shared_font_atlas); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igIsRectVisible(Vector2 size); + public static extern byte igDebugCheckVersionAndDataLayout(byte* version_str, uint sz_io, uint sz_style, uint sz_vec2, uint sz_vec4, uint sz_drawvert); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igIsRectVisibleVec2(Vector2 rect_min, Vector2 rect_max); + public static extern void igDestroyContext(IntPtr ctx); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte ImFontAtlas_Build(ImFontAtlas* self); + public static extern byte igDragFloat(byte* label, float* v, float v_speed, float v_min, float v_max, byte* format, float power); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igLabelText(byte* label, byte* fmt); + public static extern byte igDragFloat2(byte* label, Vector2* v, float v_speed, float v_min, float v_max, byte* format, float power); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImFont_RenderText(ImFont* self, ImDrawList* draw_list, float size, Vector2 pos, uint col, Vector4 clip_rect, byte* text_begin, byte* text_end, float wrap_width, byte cpu_fine_clip); + public static extern byte igDragFloat3(byte* label, Vector3* v, float v_speed, float v_min, float v_max, byte* format, float power); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igLogFinish(); + public static extern byte igDragFloat4(byte* label, Vector4* v, float v_speed, float v_min, float v_max, byte* format, float power); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igIsKeyPressed(int user_key_index, byte repeat); + public static extern byte igDragFloatRange2(byte* label, float* v_current_min, float* v_current_max, float v_speed, float v_min, float v_max, byte* format, byte* format_max, float power); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern float igGetColumnOffset(int column_index); + public static extern byte igDragInt(byte* label, int* v, float v_speed, int v_min, int v_max, byte* format); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_PopClipRect(ImDrawList* self); + public static extern byte igDragInt2(byte* label, int* v, float v_speed, int v_min, int v_max, byte* format); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern ImFontGlyph* ImFont_FindGlyphNoFallback(ImFont* self, ushort c); + public static extern byte igDragInt3(byte* label, int* v, float v_speed, int v_min, int v_max, byte* format); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetNextWindowCollapsed(byte collapsed, ImGuiCond cond); + public static extern byte igDragInt4(byte* label, int* v, float v_speed, int v_min, int v_max, byte* format); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr igGetCurrentContext(); + public static extern byte igDragIntRange2(byte* label, int* v_current_min, int* v_current_max, float v_speed, int v_min, int v_max, byte* format, byte* format_max); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igSmallButton(byte* label); + public static extern byte igDragScalar(byte* label, ImGuiDataType data_type, void* v, float v_speed, void* v_min, void* v_max, byte* format, float power); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igOpenPopupOnItemClick(byte* str_id, int mouse_button); + public static extern byte igDragScalarN(byte* label, ImGuiDataType data_type, void* v, int components, float v_speed, void* v_min, void* v_max, byte* format, float power); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igIsAnyMouseDown(); + public static extern void igDummy(Vector2 size); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte* ImFont_CalcWordWrapPositionA(ImFont* self, float scale, byte* text, byte* text_end, float wrap_width); - [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "ImFont_CalcTextSizeA_nonUDT2")] - public static extern Vector2 ImFont_CalcTextSizeA(ImFont* self, float size, float max_width, float wrap_width, byte* text_begin, byte* text_end, byte** remaining); + public static extern void igEnd(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void GlyphRangesBuilder_SetBit(GlyphRangesBuilder* self, int n); + public static extern void igEndChild(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte ImFont_IsLoaded(ImFont* self); + public static extern void igEndChildFrame(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern float ImFont_GetCharAdvance(ImFont* self, ushort c); + public static extern void igEndCombo(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igImageButton(IntPtr user_texture_id, Vector2 size, Vector2 uv0, Vector2 uv1, int frame_padding, Vector4 bg_col, Vector4 tint_col); + public static extern void igEndDragDropSource(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImFont_SetFallbackChar(ImFont* self, ushort c); + public static extern void igEndDragDropTarget(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void igEndFrame(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igSliderFloat2(byte* label, Vector2* v, float v_min, float v_max, byte* format, float power); + public static extern void igEndGroup(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImFont_RenderChar(ImFont* self, ImDrawList* draw_list, float size, Vector2 pos, uint col, ushort c); + public static extern void igEndMainMenuBar(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igRadioButtonBool(byte* label, byte active); + public static extern void igEndMenu(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igRadioButtonIntPtr(byte* label, int* v, int v_button); + public static extern void igEndMenuBar(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_PushClipRect(ImDrawList* self, Vector2 clip_rect_min, Vector2 clip_rect_max, byte intersect_with_current_clip_rect); + public static extern void igEndPopup(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern ImFontGlyph* ImFont_FindGlyph(ImFont* self, ushort c); + public static extern void igEndTooltip(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igIsItemDeactivatedAfterEdit(); + public static extern byte* igGetClipboardText(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern ImDrawList* igGetWindowDrawList(); + public static extern uint igGetColorU32(ImGuiCol idx, float alpha_mul); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern ImFont* ImFontAtlas_AddFont(ImFontAtlas* self, ImFontConfig* font_cfg); + public static extern uint igGetColorU32Vec4(Vector4 col); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_PathBezierCurveTo(ImDrawList* self, Vector2 p1, Vector2 p2, Vector2 p3, int num_segments); + public static extern uint igGetColorU32U32(uint col); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImGuiPayload_Clear(ImGuiPayload* self); + public static extern int igGetColumnIndex(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igNewLine(); + public static extern float igGetColumnOffset(int column_index); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igIsItemFocused(); + public static extern int igGetColumnsCount(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igLoadIniSettingsFromMemory(byte* ini_data, uint ini_size); + public static extern float igGetColumnWidth(int column_index); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetContentRegionAvail_nonUDT2")] + public static extern Vector2 igGetContentRegionAvail(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igSliderInt2(byte* label, int* v, int v_min, int v_max, byte* format); + public static extern float igGetContentRegionAvailWidth(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetContentRegionMax_nonUDT2")] + public static extern Vector2 igGetContentRegionMax(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetWindowSizeVec2(Vector2 size, ImGuiCond cond); + public static extern IntPtr igGetCurrentContext(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetCursorPos_nonUDT2")] + public static extern Vector2 igGetCursorPos(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetWindowSizeStr(byte* name, Vector2 size, ImGuiCond cond); + public static extern float igGetCursorPosX(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igInputFloat(byte* label, float* v, float step, float step_fast, byte* format, ImGuiInputTextFlags extra_flags); + public static extern float igGetCursorPosY(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetCursorScreenPos_nonUDT2")] + public static extern Vector2 igGetCursorScreenPos(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetCursorStartPos_nonUDT2")] + public static extern Vector2 igGetCursorStartPos(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImFont_ImFont(); + public static extern ImDrawData* igGetDrawData(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImGuiStorage_SetFloat(ImGuiStorage* self, uint key, float val); + public static extern IntPtr igGetDrawListSharedData(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igColorConvertRGBtoHSV(float r, float g, float b, float* out_h, float* out_s, float* out_v); + public static extern ImFont* igGetFont(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igBeginMenuBar(); + public static extern float igGetFontSize(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetFontTexUvWhitePixel_nonUDT2")] + public static extern Vector2 igGetFontTexUvWhitePixel(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igIsPopupOpen(byte* str_id); + public static extern int igGetFrameCount(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igIsItemVisible(); + public static extern float igGetFrameHeight(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImFontAtlas_CalcCustomRectUV(ImFontAtlas* self, CustomRect* rect, Vector2* out_uv_min, Vector2* out_uv_max); + public static extern float igGetFrameHeightWithSpacing(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern CustomRect* ImFontAtlas_GetCustomRectByIndex(ImFontAtlas* self, int index); + public static extern uint igGetIDStr(byte* str_id); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void GlyphRangesBuilder_AddText(GlyphRangesBuilder* self, byte* text, byte* text_end); + public static extern uint igGetIDRange(byte* str_id_begin, byte* str_id_end); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_UpdateTextureID(ImDrawList* self); + public static extern uint igGetIDPtr(void* ptr_id); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetNextWindowSize(Vector2 size, ImGuiCond cond); + public static extern ImGuiIO* igGetIO(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetItemRectMax_nonUDT2")] + public static extern Vector2 igGetItemRectMax(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetItemRectMin_nonUDT2")] + public static extern Vector2 igGetItemRectMin(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetItemRectSize_nonUDT2")] + public static extern Vector2 igGetItemRectSize(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern int ImFontAtlas_AddCustomRectRegular(ImFontAtlas* self, uint id, int width, int height); + public static extern int igGetKeyIndex(ImGuiKey imgui_key); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetWindowCollapsedBool(byte collapsed, ImGuiCond cond); + public static extern int igGetKeyPressedAmount(int key_index, float repeat_delay, float rate); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetWindowCollapsedStr(byte* name, byte collapsed, ImGuiCond cond); + public static extern ImGuiMouseCursor igGetMouseCursor(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetMouseDragDelta_nonUDT2")] public static extern Vector2 igGetMouseDragDelta(int button, float lock_threshold); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetMousePos_nonUDT2")] + public static extern Vector2 igGetMousePos(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetMousePosOnOpeningCurrentPopup_nonUDT2")] + public static extern Vector2 igGetMousePosOnOpeningCurrentPopup(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern ImGuiPayload* igAcceptDragDropPayload(byte* type, ImGuiDragDropFlags flags); + public static extern ImDrawList* igGetOverlayDrawList(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igBeginDragDropSource(ImGuiDragDropFlags flags); + public static extern float igGetScrollMaxX(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte CustomRect_IsPacked(CustomRect* self); + public static extern float igGetScrollMaxY(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igPlotLines(byte* label, float* values, int values_count, int values_offset, byte* overlay_text, float scale_min, float scale_max, Vector2 graph_size, int stride); + public static extern float igGetScrollX(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte ImFontAtlas_IsBuilt(ImFontAtlas* self); + public static extern float igGetScrollY(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImVec2_ImVec2(); + public static extern ImGuiStorage* igGetStateStorage(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImVec2_ImVec2Float(float _x, float _y); + public static extern ImGuiStyle* igGetStyle(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImGuiPayload_ImGuiPayload(); + public static extern byte* igGetStyleColorName(ImGuiCol idx); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_Clear(ImDrawList* self); + public static extern Vector4* igGetStyleColorVec4(ImGuiCol idx); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern float igGetTextLineHeight(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void GlyphRangesBuilder_AddRanges(GlyphRangesBuilder* self, ushort* ranges); + public static extern float igGetTextLineHeightWithSpacing(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern int igGetFrameCount(); + public static extern double igGetTime(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte* ImFont_GetDebugName(ImFont* self); + public static extern float igGetTreeNodeToLabelSpacing(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igListBoxFooter(); + public static extern byte* igGetVersion(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetWindowContentRegionMax_nonUDT2")] + public static extern Vector2 igGetWindowContentRegionMax(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetWindowContentRegionMin_nonUDT2")] + public static extern Vector2 igGetWindowContentRegionMin(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igPopClipRect(); + public static extern float igGetWindowContentRegionWidth(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_AddBezierCurve(ImDrawList* self, Vector2 pos0, Vector2 cp0, Vector2 cp1, Vector2 pos1, uint col, float thickness, int num_segments); + public static extern ImDrawList* igGetWindowDrawList(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void GlyphRangesBuilder_GlyphRangesBuilder(); + public static extern float igGetWindowHeight(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetWindowPos_nonUDT2")] + public static extern Vector2 igGetWindowPos(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetWindowSize_nonUDT2")] public static extern Vector2 igGetWindowSize(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern ushort* ImFontAtlas_GetGlyphRangesThai(ImFontAtlas* self); - [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igCheckboxFlags(byte* label, uint* flags, uint flags_value); - [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern ushort* ImFontAtlas_GetGlyphRangesCyrillic(ImFontAtlas* self); - [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igIsWindowHovered(ImGuiHoveredFlags flags); + public static extern float igGetWindowWidth(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern ushort* ImFontAtlas_GetGlyphRangesChineseSimplifiedCommon(ImFontAtlas* self); + public static extern void igImage(IntPtr user_texture_id, Vector2 size, Vector2 uv0, Vector2 uv1, Vector4 tint_col, Vector4 border_col); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igPlotHistogramFloatPtr(byte* label, float* values, int values_count, int values_offset, byte* overlay_text, float scale_min, float scale_max, Vector2 graph_size, int stride); + public static extern byte igImageButton(IntPtr user_texture_id, Vector2 size, Vector2 uv0, Vector2 uv1, int frame_padding, Vector4 bg_col, Vector4 tint_col); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igBeginPopupContextVoid(byte* str_id, int mouse_button); + public static extern void igIndent(float indent_w); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern ushort* ImFontAtlas_GetGlyphRangesChineseFull(ImFontAtlas* self); + public static extern byte igInputDouble(byte* label, double* v, double step, double step_fast, byte* format, ImGuiInputTextFlags extra_flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igShowStyleEditor(ImGuiStyle* @ref); + public static extern byte igInputFloat(byte* label, float* v, float step, float step_fast, byte* format, ImGuiInputTextFlags extra_flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igCheckbox(byte* label, byte* v); - [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetWindowPos_nonUDT2")] - public static extern Vector2 igGetWindowPos(); + public static extern byte igInputFloat2(byte* label, Vector2* v, byte* format, ImGuiInputTextFlags extra_flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImGuiInputTextCallbackData_ImGuiInputTextCallbackData(); + public static extern byte igInputFloat3(byte* label, Vector3* v, byte* format, ImGuiInputTextFlags extra_flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetNextWindowContentSize(Vector2 size); + public static extern byte igInputFloat4(byte* label, Vector4* v, byte* format, ImGuiInputTextFlags extra_flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igTextColored(Vector4 col, byte* fmt); + public static extern byte igInputInt(byte* label, int* v, int step, int step_fast, ImGuiInputTextFlags extra_flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igLogToFile(int max_depth, byte* filename); + public static extern byte igInputInt2(byte* label, int* v, ImGuiInputTextFlags extra_flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igButton(byte* label, Vector2 size); + public static extern byte igInputInt3(byte* label, int* v, ImGuiInputTextFlags extra_flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igIsItemEdited(); + public static extern byte igInputInt4(byte* label, int* v, ImGuiInputTextFlags extra_flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_PushTextureID(ImDrawList* self, IntPtr texture_id); + public static extern byte igInputScalar(byte* label, ImGuiDataType data_type, void* v, void* step, void* step_fast, byte* format, ImGuiInputTextFlags extra_flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igTreeAdvanceToLabelPos(); + public static extern byte igInputScalarN(byte* label, ImGuiDataType data_type, void* v, int components, void* step, void* step_fast, byte* format, ImGuiInputTextFlags extra_flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImGuiInputTextCallbackData_DeleteChars(ImGuiInputTextCallbackData* self, int pos, int bytes_count); + public static extern byte igInputText(byte* label, byte* buf, uint buf_size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* user_data); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igDragInt2(byte* label, int* v, float v_speed, int v_min, int v_max, byte* format); + public static extern byte igInputTextMultiline(byte* label, byte* buf, uint buf_size, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* user_data); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern ushort* ImFontAtlas_GetGlyphRangesDefault(ImFontAtlas* self); + public static extern byte igInvisibleButton(byte* str_id, Vector2 size); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern byte igIsAnyItemActive(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImFontAtlas_SetTexID(ImFontAtlas* self, IntPtr id); - [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igMenuItemBool(byte* label, byte* shortcut, byte selected, byte enabled); + public static extern byte igIsAnyItemFocused(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igMenuItemBoolPtr(byte* label, byte* shortcut, byte* p_selected, byte enabled); + public static extern byte igIsAnyItemHovered(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igSliderFloat4(byte* label, Vector4* v, float v_min, float v_max, byte* format, float power); + public static extern byte igIsAnyMouseDown(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern float igGetCursorPosX(); + public static extern byte igIsItemActive(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImFontAtlas_ClearTexData(ImFontAtlas* self); + public static extern byte igIsItemClicked(int mouse_button); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern int igGetColumnsCount(); + public static extern byte igIsItemDeactivated(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igPopButtonRepeat(); + public static extern byte igIsItemDeactivatedAfterEdit(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igDragScalarN(byte* label, ImGuiDataType data_type, void* v, int components, float v_speed, void* v_min, void* v_max, byte* format, float power); + public static extern byte igIsItemEdited(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte ImGuiPayload_IsPreview(ImGuiPayload* self); + public static extern byte igIsItemFocused(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igSpacing(); + public static extern byte igIsItemHovered(ImGuiHoveredFlags flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImFontAtlas_Clear(ImFontAtlas* self); + public static extern byte igIsItemVisible(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igIsAnyItemFocused(); + public static extern byte igIsKeyDown(int user_key_index); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_AddRectFilled(ImDrawList* self, Vector2 a, Vector2 b, uint col, float rounding, int rounding_corners_flags); + public static extern byte igIsKeyPressed(int user_key_index, byte repeat); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern ImFont* ImFontAtlas_AddFontFromMemoryCompressedTTF(ImFontAtlas* self, void* compressed_font_data, int compressed_font_size, float size_pixels, ImFontConfig* font_cfg, ushort* glyph_ranges); + public static extern byte igIsKeyReleased(int user_key_index); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igMemFree(void* ptr); - [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetFontTexUvWhitePixel_nonUDT2")] - public static extern Vector2 igGetFontTexUvWhitePixel(); + public static extern byte igIsMouseClicked(int button, byte repeat); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_AddDrawCmd(ImDrawList* self); + public static extern byte igIsMouseDoubleClicked(int button); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igIsItemClicked(int mouse_button); + public static extern byte igIsMouseDown(int button); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern ImFont* ImFontAtlas_AddFontFromMemoryTTF(ImFontAtlas* self, void* font_data, int font_size, float size_pixels, ImFontConfig* font_cfg, ushort* glyph_ranges); + public static extern byte igIsMouseDragging(int button, float lock_threshold); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern ImFont* ImFontAtlas_AddFontFromFileTTF(ImFontAtlas* self, byte* filename, float size_pixels, ImFontConfig* font_cfg, ushort* glyph_ranges); + public static extern byte igIsMouseHoveringRect(Vector2 r_min, Vector2 r_max, byte clip); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igProgressBar(float fraction, Vector2 size_arg, byte* overlay); + public static extern byte igIsMousePosValid(Vector2* mouse_pos); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern ImFont* ImFontAtlas_AddFontDefault(ImFontAtlas* self, ImFontConfig* font_cfg); + public static extern byte igIsMouseReleased(int button); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetNextWindowBgAlpha(float alpha); + public static extern byte igIsPopupOpen(byte* str_id); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igBeginPopup(byte* str_id, ImGuiWindowFlags flags); + public static extern byte igIsRectVisible(Vector2 size); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImFont_BuildLookupTable(ImFont* self); + public static extern byte igIsRectVisibleVec2(Vector2 rect_min, Vector2 rect_max); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern float igGetScrollX(); + public static extern byte igIsWindowAppearing(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern int igGetKeyIndex(ImGuiKey imgui_key); + public static extern byte igIsWindowCollapsed(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern ImDrawList* igGetOverlayDrawList(); + public static extern byte igIsWindowFocused(ImGuiFocusedFlags flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern uint igGetIDStr(byte* str_id); + public static extern byte igIsWindowHovered(ImGuiHoveredFlags flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern uint igGetIDRange(byte* str_id_begin, byte* str_id_end); + public static extern void igLabelText(byte* label, byte* fmt); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern uint igGetIDPtr(void* ptr_id); + public static extern byte igListBoxStr_arr(byte* label, int* current_item, byte** items, int items_count, int height_in_items); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern ushort* ImFontAtlas_GetGlyphRangesJapanese(ImFontAtlas* self); + public static extern void igListBoxFooter(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern byte igListBoxHeaderVec2(byte* label, Vector2 size); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern byte igListBoxHeaderInt(byte* label, int items_count, int height_in_items); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImFontConfig_ImFontConfig(); + public static extern void igLoadIniSettingsFromDisk(byte* ini_filename); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igIsMouseReleased(int button); + public static extern void igLoadIniSettingsFromMemory(byte* ini_data, uint ini_size); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawData_ScaleClipRects(ImDrawData* self, Vector2 sc); - [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetItemRectMin_nonUDT2")] - public static extern Vector2 igGetItemRectMin(); + public static extern void igLogButtons(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawData_DeIndexAllBuffers(ImDrawData* self); + public static extern void igLogFinish(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void igLogText(byte* fmt); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawData_Clear(ImDrawData* self); + public static extern void igLogToClipboard(int max_depth); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void* ImGuiStorage_GetVoidPtr(ImGuiStorage* self, uint key); + public static extern void igLogToFile(int max_depth, byte* filename); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igTextWrapped(byte* fmt); + public static extern void igLogToTTY(int max_depth); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_UpdateClipRect(ImDrawList* self); + public static extern void* igMemAlloc(uint size); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_PrimVtx(ImDrawList* self, Vector2 pos, Vector2 uv, uint col); + public static extern void igMemFree(void* ptr); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igEndGroup(); + public static extern byte igMenuItemBool(byte* label, byte* shortcut, byte selected, byte enabled); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern ImFont* igGetFont(); + public static extern byte igMenuItemBoolPtr(byte* label, byte* shortcut, byte* p_selected, byte enabled); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igTreePushStr(byte* str_id); + public static extern void igNewFrame(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igTreePushPtr(void* ptr_id); + public static extern void igNewLine(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igTextDisabled(byte* fmt); + public static extern void igNextColumn(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_PrimRect(ImDrawList* self, Vector2 a, Vector2 b, uint col); + public static extern void igOpenPopup(byte* str_id); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_ClearFreeMemory(ImDrawList* self); + public static extern byte igOpenPopupOnItemClick(byte* str_id, int mouse_button); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetNextTreeNodeOpen(byte is_open, ImGuiCond cond); + public static extern void igPlotHistogramFloatPtr(byte* label, float* values, int values_count, int values_offset, byte* overlay_text, float scale_min, float scale_max, Vector2 graph_size, int stride); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igLogToTTY(int max_depth); + public static extern void igPlotLines(byte* label, float* values, int values_count, int values_offset, byte* overlay_text, float scale_min, float scale_max, Vector2 graph_size, int stride); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void GlyphRangesBuilder_BuildRanges(GlyphRangesBuilder* self, ImVector* out_ranges); + public static extern void igPopAllowKeyboardFocus(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern ImDrawList* ImDrawList_CloneOutput(ImDrawList* self); + public static extern void igPopButtonRepeat(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern ImGuiIO* igGetIO(); + public static extern void igPopClipRect(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igDragInt4(byte* label, int* v, float v_speed, int v_min, int v_max, byte* format); + public static extern void igPopFont(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igNextColumn(); + public static extern void igPopID(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_AddRect(ImDrawList* self, Vector2 a, Vector2 b, uint col, float rounding, int rounding_corners_flags, float thickness); + public static extern void igPopItemWidth(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void TextRange_split(TextRange* self, byte separator, ImVector* @out); + public static extern void igPopStyleColor(int count); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetCursorPos(Vector2 local_pos); + public static extern void igPopStyleVar(int count); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igBeginPopupModal(byte* name, byte* p_open, ImGuiWindowFlags flags); + public static extern void igPopTextWrapPos(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igSliderInt4(byte* label, int* v, int v_min, int v_max, byte* format); + public static extern void igProgressBar(float fraction, Vector2 size_arg, byte* overlay); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_AddCallback(ImDrawList* self, IntPtr callback, void* callback_data); + public static extern void igPushAllowKeyboardFocus(byte allow_keyboard_focus); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igShowMetricsWindow(byte* p_open); + public static extern void igPushButtonRepeat(byte repeat); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern float igGetScrollMaxY(); + public static extern void igPushClipRect(Vector2 clip_rect_min, Vector2 clip_rect_max, byte intersect_with_current_clip_rect); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igBeginTooltip(); + public static extern void igPushFont(ImFont* font); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetScrollX(float scroll_x); + public static extern void igPushIDStr(byte* str_id); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern ImDrawData* igGetDrawData(); + public static extern void igPushIDRange(byte* str_id_begin, byte* str_id_end); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern float igGetTextLineHeight(); + public static extern void igPushIDPtr(void* ptr_id); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igSeparator(); + public static extern void igPushIDInt(int int_id); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igBeginChild(byte* str_id, Vector2 size, byte border, ImGuiWindowFlags flags); + public static extern void igPushItemWidth(float item_width); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igBeginChildID(uint id, Vector2 size, byte border, ImGuiWindowFlags flags); + public static extern void igPushStyleColorU32(ImGuiCol idx, uint col); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_PathRect(ImDrawList* self, Vector2 rect_min, Vector2 rect_max, float rounding, int rounding_corners_flags); + public static extern void igPushStyleColor(ImGuiCol idx, Vector4 col); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igIsMouseClicked(int button, byte repeat); + public static extern void igPushStyleVarFloat(ImGuiStyleVar idx, float val); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern float igCalcItemWidth(); + public static extern void igPushStyleVarVec2(ImGuiStyleVar idx, Vector2 val); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_PathArcToFast(ImDrawList* self, Vector2 centre, float radius, int a_min_of_12, int a_max_of_12); + public static extern void igPushTextWrapPos(float wrap_pos_x); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igEndChildFrame(); + public static extern byte igRadioButtonBool(byte* label, byte active); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igIndent(float indent_w); + public static extern byte igRadioButtonIntPtr(byte* label, int* v, int v_button); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igSetDragDropPayload(byte* type, void* data, uint size, ImGuiCond cond); + public static extern void igRender(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte GlyphRangesBuilder_GetBit(GlyphRangesBuilder* self, int n); + public static extern void igResetMouseDragDelta(int button); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte ImGuiTextFilter_Draw(ImGuiTextFilter* self, byte* label, float width); + public static extern void igSameLine(float pos_x, float spacing_w); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igShowDemoWindow(byte* p_open); + public static extern void igSaveIniSettingsToDisk(byte* ini_filename); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_PathStroke(ImDrawList* self, uint col, byte closed, float thickness); + public static extern byte* igSaveIniSettingsToMemory(uint* out_ini_size); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_PathFillConvex(ImDrawList* self, uint col); + public static extern byte igSelectable(byte* label, byte selected, ImGuiSelectableFlags flags, Vector2 size); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_PathLineToMergeDuplicate(ImDrawList* self, Vector2 pos); + public static extern byte igSelectableBoolPtr(byte* label, byte* p_selected, ImGuiSelectableFlags flags, Vector2 size); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igEndMenu(); + public static extern void igSeparator(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igColorButton(byte* desc_id, Vector4 col, ImGuiColorEditFlags flags, Vector2 size); + public static extern void igSetClipboardText(byte* text); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImFontAtlas_GetTexDataAsAlpha8(ImFontAtlas* self, byte** out_pixels, int* out_width, int* out_height, int* out_bytes_per_pixel); + public static extern void igSetColorEditOptions(ImGuiColorEditFlags flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igIsKeyReleased(int user_key_index); + public static extern void igSetColumnOffset(int column_index, float offset_x); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetClipboardText(byte* text); + public static extern void igSetColumnWidth(int column_index, float width); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_PathArcTo(ImDrawList* self, Vector2 centre, float radius, float a_min, float a_max, int num_segments); + public static extern void igSetCurrentContext(IntPtr ctx); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_AddConvexPolyFilled(ImDrawList* self, Vector2* points, int num_points, uint col); + public static extern void igSetCursorPos(Vector2 local_pos); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igIsWindowCollapsed(); + public static extern void igSetCursorPosX(float x); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igShowFontSelector(byte* label); + public static extern void igSetCursorPosY(float y); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igSetCursorScreenPos(Vector2 screen_pos); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igSetDragDropPayload(byte* type, void* data, uint size, ImGuiCond cond); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_AddImageQuad(ImDrawList* self, IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 c, Vector2 d, Vector2 uv_a, Vector2 uv_b, Vector2 uv_c, Vector2 uv_d, uint col); + public static extern void igSetItemAllowOverlap(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetNextWindowFocus(); + public static extern void igSetItemDefaultFocus(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igSameLine(float pos_x, float spacing_w); + public static extern void igSetKeyboardFocusHere(int offset); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igBegin(byte* name, byte* p_open, ImGuiWindowFlags flags); + public static extern void igSetMouseCursor(ImGuiMouseCursor type); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igColorEdit3(byte* label, Vector3* col, ImGuiColorEditFlags flags); + public static extern void igSetNextTreeNodeOpen(byte is_open, ImGuiCond cond); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_AddImage(ImDrawList* self, IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 uv_a, Vector2 uv_b, uint col); + public static extern void igSetNextWindowBgAlpha(float alpha); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImGuiIO_AddInputCharactersUTF8(ImGuiIO* self, byte* utf8_chars); + public static extern void igSetNextWindowCollapsed(byte collapsed, ImGuiCond cond); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_AddText(ImDrawList* self, Vector2 pos, uint col, byte* text_begin, byte* text_end); + public static extern void igSetNextWindowContentSize(Vector2 size); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_AddTextFontPtr(ImDrawList* self, ImFont* font, float font_size, Vector2 pos, uint col, byte* text_begin, byte* text_end, float wrap_width, Vector4* cpu_fine_clip_rect); + public static extern void igSetNextWindowFocus(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_AddCircleFilled(ImDrawList* self, Vector2 centre, float radius, uint col, int num_segments); + public static extern void igSetNextWindowPos(Vector2 pos, ImGuiCond cond, Vector2 pivot); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igInputFloat2(byte* label, Vector2* v, byte* format, ImGuiInputTextFlags extra_flags); + public static extern void igSetNextWindowSize(Vector2 size, ImGuiCond cond); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igPushButtonRepeat(byte repeat); + public static extern void igSetNextWindowSizeConstraints(Vector2 size_min, Vector2 size_max, ImGuiSizeCallback custom_callback, void* custom_callback_data); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igPopItemWidth(); + public static extern void igSetScrollFromPosY(float pos_y, float center_y_ratio); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_AddCircle(ImDrawList* self, Vector2 centre, float radius, uint col, int num_segments, float thickness); + public static extern void igSetScrollHere(float center_y_ratio); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_AddTriangleFilled(ImDrawList* self, Vector2 a, Vector2 b, Vector2 c, uint col); + public static extern void igSetScrollX(float scroll_x); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_AddTriangle(ImDrawList* self, Vector2 a, Vector2 b, Vector2 c, uint col, float thickness); + public static extern void igSetScrollY(float scroll_y); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_AddQuadFilled(ImDrawList* self, Vector2 a, Vector2 b, Vector2 c, Vector2 d, uint col); + public static extern void igSetStateStorage(ImGuiStorage* storage); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern float igGetFontSize(); + public static extern void igSetTooltip(byte* fmt); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igInputDouble(byte* label, double* v, double step, double step_fast, byte* format, ImGuiInputTextFlags extra_flags); + public static extern void igSetWindowCollapsedBool(byte collapsed, ImGuiCond cond); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_PrimReserve(ImDrawList* self, int idx_count, int vtx_count); + public static extern void igSetWindowCollapsedStr(byte* name, byte collapsed, ImGuiCond cond); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_AddRectFilledMultiColor(ImDrawList* self, Vector2 a, Vector2 b, uint col_upr_left, uint col_upr_right, uint col_bot_right, uint col_bot_left); + public static extern void igSetWindowFocus(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igEndPopup(); + public static extern void igSetWindowFocusStr(byte* name); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImFontAtlas_ClearInputData(ImFontAtlas* self); + public static extern void igSetWindowFontScale(float scale); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_AddLine(ImDrawList* self, Vector2 a, Vector2 b, uint col, float thickness); + public static extern void igSetWindowPosVec2(Vector2 pos, ImGuiCond cond); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igInputTextMultiline(byte* label, byte* buf, uint buf_size, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* user_data); + public static extern void igSetWindowPosStr(byte* name, Vector2 pos, ImGuiCond cond); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igSelectable(byte* label, byte selected, ImGuiSelectableFlags flags, Vector2 size); + public static extern void igSetWindowSizeVec2(Vector2 size, ImGuiCond cond); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igSelectableBoolPtr(byte* label, byte* p_selected, ImGuiSelectableFlags flags, Vector2 size); + public static extern void igSetWindowSizeStr(byte* name, Vector2 size, ImGuiCond cond); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igListBoxStr_arr(byte* label, int* current_item, byte** items, int items_count, int height_in_items); - [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetCursorPos_nonUDT2")] - public static extern Vector2 igGetCursorPos(); - [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "ImDrawList_GetClipRectMin_nonUDT2")] - public static extern Vector2 ImDrawList_GetClipRectMin(ImDrawList* self); + public static extern void igShowDemoWindow(byte* p_open); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_PopTextureID(ImDrawList* self); + public static extern void igShowFontSelector(byte* label); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igInputFloat4(byte* label, Vector4* v, byte* format, ImGuiInputTextFlags extra_flags); + public static extern void igShowMetricsWindow(byte* p_open); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetCursorPosY(float y); + public static extern void igShowStyleEditor(ImGuiStyle* @ref); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte* igGetVersion(); + public static extern byte igShowStyleSelector(byte* label); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igEndCombo(); + public static extern void igShowUserGuide(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igPushIDStr(byte* str_id); + public static extern byte igSliderAngle(byte* label, float* v_rad, float v_degrees_min, float v_degrees_max); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igPushIDRange(byte* str_id_begin, byte* str_id_end); + public static extern byte igSliderFloat(byte* label, float* v, float v_min, float v_max, byte* format, float power); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igPushIDPtr(void* ptr_id); + public static extern byte igSliderFloat2(byte* label, Vector2* v, float v_min, float v_max, byte* format, float power); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igPushIDInt(int int_id); + public static extern byte igSliderFloat3(byte* label, Vector3* v, float v_min, float v_max, byte* format, float power); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_ImDrawList(IntPtr shared_data); + public static extern byte igSliderFloat4(byte* label, Vector4* v, float v_min, float v_max, byte* format, float power); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawCmd_ImDrawCmd(); + public static extern byte igSliderInt(byte* label, int* v, int v_min, int v_max, byte* format); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImGuiListClipper_End(ImGuiListClipper* self); + public static extern byte igSliderInt2(byte* label, int* v, int v_min, int v_max, byte* format); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igAlignTextToFramePadding(); + public static extern byte igSliderInt3(byte* label, int* v, int v_min, int v_max, byte* format); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igPopStyleColor(int count); + public static extern byte igSliderInt4(byte* label, int* v, int v_min, int v_max, byte* format); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImGuiListClipper_Begin(ImGuiListClipper* self, int items_count, float items_height); + public static extern byte igSliderScalar(byte* label, ImGuiDataType data_type, void* v, void* v_min, void* v_max, byte* format, float power); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igText(byte* fmt); + public static extern byte igSliderScalarN(byte* label, ImGuiDataType data_type, void* v, int components, void* v_min, void* v_max, byte* format, float power); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte ImGuiListClipper_Step(ImGuiListClipper* self); + public static extern byte igSmallButton(byte* label); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern float igGetTextLineHeightWithSpacing(); + public static extern void igSpacing(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern float* ImGuiStorage_GetFloatRef(ImGuiStorage* self, uint key, float default_val); + public static extern void igStyleColorsClassic(ImGuiStyle* dst); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igEndTooltip(); + public static extern void igStyleColorsDark(ImGuiStyle* dst); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImGuiListClipper_ImGuiListClipper(int items_count, float items_height); + public static extern void igStyleColorsLight(ImGuiStyle* dst); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igDragInt(byte* label, int* v, float v_speed, int v_min, int v_max, byte* format); + public static extern void igText(byte* fmt); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igSliderFloat(byte* label, float* v, float v_min, float v_max, byte* format, float power); + public static extern void igTextColored(Vector4 col, byte* fmt); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern uint igColorConvertFloat4ToU32(Vector4 @in); + public static extern void igTextDisabled(byte* fmt); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImGuiIO_ClearInputCharacters(ImGuiIO* self); + public static extern void igTextUnformatted(byte* text, byte* text_end); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igPushClipRect(Vector2 clip_rect_min, Vector2 clip_rect_max, byte intersect_with_current_clip_rect); + public static extern void igTextWrapped(byte* fmt); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetColumnWidth(int column_index, float width); + public static extern void igTreeAdvanceToLabelPos(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte ImGuiPayload_IsDataType(ImGuiPayload* self, byte* type); + public static extern byte igTreeNodeStr(byte* label); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igBeginMainMenuBar(); + public static extern byte igTreeNodeStrStr(byte* str_id, byte* fmt); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void CustomRect_CustomRect(); + public static extern byte igTreeNodePtr(void* ptr_id, byte* fmt); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte ImGuiInputTextCallbackData_HasSelection(ImGuiInputTextCallbackData* self); + public static extern byte igTreeNodeExStr(byte* label, ImGuiTreeNodeFlags flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImGuiInputTextCallbackData_InsertChars(ImGuiInputTextCallbackData* self, int pos, byte* text, byte* text_end); + public static extern byte igTreeNodeExStrStr(byte* str_id, ImGuiTreeNodeFlags flags, byte* fmt); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte ImFontAtlas_GetMouseCursorTexData(ImFontAtlas* self, ImGuiMouseCursor cursor, Vector2* out_offset, Vector2* out_size, Vector2* out_uv_border, Vector2* out_uv_fill); + public static extern byte igTreeNodeExPtr(void* ptr_id, ImGuiTreeNodeFlags flags, byte* fmt); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igVSliderScalar(byte* label, Vector2 size, ImGuiDataType data_type, void* v, void* v_min, void* v_max, byte* format, float power); + public static extern void igTreePop(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImGuiStorage_SetAllInt(ImGuiStorage* self, int val); + public static extern void igTreePushStr(byte* str_id); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igStyleColorsLight(ImGuiStyle* dst); + public static extern void igTreePushPtr(void* ptr_id); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igSliderFloat3(byte* label, Vector3* v, float v_min, float v_max, byte* format, float power); + public static extern void igUnindent(float indent_w); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igDragFloat(byte* label, float* v, float v_speed, float v_min, float v_max, byte* format, float power); + public static extern void igValueBool(byte* prefix, byte b); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte* ImGuiStorage_GetBoolRef(ImGuiStorage* self, uint key, byte default_val); + public static extern void igValueInt(byte* prefix, int v); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern float igGetWindowHeight(); - [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetMousePosOnOpeningCurrentPopup_nonUDT2")] - public static extern Vector2 igGetMousePosOnOpeningCurrentPopup(); + public static extern void igValueUint(byte* prefix, uint v); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern int* ImGuiStorage_GetIntRef(ImGuiStorage* self, uint key, int default_val); + public static extern void igValueFloat(byte* prefix, float v, byte* float_format); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igCalcListClipping(int items_count, float items_height, int* out_items_display_start, int* out_items_display_end); + public static extern byte igVSliderFloat(byte* label, Vector2 size, float* v, float v_min, float v_max, byte* format, float power); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImGuiStorage_SetVoidPtr(ImGuiStorage* self, uint key, void* val); + public static extern byte igVSliderInt(byte* label, Vector2 size, int* v, int v_min, int v_max, byte* format); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igEndDragDropSource(); + public static extern byte igVSliderScalar(byte* label, Vector2 size, ImGuiDataType data_type, void* v, void* v_min, void* v_max, byte* format, float power); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "ImColor_HSV_nonUDT2")] + public static extern ImColor ImColor_HSV(ImColor* self, float h, float s, float v, float a); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImGuiStorage_BuildSortByKey(ImGuiStorage* self); + public static extern void ImColor_ImColor(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern float ImGuiStorage_GetFloat(ImGuiStorage* self, uint key, float default_val); + public static extern void ImColor_ImColorInt(int r, int g, int b, int a); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImGuiStorage_SetBool(ImGuiStorage* self, uint key, byte val); + public static extern void ImColor_ImColorU32(uint rgba); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte ImGuiStorage_GetBool(ImGuiStorage* self, uint key, byte default_val); + public static extern void ImColor_ImColorFloat(float r, float g, float b, float a); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern float igGetFrameHeightWithSpacing(); + public static extern void ImColor_ImColorVec4(Vector4 col); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImGuiStorage_SetInt(ImGuiStorage* self, uint key, int val); + public static extern void ImColor_SetHSV(ImColor* self, float h, float s, float v, float a); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igCloseCurrentPopup(); + public static extern void ImDrawCmd_ImDrawCmd(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImGuiTextBuffer_clear(ImGuiTextBuffer* self); + public static extern void ImDrawData_Clear(ImDrawData* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igBeginGroup(); + public static extern void ImDrawData_DeIndexAllBuffers(ImDrawData* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImGuiStorage_Clear(ImGuiStorage* self); + public static extern void ImDrawData_ImDrawData(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void Pair_PairInt(uint _key, int _val_i); + public static extern void ImDrawData_ScaleClipRects(ImDrawData* self, Vector2 sc); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void Pair_PairFloat(uint _key, float _val_f); + public static extern void ImDrawList_AddBezierCurve(ImDrawList* self, Vector2 pos0, Vector2 cp0, Vector2 cp1, Vector2 pos1, uint col, float thickness, int num_segments); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void Pair_PairPtr(uint _key, void* _val_p); + public static extern void ImDrawList_AddCallback(ImDrawList* self, IntPtr callback, void* callback_data); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImGuiTextBuffer_appendf(ImGuiTextBuffer* self, byte* fmt); + public static extern void ImDrawList_AddCircle(ImDrawList* self, Vector2 centre, float radius, uint col, int num_segments, float thickness); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte* ImGuiTextBuffer_c_str(ImGuiTextBuffer* self); + public static extern void ImDrawList_AddCircleFilled(ImDrawList* self, Vector2 centre, float radius, uint col, int num_segments); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImGuiTextBuffer_reserve(ImGuiTextBuffer* self, int capacity); + public static extern void ImDrawList_AddConvexPolyFilled(ImDrawList* self, Vector2* points, int num_points, uint col); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igSliderScalar(byte* label, ImGuiDataType data_type, void* v, void* v_min, void* v_max, byte* format, float power); + public static extern void ImDrawList_AddDrawCmd(ImDrawList* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igBeginCombo(byte* label, byte* preview_value, ImGuiComboFlags flags); + public static extern void ImDrawList_AddImage(ImDrawList* self, IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 uv_a, Vector2 uv_b, uint col); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern int ImGuiTextBuffer_size(ImGuiTextBuffer* self); + public static extern void ImDrawList_AddImageQuad(ImDrawList* self, IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 c, Vector2 d, Vector2 uv_a, Vector2 uv_b, Vector2 uv_c, Vector2 uv_d, uint col); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igBeginMenu(byte* label, byte enabled); + public static extern void ImDrawList_AddImageRounded(ImDrawList* self, IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 uv_a, Vector2 uv_b, uint col, float rounding, int rounding_corners); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igIsItemHovered(ImGuiHoveredFlags flags); + public static extern void ImDrawList_AddLine(ImDrawList* self, Vector2 a, Vector2 b, uint col, float thickness); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_PrimWriteVtx(ImDrawList* self, Vector2 pos, Vector2 uv, uint col); + public static extern void ImDrawList_AddPolyline(ImDrawList* self, Vector2* points, int num_points, uint col, byte closed, float thickness); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igBullet(); + public static extern void ImDrawList_AddQuad(ImDrawList* self, Vector2 a, Vector2 b, Vector2 c, Vector2 d, uint col, float thickness); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igInputText(byte* label, byte* buf, uint buf_size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* user_data); + public static extern void ImDrawList_AddQuadFilled(ImDrawList* self, Vector2 a, Vector2 b, Vector2 c, Vector2 d, uint col); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igInputInt3(byte* label, int* v, ImGuiInputTextFlags extra_flags); + public static extern void ImDrawList_AddRect(ImDrawList* self, Vector2 a, Vector2 b, uint col, float rounding, int rounding_corners_flags, float thickness); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImGuiIO_ImGuiIO(); + public static extern void ImDrawList_AddRectFilled(ImDrawList* self, Vector2 a, Vector2 b, uint col, float rounding, int rounding_corners_flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igStyleColorsDark(ImGuiStyle* dst); + public static extern void ImDrawList_AddRectFilledMultiColor(ImDrawList* self, Vector2 a, Vector2 b, uint col_upr_left, uint col_upr_right, uint col_bot_right, uint col_bot_left); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igInputInt(byte* label, int* v, int step, int step_fast, ImGuiInputTextFlags extra_flags); + public static extern void ImDrawList_AddText(ImDrawList* self, Vector2 pos, uint col, byte* text_begin, byte* text_end); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetWindowFontScale(float scale); + public static extern void ImDrawList_AddTextFontPtr(ImDrawList* self, ImFont* font, float font_size, Vector2 pos, uint col, byte* text_begin, byte* text_end, float wrap_width, Vector4* cpu_fine_clip_rect); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igSliderInt(byte* label, int* v, int v_min, int v_max, byte* format); + public static extern void ImDrawList_AddTriangle(ImDrawList* self, Vector2 a, Vector2 b, Vector2 c, uint col, float thickness); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte* TextRange_end(TextRange* self); + public static extern void ImDrawList_AddTriangleFilled(ImDrawList* self, Vector2 a, Vector2 b, Vector2 c, uint col); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte* TextRange_begin(TextRange* self); + public static extern void ImDrawList_ChannelsMerge(ImDrawList* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetNextWindowPos(Vector2 pos, ImGuiCond cond, Vector2 pivot); + public static extern void ImDrawList_ChannelsSetCurrent(ImDrawList* self, int channel_index); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igDragInt3(byte* label, int* v, float v_speed, int v_min, int v_max, byte* format); + public static extern void ImDrawList_ChannelsSplit(ImDrawList* self, int channels_count); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igOpenPopup(byte* str_id); + public static extern void ImDrawList_Clear(ImDrawList* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void TextRange_TextRange(); + public static extern void ImDrawList_ClearFreeMemory(ImDrawList* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void TextRange_TextRangeStr(byte* _b, byte* _e); + public static extern ImDrawList* ImDrawList_CloneOutput(ImDrawList* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "ImDrawList_GetClipRectMax_nonUDT2")] public static extern Vector2 ImDrawList_GetClipRectMax(ImDrawList* self); - [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igCalcTextSize_nonUDT2")] - public static extern Vector2 igCalcTextSize(byte* text, byte* text_end, byte hide_text_after_double_hash, float wrap_width); - [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr igGetDrawListSharedData(); - [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igColumns(int count, byte* id, byte border); - [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igIsItemActive(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "ImDrawList_GetClipRectMin_nonUDT2")] + public static extern Vector2 ImDrawList_GetClipRectMin(ImDrawList* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImGuiTextFilter_ImGuiTextFilter(byte* default_filter); + public static extern void ImDrawList_ImDrawList(IntPtr shared_data); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImGuiOnceUponAFrame_ImGuiOnceUponAFrame(); + public static extern void ImDrawList_PathArcTo(ImDrawList* self, Vector2 centre, float radius, float a_min, float a_max, int num_segments); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igBeginDragDropTarget(); + public static extern void ImDrawList_PathArcToFast(ImDrawList* self, Vector2 centre, float radius, int a_min_of_12, int a_max_of_12); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte TextRange_empty(TextRange* self); + public static extern void ImDrawList_PathBezierCurveTo(ImDrawList* self, Vector2 p1, Vector2 p2, Vector2 p3, int num_segments); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte ImGuiPayload_IsDelivery(ImGuiPayload* self); + public static extern void ImDrawList_PathClear(ImDrawList* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImGuiIO_AddInputCharacter(ImGuiIO* self, ushort c); + public static extern void ImDrawList_PathFillConvex(ImDrawList* self, uint col); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_AddImageRounded(ImDrawList* self, IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 uv_a, Vector2 uv_b, uint col, float rounding, int rounding_corners); + public static extern void ImDrawList_PathLineTo(ImDrawList* self, Vector2 pos); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImGuiStyle_ImGuiStyle(); + public static extern void ImDrawList_PathLineToMergeDuplicate(ImDrawList* self, Vector2 pos); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igColorPicker3(byte* label, Vector3* col, ImGuiColorEditFlags flags); - [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetContentRegionMax_nonUDT2")] - public static extern Vector2 igGetContentRegionMax(); + public static extern void ImDrawList_PathRect(ImDrawList* self, Vector2 rect_min, Vector2 rect_max, float rounding, int rounding_corners_flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igBeginChildFrame(uint id, Vector2 size, ImGuiWindowFlags flags); + public static extern void ImDrawList_PathStroke(ImDrawList* self, uint col, byte closed, float thickness); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igSaveIniSettingsToDisk(byte* ini_filename); + public static extern void ImDrawList_PopClipRect(ImDrawList* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImFont_ClearOutputData(ImFont* self); + public static extern void ImDrawList_PopTextureID(ImDrawList* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImDrawList_PrimQuadUV(ImDrawList* self, Vector2 a, Vector2 b, Vector2 c, Vector2 d, Vector2 uv_a, Vector2 uv_b, Vector2 uv_c, Vector2 uv_d, uint col); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igEndDragDropTarget(); + public static extern void ImDrawList_PrimRect(ImDrawList* self, Vector2 a, Vector2 b, uint col); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern ushort* ImFontAtlas_GetGlyphRangesKorean(ImFontAtlas* self); + public static extern void ImDrawList_PrimRectUV(ImDrawList* self, Vector2 a, Vector2 b, Vector2 uv_a, Vector2 uv_b, uint col); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern int igGetKeyPressedAmount(int key_index, float repeat_delay, float rate); + public static extern void ImDrawList_PrimReserve(ImDrawList* self, int idx_count, int vtx_count); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImFontAtlas_GetTexDataAsRGBA32(ImFontAtlas* self, byte** out_pixels, int* out_width, int* out_height, int* out_bytes_per_pixel); + public static extern void ImDrawList_PrimVtx(ImDrawList* self, Vector2 pos, Vector2 uv, uint col); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igNewFrame(); + public static extern void ImDrawList_PrimWriteIdx(ImDrawList* self, ushort idx); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igResetMouseDragDelta(int button); + public static extern void ImDrawList_PrimWriteVtx(ImDrawList* self, Vector2 pos, Vector2 uv, uint col); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern float igGetTreeNodeToLabelSpacing(); - [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetMousePos_nonUDT2")] - public static extern Vector2 igGetMousePos(); + public static extern void ImDrawList_PushClipRect(ImDrawList* self, Vector2 clip_rect_min, Vector2 clip_rect_max, byte intersect_with_current_clip_rect); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void GlyphRangesBuilder_AddChar(GlyphRangesBuilder* self, ushort c); + public static extern void ImDrawList_PushClipRectFullScreen(ImDrawList* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igPopID(); + public static extern void ImDrawList_PushTextureID(ImDrawList* self, IntPtr texture_id); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igIsMouseDoubleClicked(int button); + public static extern void ImDrawList_UpdateClipRect(ImDrawList* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igStyleColorsClassic(ImGuiStyle* dst); + public static extern void ImDrawList_UpdateTextureID(ImDrawList* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte ImGuiTextFilter_IsActive(ImGuiTextFilter* self); + public static extern void ImFont_AddGlyph(ImFont* self, ushort c, float x0, float y0, float x1, float y1, float u0, float v0, float u1, float v1, float advance_x); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_PathClear(ImDrawList* self); + public static extern void ImFont_AddRemapChar(ImFont* self, ushort dst, ushort src, byte overwrite_dst); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetWindowFocus(); + public static extern void ImFont_BuildLookupTable(ImFont* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "ImFont_CalcTextSizeA_nonUDT2")] + public static extern Vector2 ImFont_CalcTextSizeA(ImFont* self, float size, float max_width, float wrap_width, byte* text_begin, byte* text_end, byte** remaining); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetWindowFocusStr(byte* name); + public static extern byte* ImFont_CalcWordWrapPositionA(ImFont* self, float scale, byte* text, byte* text_end, float wrap_width); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igColorConvertHSVtoRGB(float h, float s, float v, float* out_r, float* out_g, float* out_b); + public static extern void ImFont_ClearOutputData(ImFont* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImColor_ImColor(); + public static extern ImFontGlyph* ImFont_FindGlyph(ImFont* self, ushort c); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImColor_ImColorInt(int r, int g, int b, int a); + public static extern ImFontGlyph* ImFont_FindGlyphNoFallback(ImFont* self, ushort c); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImColor_ImColorU32(uint rgba); + public static extern float ImFont_GetCharAdvance(ImFont* self, ushort c); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImColor_ImColorFloat(float r, float g, float b, float a); + public static extern byte* ImFont_GetDebugName(ImFont* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImColor_ImColorVec4(Vector4 col); + public static extern void ImFont_GrowIndex(ImFont* self, int new_size); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igVSliderFloat(byte* label, Vector2 size, float* v, float v_min, float v_max, byte* format, float power); - [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igColorConvertU32ToFloat4_nonUDT2")] - public static extern Vector4 igColorConvertU32ToFloat4(uint @in); + public static extern void ImFont_ImFont(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igPopTextWrapPos(); + public static extern byte ImFont_IsLoaded(ImFont* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImGuiTextFilter_Clear(ImGuiTextFilter* self); + public static extern void ImFont_RenderChar(ImFont* self, ImDrawList* draw_list, float size, Vector2 pos, uint col, ushort c); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern float igGetColumnWidth(int column_index); + public static extern void ImFont_RenderText(ImFont* self, ImDrawList* draw_list, float size, Vector2 pos, uint col, Vector4 clip_rect, byte* text_begin, byte* text_end, float wrap_width, byte cpu_fine_clip); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igEndMenuBar(); + public static extern void ImFont_SetFallbackChar(ImFont* self, ushort c); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte* igGetStyleColorName(ImGuiCol idx); + public static extern int ImFontAtlas_AddCustomRectFontGlyph(ImFontAtlas* self, ImFont* font, ushort id, int width, int height, float advance_x, Vector2 offset); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igIsMouseDragging(int button, float lock_threshold); + public static extern int ImFontAtlas_AddCustomRectRegular(ImFontAtlas* self, uint id, int width, int height); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_PrimWriteIdx(ImDrawList* self, ushort idx); + public static extern ImFont* ImFontAtlas_AddFont(ImFontAtlas* self, ImFontConfig* font_cfg); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImGuiStyle_ScaleAllSizes(ImGuiStyle* self, float scale_factor); + public static extern ImFont* ImFontAtlas_AddFontDefault(ImFontAtlas* self, ImFontConfig* font_cfg); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igPushStyleColorU32(ImGuiCol idx, uint col); + public static extern ImFont* ImFontAtlas_AddFontFromFileTTF(ImFontAtlas* self, byte* filename, float size_pixels, ImFontConfig* font_cfg, ushort* glyph_ranges); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igPushStyleColor(ImGuiCol idx, Vector4 col); + public static extern ImFont* ImFontAtlas_AddFontFromMemoryCompressedBase85TTF(ImFontAtlas* self, byte* compressed_font_data_base85, float size_pixels, ImFontConfig* font_cfg, ushort* glyph_ranges); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void* igMemAlloc(uint size); + public static extern ImFont* ImFontAtlas_AddFontFromMemoryCompressedTTF(ImFontAtlas* self, void* compressed_font_data, int compressed_font_size, float size_pixels, ImFontConfig* font_cfg, ushort* glyph_ranges); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetCurrentContext(IntPtr ctx); + public static extern ImFont* ImFontAtlas_AddFontFromMemoryTTF(ImFontAtlas* self, void* font_data, int font_size, float size_pixels, ImFontConfig* font_cfg, ushort* glyph_ranges); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igPushItemWidth(float item_width); + public static extern byte ImFontAtlas_Build(ImFontAtlas* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igIsWindowAppearing(); + public static extern void ImFontAtlas_CalcCustomRectUV(ImFontAtlas* self, CustomRect* rect, Vector2* out_uv_min, Vector2* out_uv_max); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern ImGuiStyle* igGetStyle(); + public static extern void ImFontAtlas_Clear(ImFontAtlas* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetItemAllowOverlap(); + public static extern void ImFontAtlas_ClearFonts(ImFontAtlas* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igEndChild(); + public static extern void ImFontAtlas_ClearInputData(ImFontAtlas* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igCollapsingHeader(byte* label, ImGuiTreeNodeFlags flags); + public static extern void ImFontAtlas_ClearTexData(ImFontAtlas* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igCollapsingHeaderBoolPtr(byte* label, byte* p_open, ImGuiTreeNodeFlags flags); + public static extern CustomRect* ImFontAtlas_GetCustomRectByIndex(ImFontAtlas* self, int index); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igDragFloatRange2(byte* label, float* v_current_min, float* v_current_max, float v_speed, float v_min, float v_max, byte* format, byte* format_max, float power); + public static extern ushort* ImFontAtlas_GetGlyphRangesChineseFull(ImFontAtlas* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetMouseCursor(ImGuiMouseCursor type); - [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetWindowContentRegionMax_nonUDT2")] - public static extern Vector2 igGetWindowContentRegionMax(); + public static extern ushort* ImFontAtlas_GetGlyphRangesChineseSimplifiedCommon(ImFontAtlas* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igInputScalar(byte* label, ImGuiDataType data_type, void* v, void* step, void* step_fast, byte* format, ImGuiInputTextFlags extra_flags); + public static extern ushort* ImFontAtlas_GetGlyphRangesCyrillic(ImFontAtlas* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_PushClipRectFullScreen(ImDrawList* self); + public static extern ushort* ImFontAtlas_GetGlyphRangesDefault(ImFontAtlas* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern uint igGetColorU32(ImGuiCol idx, float alpha_mul); + public static extern ushort* ImFontAtlas_GetGlyphRangesJapanese(ImFontAtlas* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern uint igGetColorU32Vec4(Vector4 col); + public static extern ushort* ImFontAtlas_GetGlyphRangesKorean(ImFontAtlas* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern uint igGetColorU32U32(uint col); + public static extern ushort* ImFontAtlas_GetGlyphRangesThai(ImFontAtlas* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern double igGetTime(); + public static extern byte ImFontAtlas_GetMouseCursorTexData(ImFontAtlas* self, ImGuiMouseCursor cursor, Vector2* out_offset, Vector2* out_size, Vector2* out_uv_border, Vector2* out_uv_fill); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_ChannelsMerge(ImDrawList* self); + public static extern void ImFontAtlas_GetTexDataAsAlpha8(ImFontAtlas* self, byte** out_pixels, int* out_width, int* out_height, int* out_bytes_per_pixel); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern int igGetColumnIndex(); + public static extern void ImFontAtlas_GetTexDataAsRGBA32(ImFontAtlas* self, byte** out_pixels, int* out_width, int* out_height, int* out_bytes_per_pixel); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igBeginPopupContextItem(byte* str_id, int mouse_button); + public static extern void ImFontAtlas_ImFontAtlas(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetCursorPosX(float x); - [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetItemRectSize_nonUDT2")] - public static extern Vector2 igGetItemRectSize(); + public static extern byte ImFontAtlas_IsBuilt(ImFontAtlas* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igArrowButton(byte* str_id, ImGuiDir dir); + public static extern void ImFontAtlas_SetTexID(ImFontAtlas* self, IntPtr id); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern ImGuiMouseCursor igGetMouseCursor(); + public static extern void ImFontConfig_ImFontConfig(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igPushAllowKeyboardFocus(byte allow_keyboard_focus); + public static extern void ImGuiInputTextCallbackData_DeleteChars(ImGuiInputTextCallbackData* self, int pos, int bytes_count); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern float igGetScrollY(); + public static extern byte ImGuiInputTextCallbackData_HasSelection(ImGuiInputTextCallbackData* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetColumnOffset(int column_index, float offset_x); + public static extern void ImGuiInputTextCallbackData_ImGuiInputTextCallbackData(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte* ImGuiTextBuffer_begin(ImGuiTextBuffer* self); + public static extern void ImGuiInputTextCallbackData_InsertChars(ImGuiInputTextCallbackData* self, int pos, byte* text, byte* text_end); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetWindowPosVec2(Vector2 pos, ImGuiCond cond); + public static extern void ImGuiIO_AddInputCharacter(ImGuiIO* self, ushort c); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetWindowPosStr(byte* name, Vector2 pos, ImGuiCond cond); + public static extern void ImGuiIO_AddInputCharactersUTF8(ImGuiIO* self, byte* utf8_chars); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetKeyboardFocusHere(int offset); + public static extern void ImGuiIO_ClearInputCharacters(ImGuiIO* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern float igGetCursorPosY(); + public static extern void ImGuiIO_ImGuiIO(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern int ImFontAtlas_AddCustomRectFontGlyph(ImFontAtlas* self, ImFont* font, ushort id, int width, int height, float advance_x, Vector2 offset); + public static extern void ImGuiListClipper_Begin(ImGuiListClipper* self, int items_count, float items_height); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igEndMainMenuBar(); + public static extern void ImGuiListClipper_End(ImGuiListClipper* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern float igGetContentRegionAvailWidth(); + public static extern void ImGuiListClipper_ImGuiListClipper(int items_count, float items_height); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igIsKeyDown(int user_key_index); + public static extern byte ImGuiListClipper_Step(ImGuiListClipper* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igIsMouseDown(int button); - [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetWindowContentRegionMin_nonUDT2")] - public static extern Vector2 igGetWindowContentRegionMin(); + public static extern void ImGuiOnceUponAFrame_ImGuiOnceUponAFrame(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igLogButtons(); + public static extern void ImGuiPayload_Clear(ImGuiPayload* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern float igGetWindowContentRegionWidth(); + public static extern void ImGuiPayload_ImGuiPayload(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igSliderAngle(byte* label, float* v_rad, float v_degrees_min, float v_degrees_max); + public static extern byte ImGuiPayload_IsDataType(ImGuiPayload* self, byte* type); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igTreeNodeExStr(byte* label, ImGuiTreeNodeFlags flags); + public static extern byte ImGuiPayload_IsDelivery(ImGuiPayload* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igTreeNodeExStrStr(byte* str_id, ImGuiTreeNodeFlags flags, byte* fmt); + public static extern byte ImGuiPayload_IsPreview(ImGuiPayload* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igTreeNodeExPtr(void* ptr_id, ImGuiTreeNodeFlags flags, byte* fmt); + public static extern void ImGuiStorage_BuildSortByKey(ImGuiStorage* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern float igGetWindowWidth(); + public static extern void ImGuiStorage_Clear(ImGuiStorage* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igPushTextWrapPos(float wrap_pos_x); + public static extern byte ImGuiStorage_GetBool(ImGuiStorage* self, uint key, byte default_val); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern int ImGuiStorage_GetInt(ImGuiStorage* self, uint key, int default_val); + public static extern byte* ImGuiStorage_GetBoolRef(ImGuiStorage* self, uint key, byte default_val); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igSliderInt3(byte* label, int* v, int v_min, int v_max, byte* format); + public static extern float ImGuiStorage_GetFloat(ImGuiStorage* self, uint key, float default_val); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igShowUserGuide(); + public static extern float* ImGuiStorage_GetFloatRef(ImGuiStorage* self, uint key, float default_val); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igSliderScalarN(byte* label, ImGuiDataType data_type, void* v, int components, void* v_min, void* v_max, byte* format, float power); - [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "ImColor_HSV_nonUDT2")] - public static extern ImColor ImColor_HSV(ImColor* self, float h, float s, float v, float a); + public static extern int ImGuiStorage_GetInt(ImGuiStorage* self, uint key, int default_val); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_PathLineTo(ImDrawList* self, Vector2 pos); + public static extern int* ImGuiStorage_GetIntRef(ImGuiStorage* self, uint key, int default_val); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igImage(IntPtr user_texture_id, Vector2 size, Vector2 uv0, Vector2 uv1, Vector4 tint_col, Vector4 border_col); + public static extern void* ImGuiStorage_GetVoidPtr(ImGuiStorage* self, uint key); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetNextWindowSizeConstraints(Vector2 size_min, Vector2 size_max, ImGuiSizeCallback custom_callback, void* custom_callback_data); + public static extern void** ImGuiStorage_GetVoidPtrRef(ImGuiStorage* self, uint key, void* default_val); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igVSliderInt(byte* label, Vector2 size, int* v, int v_min, int v_max, byte* format); + public static extern void ImGuiStorage_SetAllInt(ImGuiStorage* self, int val); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImGuiTextBuffer_ImGuiTextBuffer(); + public static extern void ImGuiStorage_SetBool(ImGuiStorage* self, uint key, byte val); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igBulletText(byte* fmt); + public static extern void ImGuiStorage_SetFloat(ImGuiStorage* self, uint key, float val); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igColorEdit4(byte* label, Vector4* col, ImGuiColorEditFlags flags); + public static extern void ImGuiStorage_SetInt(ImGuiStorage* self, uint key, int val); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igColorPicker4(byte* label, Vector4* col, ImGuiColorEditFlags flags, float* ref_col); + public static extern void ImGuiStorage_SetVoidPtr(ImGuiStorage* self, uint key, void* val); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_PrimRectUV(ImDrawList* self, Vector2 a, Vector2 b, Vector2 uv_a, Vector2 uv_b, uint col); + public static extern void ImGuiStyle_ImGuiStyle(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igInvisibleButton(byte* str_id, Vector2 size); + public static extern void ImGuiStyle_ScaleAllSizes(ImGuiStyle* self, float scale_factor); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igLogToClipboard(int max_depth); + public static extern void ImGuiTextBuffer_appendf(ImGuiTextBuffer* self, byte* fmt); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igBeginPopupContextWindow(byte* str_id, int mouse_button, byte also_over_items); + public static extern byte* ImGuiTextBuffer_begin(ImGuiTextBuffer* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImFontAtlas_ImFontAtlas(); + public static extern byte* ImGuiTextBuffer_c_str(ImGuiTextBuffer* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igDragScalar(byte* label, ImGuiDataType data_type, void* v, float v_speed, void* v_min, void* v_max, byte* format, float power); + public static extern void ImGuiTextBuffer_clear(ImGuiTextBuffer* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetItemDefaultFocus(); + public static extern byte ImGuiTextBuffer_empty(ImGuiTextBuffer* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igCaptureMouseFromApp(byte capture); + public static extern byte* ImGuiTextBuffer_end(ImGuiTextBuffer* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igIsAnyItemHovered(); + public static extern void ImGuiTextBuffer_ImGuiTextBuffer(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igPushFont(ImFont* font); + public static extern void ImGuiTextBuffer_reserve(ImGuiTextBuffer* self, int capacity); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igTreePop(); + public static extern int ImGuiTextBuffer_size(ImGuiTextBuffer* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igEnd(); + public static extern void ImGuiTextFilter_Build(ImGuiTextFilter* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawData_ImDrawData(); + public static extern void ImGuiTextFilter_Clear(ImGuiTextFilter* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igDestroyContext(IntPtr ctx); + public static extern byte ImGuiTextFilter_Draw(ImGuiTextFilter* self, byte* label, float width); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte* ImGuiTextBuffer_end(ImGuiTextBuffer* self); + public static extern void ImGuiTextFilter_ImGuiTextFilter(byte* default_filter); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igPopStyleVar(int count); + public static extern byte ImGuiTextFilter_IsActive(ImGuiTextFilter* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern byte ImGuiTextFilter_PassFilter(ImGuiTextFilter* self, byte* text, byte* text_end); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igInputScalarN(byte* label, ImGuiDataType data_type, void* v, int components, void* step, void* step_fast, byte* format, ImGuiInputTextFlags extra_flags); + public static extern void ImVec2_ImVec2(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igTreeNodeStr(byte* label); + public static extern void ImVec2_ImVec2Float(float _x, float _y); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igTreeNodeStrStr(byte* str_id, byte* fmt); + public static extern void ImVec4_ImVec4(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igTreeNodePtr(void* ptr_id, byte* fmt); + public static extern void ImVec4_ImVec4Float(float _x, float _y, float _z, float _w); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern float igGetScrollMaxX(); + public static extern void Pair_PairInt(uint _key, int _val_i); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetTooltip(byte* fmt); - [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetContentRegionAvail_nonUDT2")] - public static extern Vector2 igGetContentRegionAvail(); + public static extern void Pair_PairFloat(uint _key, float _val_f); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igInputFloat3(byte* label, Vector3* v, byte* format, ImGuiInputTextFlags extra_flags); + public static extern void Pair_PairPtr(uint _key, void* _val_p); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igDragFloat2(byte* label, Vector2* v, float v_speed, float v_min, float v_max, byte* format, float power); + public static extern byte* TextRange_begin(TextRange* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte TextRange_empty(TextRange* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte* TextRange_end(TextRange* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void TextRange_split(TextRange* self, byte separator, ImVector* @out); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void TextRange_TextRange(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void TextRange_TextRangeStr(byte* _b, byte* _e); } } diff --git a/src/ImGui.NET/Generated/ImGuiPayload.gen.cs b/src/ImGui.NET/Generated/ImGuiPayload.gen.cs index 532ed21..d6f8af7 100644 --- a/src/ImGui.NET/Generated/ImGuiPayload.gen.cs +++ b/src/ImGui.NET/Generated/ImGuiPayload.gen.cs @@ -36,11 +36,6 @@ namespace ImGuiNET { ImGuiNative.ImGuiPayload_Clear(NativePtr); } - public bool IsPreview() - { - byte ret = ImGuiNative.ImGuiPayload_IsPreview(NativePtr); - return ret != 0; - } public bool IsDataType(string type) { byte* native_type; @@ -64,5 +59,10 @@ namespace ImGuiNET byte ret = ImGuiNative.ImGuiPayload_IsDelivery(NativePtr); return ret != 0; } + public bool IsPreview() + { + byte ret = ImGuiNative.ImGuiPayload_IsPreview(NativePtr); + return ret != 0; + } } } diff --git a/src/ImGui.NET/Generated/ImGuiStorage.gen.cs b/src/ImGui.NET/Generated/ImGuiStorage.gen.cs index 106a61a..a65b7af 100644 --- a/src/ImGui.NET/Generated/ImGuiStorage.gen.cs +++ b/src/ImGui.NET/Generated/ImGuiStorage.gen.cs @@ -18,26 +18,48 @@ namespace ImGuiNET public static implicit operator ImGuiStorage* (ImGuiStoragePtr wrappedPtr) => wrappedPtr.NativePtr; public static implicit operator ImGuiStoragePtr(IntPtr nativePtr) => new ImGuiStoragePtr(nativePtr); public ImVector Data => new ImVector(NativePtr->Data); - public void** GetVoidPtrRef(uint key) + public void BuildSortByKey() { - void* default_val = null; - void** ret = ImGuiNative.ImGuiStorage_GetVoidPtrRef(NativePtr, key, default_val); + ImGuiNative.ImGuiStorage_BuildSortByKey(NativePtr); + } + public void Clear() + { + ImGuiNative.ImGuiStorage_Clear(NativePtr); + } + public bool GetBool(uint key) + { + byte default_val = 0; + byte ret = ImGuiNative.ImGuiStorage_GetBool(NativePtr, key, default_val); + return ret != 0; + } + public bool GetBool(uint key, bool default_val) + { + byte native_default_val = default_val ? (byte)1 : (byte)0; + byte ret = ImGuiNative.ImGuiStorage_GetBool(NativePtr, key, native_default_val); + return ret != 0; + } + public byte* GetBoolRef(uint key) + { + byte default_val = 0; + byte* ret = ImGuiNative.ImGuiStorage_GetBoolRef(NativePtr, key, default_val); return ret; } - public void** GetVoidPtrRef(uint key, IntPtr default_val) + public byte* GetBoolRef(uint key, bool default_val) { - void* native_default_val = (void*)default_val.ToPointer(); - void** ret = ImGuiNative.ImGuiStorage_GetVoidPtrRef(NativePtr, key, native_default_val); + byte native_default_val = default_val ? (byte)1 : (byte)0; + byte* ret = ImGuiNative.ImGuiStorage_GetBoolRef(NativePtr, key, native_default_val); return ret; } - public void SetFloat(uint key, float val) + public float GetFloat(uint key) { - ImGuiNative.ImGuiStorage_SetFloat(NativePtr, key, val); + float default_val = 0.0f; + float ret = ImGuiNative.ImGuiStorage_GetFloat(NativePtr, key, default_val); + return ret; } - public IntPtr GetVoidPtr(uint key) + public float GetFloat(uint key, float default_val) { - void* ret = ImGuiNative.ImGuiStorage_GetVoidPtr(NativePtr, key); - return (IntPtr)ret; + float ret = ImGuiNative.ImGuiStorage_GetFloat(NativePtr, key, default_val); + return ret; } public float* GetFloatRef(uint key) { @@ -50,20 +72,15 @@ namespace ImGuiNET float* ret = ImGuiNative.ImGuiStorage_GetFloatRef(NativePtr, key, default_val); return ret; } - public void SetAllInt(int val) - { - ImGuiNative.ImGuiStorage_SetAllInt(NativePtr, val); - } - public byte* GetBoolRef(uint key) + public int GetInt(uint key) { - byte default_val = 0; - byte* ret = ImGuiNative.ImGuiStorage_GetBoolRef(NativePtr, key, default_val); + int default_val = 0; + int ret = ImGuiNative.ImGuiStorage_GetInt(NativePtr, key, default_val); return ret; } - public byte* GetBoolRef(uint key, bool default_val) + public int GetInt(uint key, int default_val) { - byte native_default_val = default_val ? (byte)1 : (byte)0; - byte* ret = ImGuiNative.ImGuiStorage_GetBoolRef(NativePtr, key, native_default_val); + int ret = ImGuiNative.ImGuiStorage_GetInt(NativePtr, key, default_val); return ret; } public int* GetIntRef(uint key) @@ -77,61 +94,44 @@ namespace ImGuiNET int* ret = ImGuiNative.ImGuiStorage_GetIntRef(NativePtr, key, default_val); return ret; } - public void SetVoidPtr(uint key, IntPtr val) + public IntPtr GetVoidPtr(uint key) { - void* native_val = (void*)val.ToPointer(); - ImGuiNative.ImGuiStorage_SetVoidPtr(NativePtr, key, native_val); + void* ret = ImGuiNative.ImGuiStorage_GetVoidPtr(NativePtr, key); + return (IntPtr)ret; } - public void BuildSortByKey() + public void** GetVoidPtrRef(uint key) { - ImGuiNative.ImGuiStorage_BuildSortByKey(NativePtr); + void* default_val = null; + void** ret = ImGuiNative.ImGuiStorage_GetVoidPtrRef(NativePtr, key, default_val); + return ret; } - public float GetFloat(uint key) + public void** GetVoidPtrRef(uint key, IntPtr default_val) { - float default_val = 0.0f; - float ret = ImGuiNative.ImGuiStorage_GetFloat(NativePtr, key, default_val); + void* native_default_val = (void*)default_val.ToPointer(); + void** ret = ImGuiNative.ImGuiStorage_GetVoidPtrRef(NativePtr, key, native_default_val); return ret; } - public float GetFloat(uint key, float default_val) + public void SetAllInt(int val) { - float ret = ImGuiNative.ImGuiStorage_GetFloat(NativePtr, key, default_val); - return ret; + ImGuiNative.ImGuiStorage_SetAllInt(NativePtr, val); } public void SetBool(uint key, bool val) { byte native_val = val ? (byte)1 : (byte)0; ImGuiNative.ImGuiStorage_SetBool(NativePtr, key, native_val); } - public bool GetBool(uint key) - { - byte default_val = 0; - byte ret = ImGuiNative.ImGuiStorage_GetBool(NativePtr, key, default_val); - return ret != 0; - } - public bool GetBool(uint key, bool default_val) + public void SetFloat(uint key, float val) { - byte native_default_val = default_val ? (byte)1 : (byte)0; - byte ret = ImGuiNative.ImGuiStorage_GetBool(NativePtr, key, native_default_val); - return ret != 0; + ImGuiNative.ImGuiStorage_SetFloat(NativePtr, key, val); } public void SetInt(uint key, int val) { ImGuiNative.ImGuiStorage_SetInt(NativePtr, key, val); } - public void Clear() - { - ImGuiNative.ImGuiStorage_Clear(NativePtr); - } - public int GetInt(uint key) - { - int default_val = 0; - int ret = ImGuiNative.ImGuiStorage_GetInt(NativePtr, key, default_val); - return ret; - } - public int GetInt(uint key, int default_val) + public void SetVoidPtr(uint key, IntPtr val) { - int ret = ImGuiNative.ImGuiStorage_GetInt(NativePtr, key, default_val); - return ret; + void* native_val = (void*)val.ToPointer(); + ImGuiNative.ImGuiStorage_SetVoidPtr(NativePtr, key, native_val); } } } diff --git a/src/ImGui.NET/Generated/ImGuiTextBuffer.gen.cs b/src/ImGui.NET/Generated/ImGuiTextBuffer.gen.cs index 86047e0..daec1ec 100644 --- a/src/ImGui.NET/Generated/ImGuiTextBuffer.gen.cs +++ b/src/ImGui.NET/Generated/ImGuiTextBuffer.gen.cs @@ -18,15 +18,6 @@ namespace ImGuiNET public static implicit operator ImGuiTextBuffer* (ImGuiTextBufferPtr wrappedPtr) => wrappedPtr.NativePtr; public static implicit operator ImGuiTextBufferPtr(IntPtr nativePtr) => new ImGuiTextBufferPtr(nativePtr); public ImVector Buf => new ImVector(NativePtr->Buf); - public bool empty() - { - byte ret = ImGuiNative.ImGuiTextBuffer_empty(NativePtr); - return ret != 0; - } - public void clear() - { - ImGuiNative.ImGuiTextBuffer_clear(NativePtr); - } public void appendf(string fmt) { byte* native_fmt; @@ -44,29 +35,38 @@ namespace ImGuiNET else { native_fmt = null; } ImGuiNative.ImGuiTextBuffer_appendf(NativePtr, native_fmt); } - public string c_str() + public string begin() { - byte* ret = ImGuiNative.ImGuiTextBuffer_c_str(NativePtr); + byte* ret = ImGuiNative.ImGuiTextBuffer_begin(NativePtr); return Util.StringFromPtr(ret); } - public void reserve(int capacity) + public string c_str() { - ImGuiNative.ImGuiTextBuffer_reserve(NativePtr, capacity); + byte* ret = ImGuiNative.ImGuiTextBuffer_c_str(NativePtr); + return Util.StringFromPtr(ret); } - public int size() + public void clear() { - int ret = ImGuiNative.ImGuiTextBuffer_size(NativePtr); - return ret; + ImGuiNative.ImGuiTextBuffer_clear(NativePtr); } - public string begin() + public bool empty() { - byte* ret = ImGuiNative.ImGuiTextBuffer_begin(NativePtr); - return Util.StringFromPtr(ret); + byte ret = ImGuiNative.ImGuiTextBuffer_empty(NativePtr); + return ret != 0; } public string end() { byte* ret = ImGuiNative.ImGuiTextBuffer_end(NativePtr); return Util.StringFromPtr(ret); } + public void reserve(int capacity) + { + ImGuiNative.ImGuiTextBuffer_reserve(NativePtr, capacity); + } + public int size() + { + int ret = ImGuiNative.ImGuiTextBuffer_size(NativePtr); + return ret; + } } } diff --git a/src/ImGui.NET/Generated/ImGuiTextFilter.gen.cs b/src/ImGui.NET/Generated/ImGuiTextFilter.gen.cs index 76d069f..56fee72 100644 --- a/src/ImGui.NET/Generated/ImGuiTextFilter.gen.cs +++ b/src/ImGui.NET/Generated/ImGuiTextFilter.gen.cs @@ -26,6 +26,10 @@ namespace ImGuiNET { ImGuiNative.ImGuiTextFilter_Build(NativePtr); } + public void Clear() + { + ImGuiNative.ImGuiTextFilter_Clear(NativePtr); + } public bool Draw() { byte* native_label; @@ -83,10 +87,6 @@ namespace ImGuiNET byte ret = ImGuiNative.ImGuiTextFilter_IsActive(NativePtr); return ret != 0; } - public void Clear() - { - ImGuiNative.ImGuiTextFilter_Clear(NativePtr); - } public bool PassFilter(string text) { byte* native_text; diff --git a/src/ImGui.NET/Generated/TextRange.gen.cs b/src/ImGui.NET/Generated/TextRange.gen.cs index 774067f..7532233 100644 --- a/src/ImGui.NET/Generated/TextRange.gen.cs +++ b/src/ImGui.NET/Generated/TextRange.gen.cs @@ -20,18 +20,6 @@ namespace ImGuiNET public static implicit operator TextRangePtr(IntPtr nativePtr) => new TextRangePtr(nativePtr); public IntPtr b { get => (IntPtr)NativePtr->b; set => NativePtr->b = (byte*)value; } public IntPtr e { get => (IntPtr)NativePtr->e; set => NativePtr->e = (byte*)value; } - public void split(byte separator, out ImVector @out) - { - fixed (ImVector* native_out = &@out) - { - ImGuiNative.TextRange_split(NativePtr, separator, native_out); - } - } - public string end() - { - byte* ret = ImGuiNative.TextRange_end(NativePtr); - return Util.StringFromPtr(ret); - } public string begin() { byte* ret = ImGuiNative.TextRange_begin(NativePtr); @@ -42,5 +30,17 @@ namespace ImGuiNET byte ret = ImGuiNative.TextRange_empty(NativePtr); return ret != 0; } + public string end() + { + byte* ret = ImGuiNative.TextRange_end(NativePtr); + return Util.StringFromPtr(ret); + } + public void split(byte separator, out ImVector @out) + { + fixed (ImVector* native_out = &@out) + { + ImGuiNative.TextRange_split(NativePtr, separator, native_out); + } + } } }