diff --git a/ImGuiNET.Unity/Assets/StyleAsset.cs b/ImGuiNET.Unity/Assets/StyleAsset.cs index 847f5a1..843cf08 100644 --- a/ImGuiNET.Unity/Assets/StyleAsset.cs +++ b/ImGuiNET.Unity/Assets/StyleAsset.cs @@ -107,6 +107,8 @@ sealed class StyleAsset : ScriptableObject [Tooltip("Tessellation tolerance when using PathBezierCurveTo() without a specific number of segments. Decrease for highly tessellated curves (higher quality, more polygons), increase to reduce quality.")] public float CurveTessellationTol; + public float CircleTessellationMaxError { get; private set; } + [Tooltip("Maximum error (in pixels) allowed when using AddCircle()/AddCircleFilled() or drawing rounded corner rectangles with no explicit segment count specified. Decrease for higher quality but more geometry.")] public float CircleSegmentMaxError; @@ -149,7 +151,7 @@ public unsafe void ApplyTo(ImGuiStylePtr s) s.AntiAliasedLines = AntiAliasedLines; s.AntiAliasedFill = AntiAliasedFill; s.CurveTessellationTol = CurveTessellationTol; - s.CircleSegmentMaxError = CircleSegmentMaxError; + s.CircleTessellationMaxError = CircleSegmentMaxError; for (var i = 0; i < Colors.Length; ++i) s.Colors[i] = Colors[i]; } @@ -190,7 +192,7 @@ public unsafe void SetFrom(ImGuiStylePtr s) AntiAliasedLines = s.AntiAliasedLines; AntiAliasedFill = s.AntiAliasedFill; CurveTessellationTol = s.CurveTessellationTol; - CircleSegmentMaxError = s.CircleSegmentMaxError; + CircleTessellationMaxError = s.CircleTessellationMaxError; for (var i = 0; i < Colors.Length; ++i) Colors[i] = s.Colors[i]; } diff --git a/ImGuiNET.Unity/Data/FontConfig.cs b/ImGuiNET.Unity/Data/FontConfig.cs index 6e2ab48..b652be2 100644 --- a/ImGuiNET.Unity/Data/FontConfig.cs +++ b/ImGuiNET.Unity/Data/FontConfig.cs @@ -37,7 +37,7 @@ struct FontConfig public bool MergeIntoPrevious; [Tooltip("Settings for custom font rasterizer (e.g. FreeType). Leave as zero if you aren't using one.")] - public uint RasterizerFlags; + public uint FontBuilderFlags; [Tooltip("Brighten (>1.0f) or darken (<1.0f) font output. Brightening small fonts may be a good workaround to make them more readable.")] public float RasterizerMultiply; @@ -70,7 +70,7 @@ public void ApplyTo(ImFontConfigPtr im) im.GlyphMinAdvanceX = GlyphMinAdvanceX; im.GlyphMaxAdvanceX = GlyphMaxAdvanceX; im.MergeMode = MergeIntoPrevious; - im.RasterizerFlags = RasterizerFlags; + im.FontBuilderFlags = FontBuilderFlags; im.RasterizerMultiply = RasterizerMultiply; im.EllipsisChar = EllipsisChar; @@ -90,7 +90,7 @@ public void SetFrom(ImFontConfigPtr im) GlyphMinAdvanceX = im.GlyphMinAdvanceX; GlyphMaxAdvanceX = im.GlyphMaxAdvanceX; MergeIntoPrevious = im.MergeMode; - RasterizerFlags = im.RasterizerFlags; + FontBuilderFlags = im.FontBuilderFlags; RasterizerMultiply = im.RasterizerMultiply; EllipsisChar = (char)im.EllipsisChar; diff --git a/ImGuiNET.Unity/Data/IOConfig.cs b/ImGuiNET.Unity/Data/IOConfig.cs index a0544f1..b0b27e2 100644 --- a/ImGuiNET.Unity/Data/IOConfig.cs +++ b/ImGuiNET.Unity/Data/IOConfig.cs @@ -74,7 +74,7 @@ public void ApplyTo(ImGuiIOPtr io) io.ConfigInputTextCursorBlink = TextCursorBlink; io.ConfigWindowsResizeFromEdges = ResizeFromEdges; io.ConfigWindowsMoveFromTitleBarOnly = MoveFromTitleOnly; - io.ConfigWindowsMemoryCompactTimer = MemoryCompactTimer; + io.ConfigMemoryCompactTimer = MemoryCompactTimer; } public void SetFrom(ImGuiIOPtr io) @@ -93,7 +93,7 @@ public void SetFrom(ImGuiIOPtr io) TextCursorBlink = io.ConfigInputTextCursorBlink; ResizeFromEdges = io.ConfigWindowsResizeFromEdges; MoveFromTitleOnly = io.ConfigWindowsMoveFromTitleBarOnly; - MemoryCompactTimer = io.ConfigWindowsMemoryCompactTimer; + MemoryCompactTimer = io.ConfigMemoryCompactTimer; } } } diff --git a/ImGuiNET.Unity/Platform/ImGuiPlatformInputManager.cs b/ImGuiNET.Unity/Platform/ImGuiPlatformInputManager.cs index b9f4be7..3427419 100644 --- a/ImGuiNET.Unity/Platform/ImGuiPlatformInputManager.cs +++ b/ImGuiNET.Unity/Platform/ImGuiPlatformInputManager.cs @@ -2,6 +2,10 @@ using UnityEngine; using UnityEngine.Assertions; +#if ENABLE_INPUT_SYSTEM +using UnityEngine.InputSystem; +#endif + namespace ImGuiNET.Unity { // Implemented features: @@ -95,33 +99,52 @@ void SetupKeyboard(ImGuiIOPtr io) { _mainKeys = new int[] { // map and store new keys by assigning io.KeyMap and setting value of array - io.KeyMap[(int)ImGuiKey.Tab ] = (int)KeyCode.Tab, - io.KeyMap[(int)ImGuiKey.LeftArrow ] = (int)KeyCode.LeftArrow, - io.KeyMap[(int)ImGuiKey.RightArrow ] = (int)KeyCode.RightArrow, - io.KeyMap[(int)ImGuiKey.UpArrow ] = (int)KeyCode.UpArrow, - io.KeyMap[(int)ImGuiKey.DownArrow ] = (int)KeyCode.DownArrow, - io.KeyMap[(int)ImGuiKey.PageUp ] = (int)KeyCode.PageUp, - io.KeyMap[(int)ImGuiKey.PageDown ] = (int)KeyCode.PageDown, - io.KeyMap[(int)ImGuiKey.Home ] = (int)KeyCode.Home, - io.KeyMap[(int)ImGuiKey.End ] = (int)KeyCode.End, - io.KeyMap[(int)ImGuiKey.Insert ] = (int)KeyCode.Insert, - io.KeyMap[(int)ImGuiKey.Delete ] = (int)KeyCode.Delete, - io.KeyMap[(int)ImGuiKey.Backspace ] = (int)KeyCode.Backspace, - io.KeyMap[(int)ImGuiKey.Space ] = (int)KeyCode.Space, - io.KeyMap[(int)ImGuiKey.Enter ] = (int)KeyCode.Return, - io.KeyMap[(int)ImGuiKey.Escape ] = (int)KeyCode.Escape, - io.KeyMap[(int)ImGuiKey.KeyPadEnter] = (int)KeyCode.KeypadEnter, - io.KeyMap[(int)ImGuiKey.A ] = (int)KeyCode.A, // for text edit CTRL+A: select all - io.KeyMap[(int)ImGuiKey.C ] = (int)KeyCode.C, // for text edit CTRL+C: copy - io.KeyMap[(int)ImGuiKey.V ] = (int)KeyCode.V, // for text edit CTRL+V: paste - io.KeyMap[(int)ImGuiKey.X ] = (int)KeyCode.X, // for text edit CTRL+X: cut - io.KeyMap[(int)ImGuiKey.Y ] = (int)KeyCode.Y, // for text edit CTRL+Y: redo - io.KeyMap[(int)ImGuiKey.Z ] = (int)KeyCode.Z, // for text edit CTRL+Z: undo + io.KeyMap[(int)ImGuiKey.Tab ] = (int)Key.Tab, + io.KeyMap[(int)ImGuiKey.LeftArrow ] = (int)Key.LeftArrow, + io.KeyMap[(int)ImGuiKey.RightArrow ] = (int)Key.RightArrow, + io.KeyMap[(int)ImGuiKey.UpArrow ] = (int)Key.UpArrow, + io.KeyMap[(int)ImGuiKey.DownArrow ] = (int)Key.DownArrow, + io.KeyMap[(int)ImGuiKey.PageUp ] = (int)Key.PageUp, + io.KeyMap[(int)ImGuiKey.PageDown ] = (int)Key.PageDown, + io.KeyMap[(int)ImGuiKey.Home ] = (int)Key.Home, + io.KeyMap[(int)ImGuiKey.End ] = (int)Key.End, + io.KeyMap[(int)ImGuiKey.Insert ] = (int)Key.Insert, + io.KeyMap[(int)ImGuiKey.Delete ] = (int)Key.Delete, + io.KeyMap[(int)ImGuiKey.Backspace ] = (int)Key.Backspace, + io.KeyMap[(int)ImGuiKey.Space ] = (int)Key.Space, + io.KeyMap[(int)ImGuiKey.Enter ] = (int)Key.Enter, + io.KeyMap[(int)ImGuiKey.Escape ] = (int)Key.Escape, + io.KeyMap[(int)ImGuiKey.KeypadEnter] = (int)Key.NumpadEnter, + io.KeyMap[(int)ImGuiKey.A ] = (int)Key.A, // for text edit CTRL+A: select all + io.KeyMap[(int)ImGuiKey.C ] = (int)Key.C, // for text edit CTRL+C: copy + io.KeyMap[(int)ImGuiKey.V ] = (int)Key.V, // for text edit CTRL+V: paste + io.KeyMap[(int)ImGuiKey.X ] = (int)Key.X, // for text edit CTRL+X: cut + io.KeyMap[(int)ImGuiKey.Y ] = (int)Key.Y, // for text edit CTRL+Y: redo + io.KeyMap[(int)ImGuiKey.Z ] = (int)Key.Z, // for text edit CTRL+Z: undo }; } void UpdateKeyboard(ImGuiIOPtr io) { +#if ENABLE_INPUT_SYSTEM + var keyboard = Keyboard.current; + + // main keys + foreach (var key in _mainKeys) + io.KeysDown[key] = keyboard[(Key)key].isPressed; + + // keyboard modifiers + io.KeyShift = keyboard.shiftKey.isPressed; + io.KeyCtrl = keyboard.ctrlKey.isPressed; + io.KeyAlt = keyboard.altKey.isPressed; + io.KeySuper = keyboard.leftCommandKey.isPressed || keyboard.rightCommandKey.isPressed + || keyboard.leftWindowsKey.isPressed || keyboard.rightWindowsKey.isPressed; + + // text input + while (Event.PopEvent(_e)) + if (_e.rawType == EventType.KeyDown && _e.character != 0 && _e.character != '\n') + io.AddInputCharacter(_e.character); +#elif ENABLE_LEGACY_INPUT_MANAGER // main keys foreach (var key in _mainKeys) io.KeysDown[key] = Input.GetKey((KeyCode)key); @@ -137,10 +160,25 @@ void UpdateKeyboard(ImGuiIOPtr io) while (Event.PopEvent(_e)) if (_e.rawType == EventType.KeyDown && _e.character != 0 && _e.character != '\n') io.AddInputCharacter(_e.character); +#endif } static void UpdateMouse(ImGuiIOPtr io) { +#if ENABLE_INPUT_SYSTEM + var mouse = Mouse.current; + var mousePosition = mouse.position.ReadValue(); + + io.MousePos = ImGuiUn.ScreenToImGui(new Vector2(mousePosition.x, mousePosition.y)); + + var scroll = mouse.scroll.ReadValue().normalized; + io.MouseWheel = scroll.y; + io.MouseWheelH = scroll.x; + + io.MouseDown[0] = mouse.leftButton.isPressed; + io.MouseDown[1] = mouse.rightButton.isPressed; + io.MouseDown[2] = mouse.middleButton.isPressed; +#elif ENABLE_LEGACY_INPUT_MANAGER io.MousePos = ImGuiUn.ScreenToImGui(new Vector2(Input.mousePosition.x, Input.mousePosition.y)); io.MouseWheel = Input.mouseScrollDelta.y; @@ -149,6 +187,7 @@ static void UpdateMouse(ImGuiIOPtr io) io.MouseDown[0] = Input.GetMouseButton(0); io.MouseDown[1] = Input.GetMouseButton(1); io.MouseDown[2] = Input.GetMouseButton(2); +#endif } void UpdateCursor(ImGuiIOPtr io, ImGuiMouseCursor cursor) diff --git a/ImGuiNET.Unity/Platform/ImGuiPlatformInputSystem.cs b/ImGuiNET.Unity/Platform/ImGuiPlatformInputSystem.cs index 8062c51..974306b 100644 --- a/ImGuiNET.Unity/Platform/ImGuiPlatformInputSystem.cs +++ b/ImGuiNET.Unity/Platform/ImGuiPlatformInputSystem.cs @@ -128,7 +128,7 @@ void SetupKeyboard(ImGuiIOPtr io, Keyboard kb) io.KeyMap[(int)ImGuiKey.Space ] = (int)Key.Space, io.KeyMap[(int)ImGuiKey.Enter ] = (int)Key.Enter, io.KeyMap[(int)ImGuiKey.Escape ] = (int)Key.Escape, - io.KeyMap[(int)ImGuiKey.KeyPadEnter] = (int)Key.NumpadEnter, + io.KeyMap[(int)ImGuiKey.KeypadEnter] = (int)Key.NumpadEnter, // letter keys mapped by display name to avoid being layout agnostic (used as shortcuts) io.KeyMap[(int)ImGuiKey.A ] = (int)((KeyControl)kb["#(a)"]).keyCode, // for text edit CTRL+A: select all io.KeyMap[(int)ImGuiKey.C ] = (int)((KeyControl)kb["#(c)"]).keyCode, // for text edit CTRL+C: copy diff --git a/ImGuiNET.Unity/Platform/PlatformCallbacks.cs b/ImGuiNET.Unity/Platform/PlatformCallbacks.cs index 6566ef8..52b7fd5 100644 --- a/ImGuiNET.Unity/Platform/PlatformCallbacks.cs +++ b/ImGuiNET.Unity/Platform/PlatformCallbacks.cs @@ -37,7 +37,7 @@ unsafe class PlatformCallbacks // after assigning its function pointers to unmanaged code GetClipboardTextCallback _getClipboardText; SetClipboardTextCallback _setClipboardText; - ImeSetInputScreenPosCallback _imeSetInputScreenPos; + ImeSetInputScreenPosCallback _setPlatformImeData; #if IMGUI_FEATURE_CUSTOM_ASSERT LogAssertCallback _logAssert; DebugBreakCallback _debugBreak; @@ -47,7 +47,7 @@ public void Assign(ImGuiIOPtr io) { io.SetClipboardTextFn = Marshal.GetFunctionPointerForDelegate(_setClipboardText); io.GetClipboardTextFn = Marshal.GetFunctionPointerForDelegate(_getClipboardText); - io.ImeSetInputScreenPosFn = Marshal.GetFunctionPointerForDelegate(_imeSetInputScreenPos); + io.SetPlatformImeDataFn = Marshal.GetFunctionPointerForDelegate(_setPlatformImeData); #if IMGUI_FEATURE_CUSTOM_ASSERT io.SetBackendPlatformUserData(new CustomAssertData { @@ -61,7 +61,7 @@ public void Unset(ImGuiIOPtr io) { io.SetClipboardTextFn = IntPtr.Zero; io.GetClipboardTextFn = IntPtr.Zero; - io.ImeSetInputScreenPosFn = IntPtr.Zero; + io.SetPlatformImeDataFn = IntPtr.Zero; #if IMGUI_FEATURE_CUSTOM_ASSERT io.SetBackendPlatformUserData(null); #endif @@ -88,7 +88,7 @@ public SetClipboardTextSafeCallback SetClipboardText public ImeSetInputScreenPosCallback ImeSetInputScreenPos { - set => _imeSetInputScreenPos = (x, y) => + set => _setPlatformImeData = (x, y) => { try { value(x, y); } catch (Exception ex) { Debug.LogException(ex); } diff --git a/ImGuiNET.Unity/Platform/TextureManager.cs b/ImGuiNET.Unity/Platform/TextureManager.cs index d089ebf..52c0e0b 100644 --- a/ImGuiNET.Unity/Platform/TextureManager.cs +++ b/ImGuiNET.Unity/Platform/TextureManager.cs @@ -56,12 +56,15 @@ public SpriteInfo GetSpriteInfo(Sprite sprite) if (!_spriteData.TryGetValue(sprite, out SpriteInfo sprInfo)) { Vector2[] uvs = sprite.uv; // allocates + + Debug.Assert(uvs.Length == 4, $"Sprite {sprite.name} must be set to Full Rect"); + _spriteData[sprite] = sprInfo = new SpriteInfo { texture = sprite.texture, size = sprite.rect.size, - uv0 = new Vector2(uvs[0].x, 1f - uvs[0].y), - uv1 = new Vector2(uvs[1].x, 1f - uvs[1].y), + uv0 = new Vector2(uvs[0].x, 1.0f - uvs[0].y), + uv1 = new Vector2(uvs[1].x, 1.0f - uvs[2].y), }; } return sprInfo; diff --git a/ImGuiNET.Unity/Wrapper.Unity/ImGui.Extra.Image.cs b/ImGuiNET.Unity/Wrapper.Unity/ImGui.Extra.Image.cs index 39c4576..12ac384 100644 --- a/ImGuiNET.Unity/Wrapper.Unity/ImGui.Extra.Image.cs +++ b/ImGuiNET.Unity/Wrapper.Unity/ImGui.Extra.Image.cs @@ -36,29 +36,29 @@ public static void Image(Sprite sprite, Vector2 size) [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void ImageButton(Texture tex) + public static bool ImageButton(Texture tex) { - ImGui.ImageButton((IntPtr)GetTextureId(tex), new Vector2(tex.width, tex.height)); + return ImGui.ImageButton((IntPtr)GetTextureId(tex), new Vector2(tex.width, tex.height)); } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void ImageButton(Texture tex, Vector2 size) + public static bool ImageButton(Texture tex, Vector2 size) { - ImGui.ImageButton((IntPtr)GetTextureId(tex), size); + return ImGui.ImageButton((IntPtr)GetTextureId(tex), size); } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void ImageButton(Sprite sprite) + public static bool ImageButton(Sprite sprite) { SpriteInfo info = GetSpriteInfo(sprite); - ImGui.ImageButton((IntPtr)GetTextureId(info.texture), info.size, info.uv0, info.uv1); + return ImGui.ImageButton((IntPtr)GetTextureId(info.texture), info.size, info.uv0, info.uv1); } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void ImageButton(Sprite sprite, Vector2 size) + public static bool ImageButton(Sprite sprite, Vector2 size) { SpriteInfo info = GetSpriteInfo(sprite); - ImGui.ImageButton((IntPtr)GetTextureId(info.texture), size, info.uv0, info.uv1); + return ImGui.ImageButton((IntPtr)GetTextureId(info.texture), size, info.uv0, info.uv1); } } } diff --git a/ImGuiNET/ColorExtensions.cs b/ImGuiNET/ColorExtensions.cs index b081f7e..3634640 100644 --- a/ImGuiNET/ColorExtensions.cs +++ b/ImGuiNET/ColorExtensions.cs @@ -1,5 +1,6 @@ using System.Runtime.CompilerServices; using UnityEngine; +using Unity.Collections.LowLevel.Unsafe; namespace ImGuiNET { @@ -8,19 +9,19 @@ public static class ColorExtensions [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Color32 ToColor32(this uint rgba) { - return Unsafe.AsRef(&rgba); + return UnsafeUtility.AsRef(&rgba); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Color ToColor(this uint rgba) { - return Unsafe.AsRef(&rgba); // implicit conversion to Color + return UnsafeUtility.AsRef(&rgba); // implicit conversion to Color } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe uint ToUint(this Color32 c32) { - return Unsafe.AsRef(&c32); + return UnsafeUtility.AsRef(&c32); } [MethodImpl(MethodImplOptions.AggressiveInlining)] diff --git a/ImGuiNET/Wrapper.Extra/ImFont.Extra.cs b/ImGuiNET/Wrapper.Extra/ImFont.Extra.cs index 7918bbf..1e285b2 100644 --- a/ImGuiNET/Wrapper.Extra/ImFont.Extra.cs +++ b/ImGuiNET/Wrapper.Extra/ImFont.Extra.cs @@ -1,5 +1,6 @@ using System.Text; using UnityEngine; +using Unity.Collections.LowLevel.Unsafe; namespace ImGuiNET { @@ -26,7 +27,8 @@ public Vector2 CalcTextSizeA(float font_size, float max_width, float wrap_width, } else { native_text = null; } byte* native_text_end = null; - Vector2 ret = ImGuiNative.ImFont_CalcTextSizeA(NativePtr, font_size, max_width, wrap_width, native_text, native_text_end, (byte**)0); + Vector2 ret; + ImGuiNative.ImFont_CalcTextSizeA(&ret, NativePtr, font_size, max_width, wrap_width, native_text, native_text_end, (byte**)0); if (text_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_text); @@ -44,7 +46,8 @@ public Vector2 CalcTextSizeA(float font_size, float max_width, float wrap_width, int native_text_offset = Encoding.UTF8.GetBytes(&ch, 1, native_text, text_byteCount); native_text[native_text_offset] = 0; byte* native_text_end = null; - Vector2 ret = ImGuiNative.ImFont_CalcTextSizeA(NativePtr, font_size, max_width, wrap_width, native_text, native_text_end, (byte**)0); + Vector2 ret; + ImGuiNative.ImFont_CalcTextSizeA(&ret, NativePtr, font_size, max_width, wrap_width, native_text, native_text_end, (byte**)0); return ret; } diff --git a/ImGuiNET/Wrapper.Extra/ImFontConfigPtr.Extra.cs b/ImGuiNET/Wrapper.Extra/ImFontConfigPtr.Extra.cs index 1c12613..513a708 100644 --- a/ImGuiNET/Wrapper.Extra/ImFontConfigPtr.Extra.cs +++ b/ImGuiNET/Wrapper.Extra/ImFontConfigPtr.Extra.cs @@ -1,4 +1,4 @@ -using System.Runtime.CompilerServices; +using Unity.Collections.LowLevel.Unsafe; namespace ImGuiNET { @@ -6,7 +6,7 @@ public unsafe partial struct ImFontConfigPtr { public ImFontConfigPtr(ref ImFontConfig fontConfig) { - NativePtr = (ImFontConfig*)Unsafe.AsPointer(ref fontConfig); + NativePtr = (ImFontConfig*)UnsafeUtility.AddressOf(ref fontConfig); } } } diff --git a/ImGuiNET/Wrapper.Extra/ImGui.Extra.DragDrop.cs b/ImGuiNET/Wrapper.Extra/ImGui.Extra.DragDrop.cs index 6e83a20..abfa76f 100644 --- a/ImGuiNET/Wrapper.Extra/ImGui.Extra.DragDrop.cs +++ b/ImGuiNET/Wrapper.Extra/ImGui.Extra.DragDrop.cs @@ -1,6 +1,6 @@ using System; using System.Text; -using System.Runtime.CompilerServices; +using Unity.Collections.LowLevel.Unsafe; namespace ImGuiNET { @@ -8,20 +8,20 @@ namespace ImGuiNET public static partial class ImGui { // TODO: review - // can now pass refs with Unsafe.AsRef + // can now pass refs with UnsafeUtility.AsRef public static unsafe void SetDragDropPayload(string type, T data, ImGuiCond cond = 0) where T : unmanaged { - void* ptr = Unsafe.AsPointer(ref data); - SetDragDropPayload(type, new IntPtr(ptr), (uint)Unsafe.SizeOf(), cond); + void* ptr = UnsafeUtility.AddressOf(ref data); + SetDragDropPayload(type, new IntPtr(ptr), (uint)UnsafeUtility.SizeOf(), cond); } public static unsafe bool AcceptDragDropPayload(string type, out T payload, ImGuiDragDropFlags flags = ImGuiDragDropFlags.None) where T : unmanaged { ImGuiPayload* pload = AcceptDragDropPayload(type, flags); - payload = (pload != null) ? Unsafe.Read(pload->Data) : default; + payload = (pload != null) ? UnsafeUtility.ReadArrayElement(pload->Data, 0) : default; return pload != null; } diff --git a/ImGuiNET/Wrapper.Extra/ImGuiInputTextCallbackDataPtr.Extra.cs b/ImGuiNET/Wrapper.Extra/ImGuiInputTextCallbackDataPtr.Extra.cs index d1311a9..c15269c 100644 --- a/ImGuiNET/Wrapper.Extra/ImGuiInputTextCallbackDataPtr.Extra.cs +++ b/ImGuiNET/Wrapper.Extra/ImGuiInputTextCallbackDataPtr.Extra.cs @@ -1,4 +1,4 @@ -using System.Runtime.CompilerServices; +using Unity.Collections.LowLevel.Unsafe; namespace ImGuiNET { @@ -6,7 +6,7 @@ public unsafe partial struct ImGuiInputTextCallbackDataPtr { public ImGuiInputTextCallbackDataPtr(ref ImGuiInputTextCallbackData data) { - NativePtr = (ImGuiInputTextCallbackData*)Unsafe.AsPointer(ref data); + NativePtr = (ImGuiInputTextCallbackData*)UnsafeUtility.AddressOf(ref data); } public string Text => Util.StringFromPtr(NativePtr->Buf); diff --git a/ImGuiNET/Wrapper.Extra/ImGuiSizeCallbackDataPtr.Extra.cs b/ImGuiNET/Wrapper.Extra/ImGuiSizeCallbackDataPtr.Extra.cs index 6659944..118bf5b 100644 --- a/ImGuiNET/Wrapper.Extra/ImGuiSizeCallbackDataPtr.Extra.cs +++ b/ImGuiNET/Wrapper.Extra/ImGuiSizeCallbackDataPtr.Extra.cs @@ -1,4 +1,4 @@ -using System.Runtime.CompilerServices; +using Unity.Collections.LowLevel.Unsafe; namespace ImGuiNET { @@ -6,7 +6,7 @@ public unsafe partial struct ImGuiSizeCallbackDataPtr { public ImGuiSizeCallbackDataPtr(ref ImGuiSizeCallbackData data) { - NativePtr = (ImGuiSizeCallbackData*)Unsafe.AsPointer(ref data); + NativePtr = (ImGuiSizeCallbackData*)UnsafeUtility.AddressOf(ref data); } } } diff --git a/ImGuiNET/Wrapper.Extra/ImGuiTextFilterPtr.Extra.cs b/ImGuiNET/Wrapper.Extra/ImGuiTextFilterPtr.Extra.cs index 8c384d7..617dc33 100644 --- a/ImGuiNET/Wrapper.Extra/ImGuiTextFilterPtr.Extra.cs +++ b/ImGuiNET/Wrapper.Extra/ImGuiTextFilterPtr.Extra.cs @@ -1,4 +1,4 @@ -using System.Runtime.CompilerServices; +using Unity.Collections.LowLevel.Unsafe; namespace ImGuiNET { @@ -8,7 +8,7 @@ public unsafe partial struct ImGuiTextFilterPtr { public ImGuiTextFilterPtr(ref ImGuiTextFilter filter) { - NativePtr = (ImGuiTextFilter*)Unsafe.AsPointer(ref filter); + NativePtr = (ImGuiTextFilter*)UnsafeUtility.AddressOf(ref filter); } } } diff --git a/ImGuiNET/Wrapper/Generated/ImColor.gen.cs b/ImGuiNET/Wrapper/Generated/ImColor.gen.cs index 36d01c4..7ecbd6c 100644 --- a/ImGuiNET/Wrapper/Generated/ImColor.gen.cs +++ b/ImGuiNET/Wrapper/Generated/ImColor.gen.cs @@ -1,7 +1,7 @@ using System; -using System.Runtime.CompilerServices; -using System.Text; using UnityEngine; +using Unity.Collections.LowLevel.Unsafe; +using System.Text; namespace ImGuiNET { @@ -17,30 +17,32 @@ public unsafe partial struct ImColorPtr public static implicit operator ImColorPtr(ImColor* nativePtr) => new ImColorPtr(nativePtr); 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 ref Vector4 Value => ref UnsafeUtility.AsRef(&NativePtr->Value); public void Destroy() { - ImGuiNative.ImColor_destroy(NativePtr); + ImGuiNative.ImColor_destroy((ImColor*)(NativePtr)); } public ImColor HSV(float h, float s, float v) { + ImColor __retval; float a = 1.0f; - ImColor ret = ImGuiNative.ImColor_HSV(NativePtr, h, s, v, a); - return ret; + ImGuiNative.ImColor_HSV(&__retval, h, s, v, a); + return __retval; } public ImColor HSV(float h, float s, float v, float a) { - ImColor ret = ImGuiNative.ImColor_HSV(NativePtr, h, s, v, a); - return ret; + ImColor __retval; + ImGuiNative.ImColor_HSV(&__retval, h, s, v, a); + return __retval; } public void SetHSV(float h, float s, float v) { float a = 1.0f; - ImGuiNative.ImColor_SetHSV(NativePtr, h, s, v, a); + ImGuiNative.ImColor_SetHSV((ImColor*)(NativePtr), h, s, v, a); } public void SetHSV(float h, float s, float v, float a) { - ImGuiNative.ImColor_SetHSV(NativePtr, h, s, v, a); + ImGuiNative.ImColor_SetHSV((ImColor*)(NativePtr), h, s, v, a); } } } diff --git a/ImGuiNET/Wrapper/Generated/ImDrawChannel.gen.cs b/ImGuiNET/Wrapper/Generated/ImDrawChannel.gen.cs index c1ddd70..d7b84cd 100644 --- a/ImGuiNET/Wrapper/Generated/ImDrawChannel.gen.cs +++ b/ImGuiNET/Wrapper/Generated/ImDrawChannel.gen.cs @@ -1,7 +1,7 @@ using System; -using System.Runtime.CompilerServices; -using System.Text; using UnityEngine; +using Unity.Collections.LowLevel.Unsafe; +using System.Text; namespace ImGuiNET { @@ -18,7 +18,7 @@ public unsafe partial struct ImDrawChannelPtr public static implicit operator ImDrawChannelPtr(ImDrawChannel* nativePtr) => new ImDrawChannelPtr(nativePtr); public static implicit operator ImDrawChannel* (ImDrawChannelPtr wrappedPtr) => wrappedPtr.NativePtr; public static implicit operator ImDrawChannelPtr(IntPtr nativePtr) => new ImDrawChannelPtr(nativePtr); - public ImPtrVector _CmdBuffer => new ImPtrVector(NativePtr->_CmdBuffer, Unsafe.SizeOf()); + public ImPtrVector _CmdBuffer => new ImPtrVector(NativePtr->_CmdBuffer, UnsafeUtility.SizeOf()); public ImVector _IdxBuffer => new ImVector(NativePtr->_IdxBuffer); } } diff --git a/ImGuiNET/Wrapper/Generated/ImDrawCmd.gen.cs b/ImGuiNET/Wrapper/Generated/ImDrawCmd.gen.cs index 5662642..962e914 100644 --- a/ImGuiNET/Wrapper/Generated/ImDrawCmd.gen.cs +++ b/ImGuiNET/Wrapper/Generated/ImDrawCmd.gen.cs @@ -1,17 +1,17 @@ using System; -using System.Runtime.CompilerServices; -using System.Text; using UnityEngine; +using Unity.Collections.LowLevel.Unsafe; +using System.Text; namespace ImGuiNET { public unsafe partial struct ImDrawCmd { - public uint ElemCount; public Vector4 ClipRect; public IntPtr TextureId; public uint VtxOffset; public uint IdxOffset; + public uint ElemCount; public IntPtr UserCallback; public void* UserCallbackData; } @@ -23,16 +23,21 @@ public unsafe partial struct ImDrawCmdPtr public static implicit operator ImDrawCmdPtr(ImDrawCmd* nativePtr) => new ImDrawCmdPtr(nativePtr); public static implicit operator ImDrawCmd* (ImDrawCmdPtr wrappedPtr) => wrappedPtr.NativePtr; public static implicit operator ImDrawCmdPtr(IntPtr nativePtr) => new ImDrawCmdPtr(nativePtr); - public ref uint ElemCount => ref Unsafe.AsRef(&NativePtr->ElemCount); - public ref Vector4 ClipRect => ref Unsafe.AsRef(&NativePtr->ClipRect); - public ref IntPtr TextureId => ref Unsafe.AsRef(&NativePtr->TextureId); - public ref uint VtxOffset => ref Unsafe.AsRef(&NativePtr->VtxOffset); - public ref uint IdxOffset => ref Unsafe.AsRef(&NativePtr->IdxOffset); - public ref IntPtr UserCallback => ref Unsafe.AsRef(&NativePtr->UserCallback); + public ref Vector4 ClipRect => ref UnsafeUtility.AsRef(&NativePtr->ClipRect); + public ref IntPtr TextureId => ref UnsafeUtility.AsRef(&NativePtr->TextureId); + public ref uint VtxOffset => ref UnsafeUtility.AsRef(&NativePtr->VtxOffset); + public ref uint IdxOffset => ref UnsafeUtility.AsRef(&NativePtr->IdxOffset); + public ref uint ElemCount => ref UnsafeUtility.AsRef(&NativePtr->ElemCount); + public ref IntPtr UserCallback => ref UnsafeUtility.AsRef(&NativePtr->UserCallback); public IntPtr UserCallbackData { get => (IntPtr)NativePtr->UserCallbackData; set => NativePtr->UserCallbackData = (void*)value; } public void Destroy() { - ImGuiNative.ImDrawCmd_destroy(NativePtr); + ImGuiNative.ImDrawCmd_destroy((ImDrawCmd*)(NativePtr)); + } + public IntPtr GetTexID() + { + IntPtr ret = ImGuiNative.ImDrawCmd_GetTexID((ImDrawCmd*)(NativePtr)); + return ret; } } } diff --git a/ImGuiNET/Wrapper/Generated/ImDrawCmdHeader.gen.cs b/ImGuiNET/Wrapper/Generated/ImDrawCmdHeader.gen.cs new file mode 100644 index 0000000..53d7a80 --- /dev/null +++ b/ImGuiNET/Wrapper/Generated/ImDrawCmdHeader.gen.cs @@ -0,0 +1,26 @@ +using System; +using UnityEngine; +using Unity.Collections.LowLevel.Unsafe; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct ImDrawCmdHeader + { + public Vector4 ClipRect; + public IntPtr TextureId; + public uint VtxOffset; + } + public unsafe partial struct ImDrawCmdHeaderPtr + { + public ImDrawCmdHeader* NativePtr { get; } + public ImDrawCmdHeaderPtr(ImDrawCmdHeader* nativePtr) => NativePtr = nativePtr; + public ImDrawCmdHeaderPtr(IntPtr nativePtr) => NativePtr = (ImDrawCmdHeader*)nativePtr; + public static implicit operator ImDrawCmdHeaderPtr(ImDrawCmdHeader* nativePtr) => new ImDrawCmdHeaderPtr(nativePtr); + public static implicit operator ImDrawCmdHeader* (ImDrawCmdHeaderPtr wrappedPtr) => wrappedPtr.NativePtr; + public static implicit operator ImDrawCmdHeaderPtr(IntPtr nativePtr) => new ImDrawCmdHeaderPtr(nativePtr); + public ref Vector4 ClipRect => ref UnsafeUtility.AsRef(&NativePtr->ClipRect); + public ref IntPtr TextureId => ref UnsafeUtility.AsRef(&NativePtr->TextureId); + public ref uint VtxOffset => ref UnsafeUtility.AsRef(&NativePtr->VtxOffset); + } +} diff --git a/ImGuiNET/Wrapper/Generated/ImDrawCmdHeader.gen.cs.meta b/ImGuiNET/Wrapper/Generated/ImDrawCmdHeader.gen.cs.meta new file mode 100644 index 0000000..2c4550a --- /dev/null +++ b/ImGuiNET/Wrapper/Generated/ImDrawCmdHeader.gen.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 725d7c4b1230a05479819ecec7038fa5 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/ImGuiNET/Wrapper/Generated/ImDrawData.gen.cs b/ImGuiNET/Wrapper/Generated/ImDrawData.gen.cs index 242895e..6f06cd1 100644 --- a/ImGuiNET/Wrapper/Generated/ImDrawData.gen.cs +++ b/ImGuiNET/Wrapper/Generated/ImDrawData.gen.cs @@ -1,20 +1,21 @@ using System; -using System.Runtime.CompilerServices; -using System.Text; using UnityEngine; +using Unity.Collections.LowLevel.Unsafe; +using System.Text; namespace ImGuiNET { public unsafe partial struct ImDrawData { public byte Valid; - public ImDrawList** CmdLists; public int CmdListsCount; public int TotalIdxCount; public int TotalVtxCount; + public ImDrawList** CmdLists; public Vector2 DisplayPos; public Vector2 DisplaySize; public Vector2 FramebufferScale; + public ImGuiViewport* OwnerViewport; } public unsafe partial struct ImDrawDataPtr { @@ -24,29 +25,30 @@ public unsafe partial struct ImDrawDataPtr public static implicit operator ImDrawDataPtr(ImDrawData* nativePtr) => new ImDrawDataPtr(nativePtr); public static implicit operator ImDrawData* (ImDrawDataPtr wrappedPtr) => wrappedPtr.NativePtr; public static implicit operator ImDrawDataPtr(IntPtr nativePtr) => new ImDrawDataPtr(nativePtr); - public ref bool Valid => ref Unsafe.AsRef(&NativePtr->Valid); + public ref bool Valid => ref UnsafeUtility.AsRef(&NativePtr->Valid); + public ref int CmdListsCount => ref UnsafeUtility.AsRef(&NativePtr->CmdListsCount); + public ref int TotalIdxCount => ref UnsafeUtility.AsRef(&NativePtr->TotalIdxCount); + public ref int TotalVtxCount => ref UnsafeUtility.AsRef(&NativePtr->TotalVtxCount); public IntPtr CmdLists { get => (IntPtr)NativePtr->CmdLists; set => NativePtr->CmdLists = (ImDrawList**)value; } - public ref int CmdListsCount => ref Unsafe.AsRef(&NativePtr->CmdListsCount); - public ref int TotalIdxCount => ref Unsafe.AsRef(&NativePtr->TotalIdxCount); - 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 ref Vector2 FramebufferScale => ref Unsafe.AsRef(&NativePtr->FramebufferScale); + public ref Vector2 DisplayPos => ref UnsafeUtility.AsRef(&NativePtr->DisplayPos); + public ref Vector2 DisplaySize => ref UnsafeUtility.AsRef(&NativePtr->DisplaySize); + public ref Vector2 FramebufferScale => ref UnsafeUtility.AsRef(&NativePtr->FramebufferScale); + public ImGuiViewportPtr OwnerViewport => new ImGuiViewportPtr(NativePtr->OwnerViewport); public void Clear() { - ImGuiNative.ImDrawData_Clear(NativePtr); + ImGuiNative.ImDrawData_Clear((ImDrawData*)(NativePtr)); } public void DeIndexAllBuffers() { - ImGuiNative.ImDrawData_DeIndexAllBuffers(NativePtr); + ImGuiNative.ImDrawData_DeIndexAllBuffers((ImDrawData*)(NativePtr)); } public void Destroy() { - ImGuiNative.ImDrawData_destroy(NativePtr); + ImGuiNative.ImDrawData_destroy((ImDrawData*)(NativePtr)); } public void ScaleClipRects(Vector2 fb_scale) { - ImGuiNative.ImDrawData_ScaleClipRects(NativePtr, fb_scale); + ImGuiNative.ImDrawData_ScaleClipRects((ImDrawData*)(NativePtr), fb_scale); } } } diff --git a/ImGuiNET/Wrapper/Generated/ImDrawFlags.gen.cs b/ImGuiNET/Wrapper/Generated/ImDrawFlags.gen.cs new file mode 100644 index 0000000..60ae459 --- /dev/null +++ b/ImGuiNET/Wrapper/Generated/ImDrawFlags.gen.cs @@ -0,0 +1,21 @@ +namespace ImGuiNET +{ + [System.Flags] + public enum ImDrawFlags + { + None = 0, + Closed = 1, + RoundCornersTopLeft = 16, + RoundCornersTopRight = 32, + RoundCornersBottomLeft = 64, + RoundCornersBottomRight = 128, + RoundCornersNone = 256, + RoundCornersTop = 48, + RoundCornersBottom = 192, + RoundCornersLeft = 80, + RoundCornersRight = 160, + RoundCornersAll = 240, + RoundCornersDefault = 240, + RoundCornersMask = 496, + } +} diff --git a/ImGuiNET/Wrapper/Generated/ImDrawFlags.gen.cs.meta b/ImGuiNET/Wrapper/Generated/ImDrawFlags.gen.cs.meta new file mode 100644 index 0000000..07664c4 --- /dev/null +++ b/ImGuiNET/Wrapper/Generated/ImDrawFlags.gen.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3a3d60934e27ff64ead1d85334df9311 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/ImGuiNET/Wrapper/Generated/ImDrawList.gen.cs b/ImGuiNET/Wrapper/Generated/ImDrawList.gen.cs index 3a2ef0e..ddeea8b 100644 --- a/ImGuiNET/Wrapper/Generated/ImDrawList.gen.cs +++ b/ImGuiNET/Wrapper/Generated/ImDrawList.gen.cs @@ -1,7 +1,7 @@ using System; -using System.Runtime.CompilerServices; -using System.Text; using UnityEngine; +using Unity.Collections.LowLevel.Unsafe; +using System.Text; namespace ImGuiNET { @@ -11,16 +11,17 @@ public unsafe partial struct ImDrawList public ImVector IdxBuffer; public ImVector VtxBuffer; public ImDrawListFlags Flags; + public uint _VtxCurrentIdx; public IntPtr _Data; public byte* _OwnerName; - public uint _VtxCurrentOffset; - public uint _VtxCurrentIdx; public ImDrawVert* _VtxWritePtr; public ushort* _IdxWritePtr; public ImVector _ClipRectStack; public ImVector _TextureIdStack; public ImVector _Path; + public ImDrawCmdHeader _CmdHeader; public ImDrawListSplitter _Splitter; + public float _FringeScale; } public unsafe partial struct ImDrawListPtr { @@ -30,90 +31,141 @@ public unsafe partial struct ImDrawListPtr public static implicit operator ImDrawListPtr(ImDrawList* nativePtr) => new ImDrawListPtr(nativePtr); public static implicit operator ImDrawList* (ImDrawListPtr wrappedPtr) => wrappedPtr.NativePtr; public static implicit operator ImDrawListPtr(IntPtr nativePtr) => new ImDrawListPtr(nativePtr); - public ImPtrVector CmdBuffer => new ImPtrVector(NativePtr->CmdBuffer, Unsafe.SizeOf()); + public ImPtrVector CmdBuffer => new ImPtrVector(NativePtr->CmdBuffer, UnsafeUtility.SizeOf()); public ImVector IdxBuffer => new ImVector(NativePtr->IdxBuffer); - public ImPtrVector VtxBuffer => new ImPtrVector(NativePtr->VtxBuffer, Unsafe.SizeOf()); - public ref ImDrawListFlags Flags => ref Unsafe.AsRef(&NativePtr->Flags); - public ref IntPtr _Data => ref Unsafe.AsRef(&NativePtr->_Data); + public ImPtrVector VtxBuffer => new ImPtrVector(NativePtr->VtxBuffer, UnsafeUtility.SizeOf()); + public ref ImDrawListFlags Flags => ref UnsafeUtility.AsRef(&NativePtr->Flags); + public ref uint _VtxCurrentIdx => ref UnsafeUtility.AsRef(&NativePtr->_VtxCurrentIdx); + public ref IntPtr _Data => ref UnsafeUtility.AsRef(&NativePtr->_Data); public NullTerminatedString _OwnerName => new NullTerminatedString(NativePtr->_OwnerName); - public ref uint _VtxCurrentOffset => ref Unsafe.AsRef(&NativePtr->_VtxCurrentOffset); - public ref uint _VtxCurrentIdx => ref Unsafe.AsRef(&NativePtr->_VtxCurrentIdx); public ImDrawVertPtr _VtxWritePtr => new ImDrawVertPtr(NativePtr->_VtxWritePtr); public IntPtr _IdxWritePtr { get => (IntPtr)NativePtr->_IdxWritePtr; set => NativePtr->_IdxWritePtr = (ushort*)value; } public ImVector _ClipRectStack => new ImVector(NativePtr->_ClipRectStack); public ImVector _TextureIdStack => new ImVector(NativePtr->_TextureIdStack); public ImVector _Path => new ImVector(NativePtr->_Path); - public ref ImDrawListSplitter _Splitter => ref Unsafe.AsRef(&NativePtr->_Splitter); - public void AddBezierCurve(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, uint col, float thickness) + public ref ImDrawCmdHeader _CmdHeader => ref UnsafeUtility.AsRef(&NativePtr->_CmdHeader); + public ref ImDrawListSplitter _Splitter => ref UnsafeUtility.AsRef(&NativePtr->_Splitter); + public ref float _FringeScale => ref UnsafeUtility.AsRef(&NativePtr->_FringeScale); + public int _CalcCircleAutoSegmentCount(float radius) + { + int ret = ImGuiNative.ImDrawList__CalcCircleAutoSegmentCount((ImDrawList*)(NativePtr), radius); + return ret; + } + public void _ClearFreeMemory() + { + ImGuiNative.ImDrawList__ClearFreeMemory((ImDrawList*)(NativePtr)); + } + public void _OnChangedClipRect() + { + ImGuiNative.ImDrawList__OnChangedClipRect((ImDrawList*)(NativePtr)); + } + public void _OnChangedTextureID() + { + ImGuiNative.ImDrawList__OnChangedTextureID((ImDrawList*)(NativePtr)); + } + public void _OnChangedVtxOffset() + { + ImGuiNative.ImDrawList__OnChangedVtxOffset((ImDrawList*)(NativePtr)); + } + public void _PathArcToFastEx(Vector2 center, float radius, int a_min_sample, int a_max_sample, int a_step) + { + ImGuiNative.ImDrawList__PathArcToFastEx((ImDrawList*)(NativePtr), center, radius, a_min_sample, a_max_sample, a_step); + } + public void _PathArcToN(Vector2 center, float radius, float a_min, float a_max, int num_segments) + { + ImGuiNative.ImDrawList__PathArcToN((ImDrawList*)(NativePtr), center, radius, a_min, a_max, num_segments); + } + public void _PopUnusedDrawCmd() + { + ImGuiNative.ImDrawList__PopUnusedDrawCmd((ImDrawList*)(NativePtr)); + } + public void _ResetForNewFrame() + { + ImGuiNative.ImDrawList__ResetForNewFrame((ImDrawList*)(NativePtr)); + } + public void _TryMergeDrawCmds() + { + ImGuiNative.ImDrawList__TryMergeDrawCmds((ImDrawList*)(NativePtr)); + } + public void AddBezierCubic(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, uint col, float thickness) { int num_segments = 0; - ImGuiNative.ImDrawList_AddBezierCurve(NativePtr, p1, p2, p3, p4, col, thickness, num_segments); + ImGuiNative.ImDrawList_AddBezierCubic((ImDrawList*)(NativePtr), p1, p2, p3, p4, col, thickness, num_segments); } - public void AddBezierCurve(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, uint col, float thickness, int num_segments) + public void AddBezierCubic(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, uint col, float thickness, int num_segments) { - ImGuiNative.ImDrawList_AddBezierCurve(NativePtr, p1, p2, p3, p4, col, thickness, num_segments); + ImGuiNative.ImDrawList_AddBezierCubic((ImDrawList*)(NativePtr), p1, p2, p3, p4, col, thickness, num_segments); + } + public void AddBezierQuadratic(Vector2 p1, Vector2 p2, Vector2 p3, uint col, float thickness) + { + int num_segments = 0; + ImGuiNative.ImDrawList_AddBezierQuadratic((ImDrawList*)(NativePtr), p1, p2, p3, col, thickness, num_segments); + } + public void AddBezierQuadratic(Vector2 p1, Vector2 p2, Vector2 p3, uint col, float thickness, int num_segments) + { + ImGuiNative.ImDrawList_AddBezierQuadratic((ImDrawList*)(NativePtr), p1, p2, p3, col, thickness, num_segments); } public void AddCallback(IntPtr callback, IntPtr callback_data) { void* native_callback_data = (void*)callback_data.ToPointer(); - ImGuiNative.ImDrawList_AddCallback(NativePtr, callback, native_callback_data); + ImGuiNative.ImDrawList_AddCallback((ImDrawList*)(NativePtr), callback, native_callback_data); } public void AddCircle(Vector2 center, float radius, uint col) { - int num_segments = 12; + int num_segments = 0; float thickness = 1.0f; - ImGuiNative.ImDrawList_AddCircle(NativePtr, center, radius, col, num_segments, thickness); + ImGuiNative.ImDrawList_AddCircle((ImDrawList*)(NativePtr), center, radius, col, num_segments, thickness); } public void AddCircle(Vector2 center, float radius, uint col, int num_segments) { float thickness = 1.0f; - ImGuiNative.ImDrawList_AddCircle(NativePtr, center, radius, col, num_segments, thickness); + ImGuiNative.ImDrawList_AddCircle((ImDrawList*)(NativePtr), center, radius, col, num_segments, thickness); } public void AddCircle(Vector2 center, float radius, uint col, int num_segments, float thickness) { - ImGuiNative.ImDrawList_AddCircle(NativePtr, center, radius, col, num_segments, thickness); + ImGuiNative.ImDrawList_AddCircle((ImDrawList*)(NativePtr), center, radius, col, num_segments, thickness); } public void AddCircleFilled(Vector2 center, float radius, uint col) { - int num_segments = 12; - ImGuiNative.ImDrawList_AddCircleFilled(NativePtr, center, radius, col, num_segments); + int num_segments = 0; + ImGuiNative.ImDrawList_AddCircleFilled((ImDrawList*)(NativePtr), center, radius, col, num_segments); } public void AddCircleFilled(Vector2 center, float radius, uint col, int num_segments) { - ImGuiNative.ImDrawList_AddCircleFilled(NativePtr, center, radius, col, num_segments); + ImGuiNative.ImDrawList_AddCircleFilled((ImDrawList*)(NativePtr), center, radius, col, num_segments); } public void AddConvexPolyFilled(ref Vector2 points, int num_points, uint col) { fixed (Vector2* native_points = &points) { - ImGuiNative.ImDrawList_AddConvexPolyFilled(NativePtr, native_points, num_points, col); + ImGuiNative.ImDrawList_AddConvexPolyFilled((ImDrawList*)(NativePtr), native_points, num_points, col); } } public void AddDrawCmd() { - ImGuiNative.ImDrawList_AddDrawCmd(NativePtr); + ImGuiNative.ImDrawList_AddDrawCmd((ImDrawList*)(NativePtr)); } public void AddImage(IntPtr user_texture_id, Vector2 p_min, Vector2 p_max) { Vector2 uv_min = new Vector2(); Vector2 uv_max = new Vector2(1, 1); - uint col = 0xFFFFFFFF; - ImGuiNative.ImDrawList_AddImage(NativePtr, user_texture_id, p_min, p_max, uv_min, uv_max, col); + uint col = 4294967295; + ImGuiNative.ImDrawList_AddImage((ImDrawList*)(NativePtr), user_texture_id, p_min, p_max, uv_min, uv_max, col); } public void AddImage(IntPtr user_texture_id, Vector2 p_min, Vector2 p_max, Vector2 uv_min) { Vector2 uv_max = new Vector2(1, 1); - uint col = 0xFFFFFFFF; - ImGuiNative.ImDrawList_AddImage(NativePtr, user_texture_id, p_min, p_max, uv_min, uv_max, col); + uint col = 4294967295; + ImGuiNative.ImDrawList_AddImage((ImDrawList*)(NativePtr), user_texture_id, p_min, p_max, uv_min, uv_max, col); } public void AddImage(IntPtr user_texture_id, Vector2 p_min, Vector2 p_max, Vector2 uv_min, Vector2 uv_max) { - uint col = 0xFFFFFFFF; - ImGuiNative.ImDrawList_AddImage(NativePtr, user_texture_id, p_min, p_max, uv_min, uv_max, col); + uint col = 4294967295; + ImGuiNative.ImDrawList_AddImage((ImDrawList*)(NativePtr), user_texture_id, p_min, p_max, uv_min, uv_max, col); } public void AddImage(IntPtr user_texture_id, Vector2 p_min, Vector2 p_max, Vector2 uv_min, Vector2 uv_max, uint col) { - ImGuiNative.ImDrawList_AddImage(NativePtr, user_texture_id, p_min, p_max, uv_min, uv_max, col); + ImGuiNative.ImDrawList_AddImage((ImDrawList*)(NativePtr), user_texture_id, p_min, p_max, uv_min, uv_max, col); } public void AddImageQuad(IntPtr user_texture_id, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4) { @@ -121,313 +173,311 @@ public void AddImageQuad(IntPtr user_texture_id, Vector2 p1, Vector2 p2, Vector2 Vector2 uv2 = new Vector2(1, 0); Vector2 uv3 = new Vector2(1, 1); Vector2 uv4 = new Vector2(0, 1); - uint col = 0xFFFFFFFF; - ImGuiNative.ImDrawList_AddImageQuad(NativePtr, user_texture_id, p1, p2, p3, p4, uv1, uv2, uv3, uv4, col); + uint col = 4294967295; + ImGuiNative.ImDrawList_AddImageQuad((ImDrawList*)(NativePtr), user_texture_id, p1, p2, p3, p4, uv1, uv2, uv3, uv4, col); } public void AddImageQuad(IntPtr user_texture_id, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, Vector2 uv1) { Vector2 uv2 = new Vector2(1, 0); Vector2 uv3 = new Vector2(1, 1); Vector2 uv4 = new Vector2(0, 1); - uint col = 0xFFFFFFFF; - ImGuiNative.ImDrawList_AddImageQuad(NativePtr, user_texture_id, p1, p2, p3, p4, uv1, uv2, uv3, uv4, col); + uint col = 4294967295; + ImGuiNative.ImDrawList_AddImageQuad((ImDrawList*)(NativePtr), user_texture_id, p1, p2, p3, p4, uv1, uv2, uv3, uv4, col); } public void AddImageQuad(IntPtr user_texture_id, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, Vector2 uv1, Vector2 uv2) { Vector2 uv3 = new Vector2(1, 1); Vector2 uv4 = new Vector2(0, 1); - uint col = 0xFFFFFFFF; - ImGuiNative.ImDrawList_AddImageQuad(NativePtr, user_texture_id, p1, p2, p3, p4, uv1, uv2, uv3, uv4, col); + uint col = 4294967295; + ImGuiNative.ImDrawList_AddImageQuad((ImDrawList*)(NativePtr), user_texture_id, p1, p2, p3, p4, uv1, uv2, uv3, uv4, col); } public void AddImageQuad(IntPtr user_texture_id, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, Vector2 uv1, Vector2 uv2, Vector2 uv3) { Vector2 uv4 = new Vector2(0, 1); - uint col = 0xFFFFFFFF; - ImGuiNative.ImDrawList_AddImageQuad(NativePtr, user_texture_id, p1, p2, p3, p4, uv1, uv2, uv3, uv4, col); + uint col = 4294967295; + ImGuiNative.ImDrawList_AddImageQuad((ImDrawList*)(NativePtr), user_texture_id, p1, p2, p3, p4, uv1, uv2, uv3, uv4, col); } public void AddImageQuad(IntPtr user_texture_id, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, Vector2 uv1, Vector2 uv2, Vector2 uv3, Vector2 uv4) { - uint col = 0xFFFFFFFF; - ImGuiNative.ImDrawList_AddImageQuad(NativePtr, user_texture_id, p1, p2, p3, p4, uv1, uv2, uv3, uv4, col); + uint col = 4294967295; + ImGuiNative.ImDrawList_AddImageQuad((ImDrawList*)(NativePtr), user_texture_id, p1, p2, p3, p4, uv1, uv2, uv3, uv4, col); } public void AddImageQuad(IntPtr user_texture_id, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, Vector2 uv1, Vector2 uv2, Vector2 uv3, Vector2 uv4, uint col) { - ImGuiNative.ImDrawList_AddImageQuad(NativePtr, user_texture_id, p1, p2, p3, p4, uv1, uv2, uv3, uv4, col); + ImGuiNative.ImDrawList_AddImageQuad((ImDrawList*)(NativePtr), user_texture_id, p1, p2, p3, p4, uv1, uv2, uv3, uv4, col); } public void AddImageRounded(IntPtr user_texture_id, Vector2 p_min, Vector2 p_max, Vector2 uv_min, Vector2 uv_max, uint col, float rounding) { - ImDrawCornerFlags rounding_corners = ImDrawCornerFlags.All; - ImGuiNative.ImDrawList_AddImageRounded(NativePtr, user_texture_id, p_min, p_max, uv_min, uv_max, col, rounding, rounding_corners); + ImDrawFlags flags = (ImDrawFlags)0; + ImGuiNative.ImDrawList_AddImageRounded((ImDrawList*)(NativePtr), user_texture_id, p_min, p_max, uv_min, uv_max, col, rounding, flags); } - public void AddImageRounded(IntPtr user_texture_id, Vector2 p_min, Vector2 p_max, Vector2 uv_min, Vector2 uv_max, uint col, float rounding, ImDrawCornerFlags rounding_corners) + public void AddImageRounded(IntPtr user_texture_id, Vector2 p_min, Vector2 p_max, Vector2 uv_min, Vector2 uv_max, uint col, float rounding, ImDrawFlags flags) { - ImGuiNative.ImDrawList_AddImageRounded(NativePtr, user_texture_id, p_min, p_max, uv_min, uv_max, col, rounding, rounding_corners); + ImGuiNative.ImDrawList_AddImageRounded((ImDrawList*)(NativePtr), user_texture_id, p_min, p_max, uv_min, uv_max, col, rounding, flags); } public void AddLine(Vector2 p1, Vector2 p2, uint col) { float thickness = 1.0f; - ImGuiNative.ImDrawList_AddLine(NativePtr, p1, p2, col, thickness); + ImGuiNative.ImDrawList_AddLine((ImDrawList*)(NativePtr), p1, p2, col, thickness); } public void AddLine(Vector2 p1, Vector2 p2, uint col, float thickness) { - ImGuiNative.ImDrawList_AddLine(NativePtr, p1, p2, col, thickness); + ImGuiNative.ImDrawList_AddLine((ImDrawList*)(NativePtr), p1, p2, col, thickness); } public void AddNgon(Vector2 center, float radius, uint col, int num_segments) { float thickness = 1.0f; - ImGuiNative.ImDrawList_AddNgon(NativePtr, center, radius, col, num_segments, thickness); + ImGuiNative.ImDrawList_AddNgon((ImDrawList*)(NativePtr), center, radius, col, num_segments, thickness); } public void AddNgon(Vector2 center, float radius, uint col, int num_segments, float thickness) { - ImGuiNative.ImDrawList_AddNgon(NativePtr, center, radius, col, num_segments, thickness); + ImGuiNative.ImDrawList_AddNgon((ImDrawList*)(NativePtr), center, radius, col, num_segments, thickness); } public void AddNgonFilled(Vector2 center, float radius, uint col, int num_segments) { - ImGuiNative.ImDrawList_AddNgonFilled(NativePtr, center, radius, col, num_segments); + ImGuiNative.ImDrawList_AddNgonFilled((ImDrawList*)(NativePtr), center, radius, col, num_segments); } - public void AddPolyline(ref Vector2 points, int num_points, uint col, bool closed, float thickness) + public void AddPolyline(ref Vector2 points, int num_points, uint col, ImDrawFlags flags, float thickness) { - 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_AddPolyline((ImDrawList*)(NativePtr), native_points, num_points, col, flags, thickness); } } public void AddQuad(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, uint col) { float thickness = 1.0f; - ImGuiNative.ImDrawList_AddQuad(NativePtr, p1, p2, p3, p4, col, thickness); + ImGuiNative.ImDrawList_AddQuad((ImDrawList*)(NativePtr), p1, p2, p3, p4, col, thickness); } public void AddQuad(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, uint col, float thickness) { - ImGuiNative.ImDrawList_AddQuad(NativePtr, p1, p2, p3, p4, col, thickness); + ImGuiNative.ImDrawList_AddQuad((ImDrawList*)(NativePtr), p1, p2, p3, p4, col, thickness); } public void AddQuadFilled(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, uint col) { - ImGuiNative.ImDrawList_AddQuadFilled(NativePtr, p1, p2, p3, p4, col); + ImGuiNative.ImDrawList_AddQuadFilled((ImDrawList*)(NativePtr), p1, p2, p3, p4, col); } public void AddRect(Vector2 p_min, Vector2 p_max, uint col) { float rounding = 0.0f; - ImDrawCornerFlags rounding_corners = ImDrawCornerFlags.All; + ImDrawFlags flags = (ImDrawFlags)0; float thickness = 1.0f; - ImGuiNative.ImDrawList_AddRect(NativePtr, p_min, p_max, col, rounding, rounding_corners, thickness); + ImGuiNative.ImDrawList_AddRect((ImDrawList*)(NativePtr), p_min, p_max, col, rounding, flags, thickness); } public void AddRect(Vector2 p_min, Vector2 p_max, uint col, float rounding) { - ImDrawCornerFlags rounding_corners = ImDrawCornerFlags.All; + ImDrawFlags flags = (ImDrawFlags)0; float thickness = 1.0f; - ImGuiNative.ImDrawList_AddRect(NativePtr, p_min, p_max, col, rounding, rounding_corners, thickness); + ImGuiNative.ImDrawList_AddRect((ImDrawList*)(NativePtr), p_min, p_max, col, rounding, flags, thickness); } - public void AddRect(Vector2 p_min, Vector2 p_max, uint col, float rounding, ImDrawCornerFlags rounding_corners) + public void AddRect(Vector2 p_min, Vector2 p_max, uint col, float rounding, ImDrawFlags flags) { float thickness = 1.0f; - ImGuiNative.ImDrawList_AddRect(NativePtr, p_min, p_max, col, rounding, rounding_corners, thickness); + ImGuiNative.ImDrawList_AddRect((ImDrawList*)(NativePtr), p_min, p_max, col, rounding, flags, thickness); } - public void AddRect(Vector2 p_min, Vector2 p_max, uint col, float rounding, ImDrawCornerFlags rounding_corners, float thickness) + public void AddRect(Vector2 p_min, Vector2 p_max, uint col, float rounding, ImDrawFlags flags, float thickness) { - ImGuiNative.ImDrawList_AddRect(NativePtr, p_min, p_max, col, rounding, rounding_corners, thickness); + ImGuiNative.ImDrawList_AddRect((ImDrawList*)(NativePtr), p_min, p_max, col, rounding, flags, thickness); } public void AddRectFilled(Vector2 p_min, Vector2 p_max, uint col) { float rounding = 0.0f; - ImDrawCornerFlags rounding_corners = ImDrawCornerFlags.All; - ImGuiNative.ImDrawList_AddRectFilled(NativePtr, p_min, p_max, col, rounding, rounding_corners); + ImDrawFlags flags = (ImDrawFlags)0; + ImGuiNative.ImDrawList_AddRectFilled((ImDrawList*)(NativePtr), p_min, p_max, col, rounding, flags); } public void AddRectFilled(Vector2 p_min, Vector2 p_max, uint col, float rounding) { - ImDrawCornerFlags rounding_corners = ImDrawCornerFlags.All; - ImGuiNative.ImDrawList_AddRectFilled(NativePtr, p_min, p_max, col, rounding, rounding_corners); + ImDrawFlags flags = (ImDrawFlags)0; + ImGuiNative.ImDrawList_AddRectFilled((ImDrawList*)(NativePtr), p_min, p_max, col, rounding, flags); } - public void AddRectFilled(Vector2 p_min, Vector2 p_max, uint col, float rounding, ImDrawCornerFlags rounding_corners) + public void AddRectFilled(Vector2 p_min, Vector2 p_max, uint col, float rounding, ImDrawFlags flags) { - ImGuiNative.ImDrawList_AddRectFilled(NativePtr, p_min, p_max, col, rounding, rounding_corners); + ImGuiNative.ImDrawList_AddRectFilled((ImDrawList*)(NativePtr), p_min, p_max, col, rounding, flags); } public void AddRectFilledMultiColor(Vector2 p_min, Vector2 p_max, uint col_upr_left, uint col_upr_right, uint col_bot_right, uint col_bot_left) { - ImGuiNative.ImDrawList_AddRectFilledMultiColor(NativePtr, p_min, p_max, col_upr_left, col_upr_right, col_bot_right, col_bot_left); + ImGuiNative.ImDrawList_AddRectFilledMultiColor((ImDrawList*)(NativePtr), p_min, p_max, col_upr_left, col_upr_right, col_bot_right, col_bot_left); } public void AddTriangle(Vector2 p1, Vector2 p2, Vector2 p3, uint col) { float thickness = 1.0f; - ImGuiNative.ImDrawList_AddTriangle(NativePtr, p1, p2, p3, col, thickness); + ImGuiNative.ImDrawList_AddTriangle((ImDrawList*)(NativePtr), p1, p2, p3, col, thickness); } public void AddTriangle(Vector2 p1, Vector2 p2, Vector2 p3, uint col, float thickness) { - ImGuiNative.ImDrawList_AddTriangle(NativePtr, p1, p2, p3, col, thickness); + ImGuiNative.ImDrawList_AddTriangle((ImDrawList*)(NativePtr), p1, p2, p3, col, thickness); } public void AddTriangleFilled(Vector2 p1, Vector2 p2, Vector2 p3, uint col) { - ImGuiNative.ImDrawList_AddTriangleFilled(NativePtr, p1, p2, p3, col); + ImGuiNative.ImDrawList_AddTriangleFilled((ImDrawList*)(NativePtr), p1, p2, p3, col); } public void ChannelsMerge() { - ImGuiNative.ImDrawList_ChannelsMerge(NativePtr); + ImGuiNative.ImDrawList_ChannelsMerge((ImDrawList*)(NativePtr)); } public void ChannelsSetCurrent(int n) { - ImGuiNative.ImDrawList_ChannelsSetCurrent(NativePtr, n); + ImGuiNative.ImDrawList_ChannelsSetCurrent((ImDrawList*)(NativePtr), n); } public void ChannelsSplit(int count) { - ImGuiNative.ImDrawList_ChannelsSplit(NativePtr, count); - } - public void Clear() - { - ImGuiNative.ImDrawList_Clear(NativePtr); - } - public void ClearFreeMemory() - { - ImGuiNative.ImDrawList_ClearFreeMemory(NativePtr); + ImGuiNative.ImDrawList_ChannelsSplit((ImDrawList*)(NativePtr), count); } public ImDrawListPtr CloneOutput() { - ImDrawList* ret = ImGuiNative.ImDrawList_CloneOutput(NativePtr); + ImDrawList* ret = ImGuiNative.ImDrawList_CloneOutput((ImDrawList*)(NativePtr)); return new ImDrawListPtr(ret); } public void Destroy() { - ImGuiNative.ImDrawList_destroy(NativePtr); + ImGuiNative.ImDrawList_destroy((ImDrawList*)(NativePtr)); } public Vector2 GetClipRectMax() { - Vector2 ret = ImGuiNative.ImDrawList_GetClipRectMax(NativePtr); - return ret; + Vector2 __retval; + ImGuiNative.ImDrawList_GetClipRectMax(&__retval, (ImDrawList*)(NativePtr)); + return __retval; } public Vector2 GetClipRectMin() { - Vector2 ret = ImGuiNative.ImDrawList_GetClipRectMin(NativePtr); - return ret; + Vector2 __retval; + ImGuiNative.ImDrawList_GetClipRectMin(&__retval, (ImDrawList*)(NativePtr)); + return __retval; } public void PathArcTo(Vector2 center, float radius, float a_min, float a_max) { - int num_segments = 10; - ImGuiNative.ImDrawList_PathArcTo(NativePtr, center, radius, a_min, a_max, num_segments); + int num_segments = 0; + ImGuiNative.ImDrawList_PathArcTo((ImDrawList*)(NativePtr), center, radius, a_min, a_max, num_segments); } public void PathArcTo(Vector2 center, float radius, float a_min, float a_max, int num_segments) { - ImGuiNative.ImDrawList_PathArcTo(NativePtr, center, radius, a_min, a_max, num_segments); + ImGuiNative.ImDrawList_PathArcTo((ImDrawList*)(NativePtr), center, radius, a_min, a_max, num_segments); } public void PathArcToFast(Vector2 center, float radius, int a_min_of_12, int a_max_of_12) { - ImGuiNative.ImDrawList_PathArcToFast(NativePtr, center, radius, a_min_of_12, a_max_of_12); + ImGuiNative.ImDrawList_PathArcToFast((ImDrawList*)(NativePtr), center, radius, a_min_of_12, a_max_of_12); } - public void PathBezierCurveTo(Vector2 p2, Vector2 p3, Vector2 p4) + public void PathBezierCubicCurveTo(Vector2 p2, Vector2 p3, Vector2 p4) { int num_segments = 0; - ImGuiNative.ImDrawList_PathBezierCurveTo(NativePtr, p2, p3, p4, num_segments); + ImGuiNative.ImDrawList_PathBezierCubicCurveTo((ImDrawList*)(NativePtr), p2, p3, p4, num_segments); } - public void PathBezierCurveTo(Vector2 p2, Vector2 p3, Vector2 p4, int num_segments) + public void PathBezierCubicCurveTo(Vector2 p2, Vector2 p3, Vector2 p4, int num_segments) { - ImGuiNative.ImDrawList_PathBezierCurveTo(NativePtr, p2, p3, p4, num_segments); + ImGuiNative.ImDrawList_PathBezierCubicCurveTo((ImDrawList*)(NativePtr), p2, p3, p4, num_segments); + } + public void PathBezierQuadraticCurveTo(Vector2 p2, Vector2 p3) + { + int num_segments = 0; + ImGuiNative.ImDrawList_PathBezierQuadraticCurveTo((ImDrawList*)(NativePtr), p2, p3, num_segments); + } + public void PathBezierQuadraticCurveTo(Vector2 p2, Vector2 p3, int num_segments) + { + ImGuiNative.ImDrawList_PathBezierQuadraticCurveTo((ImDrawList*)(NativePtr), p2, p3, num_segments); } public void PathClear() { - ImGuiNative.ImDrawList_PathClear(NativePtr); + ImGuiNative.ImDrawList_PathClear((ImDrawList*)(NativePtr)); } public void PathFillConvex(uint col) { - ImGuiNative.ImDrawList_PathFillConvex(NativePtr, col); + ImGuiNative.ImDrawList_PathFillConvex((ImDrawList*)(NativePtr), col); } public void PathLineTo(Vector2 pos) { - ImGuiNative.ImDrawList_PathLineTo(NativePtr, pos); + ImGuiNative.ImDrawList_PathLineTo((ImDrawList*)(NativePtr), pos); } public void PathLineToMergeDuplicate(Vector2 pos) { - ImGuiNative.ImDrawList_PathLineToMergeDuplicate(NativePtr, pos); + ImGuiNative.ImDrawList_PathLineToMergeDuplicate((ImDrawList*)(NativePtr), pos); } public void PathRect(Vector2 rect_min, Vector2 rect_max) { float rounding = 0.0f; - ImDrawCornerFlags rounding_corners = ImDrawCornerFlags.All; - ImGuiNative.ImDrawList_PathRect(NativePtr, rect_min, rect_max, rounding, rounding_corners); + ImDrawFlags flags = (ImDrawFlags)0; + ImGuiNative.ImDrawList_PathRect((ImDrawList*)(NativePtr), rect_min, rect_max, rounding, flags); } public void PathRect(Vector2 rect_min, Vector2 rect_max, float rounding) { - ImDrawCornerFlags rounding_corners = ImDrawCornerFlags.All; - ImGuiNative.ImDrawList_PathRect(NativePtr, rect_min, rect_max, rounding, rounding_corners); + ImDrawFlags flags = (ImDrawFlags)0; + ImGuiNative.ImDrawList_PathRect((ImDrawList*)(NativePtr), rect_min, rect_max, rounding, flags); + } + public void PathRect(Vector2 rect_min, Vector2 rect_max, float rounding, ImDrawFlags flags) + { + ImGuiNative.ImDrawList_PathRect((ImDrawList*)(NativePtr), rect_min, rect_max, rounding, flags); } - public void PathRect(Vector2 rect_min, Vector2 rect_max, float rounding, ImDrawCornerFlags rounding_corners) + public void PathStroke(uint col) { - ImGuiNative.ImDrawList_PathRect(NativePtr, rect_min, rect_max, rounding, rounding_corners); + ImDrawFlags flags = (ImDrawFlags)0; + float thickness = 1.0f; + ImGuiNative.ImDrawList_PathStroke((ImDrawList*)(NativePtr), col, flags, thickness); } - public void PathStroke(uint col, bool closed) + public void PathStroke(uint col, ImDrawFlags flags) { - byte native_closed = closed ? (byte)1 : (byte)0; float thickness = 1.0f; - ImGuiNative.ImDrawList_PathStroke(NativePtr, col, native_closed, thickness); + ImGuiNative.ImDrawList_PathStroke((ImDrawList*)(NativePtr), col, flags, thickness); } - public void PathStroke(uint col, bool closed, float thickness) + public void PathStroke(uint col, ImDrawFlags flags, float thickness) { - byte native_closed = closed ? (byte)1 : (byte)0; - ImGuiNative.ImDrawList_PathStroke(NativePtr, col, native_closed, thickness); + ImGuiNative.ImDrawList_PathStroke((ImDrawList*)(NativePtr), col, flags, thickness); } public void PopClipRect() { - ImGuiNative.ImDrawList_PopClipRect(NativePtr); + ImGuiNative.ImDrawList_PopClipRect((ImDrawList*)(NativePtr)); } public void PopTextureID() { - ImGuiNative.ImDrawList_PopTextureID(NativePtr); + ImGuiNative.ImDrawList_PopTextureID((ImDrawList*)(NativePtr)); } 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) { - ImGuiNative.ImDrawList_PrimQuadUV(NativePtr, a, b, c, d, uv_a, uv_b, uv_c, uv_d, col); + ImGuiNative.ImDrawList_PrimQuadUV((ImDrawList*)(NativePtr), a, b, c, d, uv_a, uv_b, uv_c, uv_d, col); } public void PrimRect(Vector2 a, Vector2 b, uint col) { - ImGuiNative.ImDrawList_PrimRect(NativePtr, a, b, col); + ImGuiNative.ImDrawList_PrimRect((ImDrawList*)(NativePtr), a, b, col); } public void PrimRectUV(Vector2 a, Vector2 b, Vector2 uv_a, Vector2 uv_b, uint col) { - ImGuiNative.ImDrawList_PrimRectUV(NativePtr, a, b, uv_a, uv_b, col); + ImGuiNative.ImDrawList_PrimRectUV((ImDrawList*)(NativePtr), a, b, uv_a, uv_b, col); } public void PrimReserve(int idx_count, int vtx_count) { - ImGuiNative.ImDrawList_PrimReserve(NativePtr, idx_count, vtx_count); + ImGuiNative.ImDrawList_PrimReserve((ImDrawList*)(NativePtr), idx_count, vtx_count); } public void PrimUnreserve(int idx_count, int vtx_count) { - ImGuiNative.ImDrawList_PrimUnreserve(NativePtr, idx_count, vtx_count); + ImGuiNative.ImDrawList_PrimUnreserve((ImDrawList*)(NativePtr), idx_count, vtx_count); } public void PrimVtx(Vector2 pos, Vector2 uv, uint col) { - ImGuiNative.ImDrawList_PrimVtx(NativePtr, pos, uv, col); + ImGuiNative.ImDrawList_PrimVtx((ImDrawList*)(NativePtr), pos, uv, col); } public void PrimWriteIdx(ushort idx) { - ImGuiNative.ImDrawList_PrimWriteIdx(NativePtr, idx); + ImGuiNative.ImDrawList_PrimWriteIdx((ImDrawList*)(NativePtr), idx); } public void PrimWriteVtx(Vector2 pos, Vector2 uv, uint col) { - ImGuiNative.ImDrawList_PrimWriteVtx(NativePtr, pos, uv, col); + ImGuiNative.ImDrawList_PrimWriteVtx((ImDrawList*)(NativePtr), pos, uv, col); } public void PushClipRect(Vector2 clip_rect_min, Vector2 clip_rect_max) { byte intersect_with_current_clip_rect = 0; - ImGuiNative.ImDrawList_PushClipRect(NativePtr, clip_rect_min, clip_rect_max, intersect_with_current_clip_rect); + ImGuiNative.ImDrawList_PushClipRect((ImDrawList*)(NativePtr), clip_rect_min, clip_rect_max, intersect_with_current_clip_rect); } public 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.ImDrawList_PushClipRect(NativePtr, clip_rect_min, clip_rect_max, native_intersect_with_current_clip_rect); + ImGuiNative.ImDrawList_PushClipRect((ImDrawList*)(NativePtr), clip_rect_min, clip_rect_max, native_intersect_with_current_clip_rect); } public void PushClipRectFullScreen() { - ImGuiNative.ImDrawList_PushClipRectFullScreen(NativePtr); + ImGuiNative.ImDrawList_PushClipRectFullScreen((ImDrawList*)(NativePtr)); } public void PushTextureID(IntPtr texture_id) { - ImGuiNative.ImDrawList_PushTextureID(NativePtr, texture_id); - } - public void UpdateClipRect() - { - ImGuiNative.ImDrawList_UpdateClipRect(NativePtr); - } - public void UpdateTextureID() - { - ImGuiNative.ImDrawList_UpdateTextureID(NativePtr); + ImGuiNative.ImDrawList_PushTextureID((ImDrawList*)(NativePtr), texture_id); } } } diff --git a/ImGuiNET/Wrapper/Generated/ImDrawListFlags.gen.cs b/ImGuiNET/Wrapper/Generated/ImDrawListFlags.gen.cs index 722263c..e55321f 100644 --- a/ImGuiNET/Wrapper/Generated/ImDrawListFlags.gen.cs +++ b/ImGuiNET/Wrapper/Generated/ImDrawListFlags.gen.cs @@ -4,8 +4,9 @@ namespace ImGuiNET public enum ImDrawListFlags { None = 0, - AntiAliasedLines = 1 << 0, - AntiAliasedFill = 1 << 1, - AllowVtxOffset = 1 << 2, + AntiAliasedLines = 1, + AntiAliasedLinesUseTex = 2, + AntiAliasedFill = 4, + AllowVtxOffset = 8, } } diff --git a/ImGuiNET/Wrapper/Generated/ImDrawListSplitter.gen.cs b/ImGuiNET/Wrapper/Generated/ImDrawListSplitter.gen.cs index 5ef29da..14ec49e 100644 --- a/ImGuiNET/Wrapper/Generated/ImDrawListSplitter.gen.cs +++ b/ImGuiNET/Wrapper/Generated/ImDrawListSplitter.gen.cs @@ -1,7 +1,7 @@ using System; -using System.Runtime.CompilerServices; -using System.Text; using UnityEngine; +using Unity.Collections.LowLevel.Unsafe; +using System.Text; namespace ImGuiNET { @@ -19,35 +19,35 @@ public unsafe partial struct ImDrawListSplitterPtr public static implicit operator ImDrawListSplitterPtr(ImDrawListSplitter* nativePtr) => new ImDrawListSplitterPtr(nativePtr); public static implicit operator ImDrawListSplitter* (ImDrawListSplitterPtr wrappedPtr) => wrappedPtr.NativePtr; public static implicit operator ImDrawListSplitterPtr(IntPtr nativePtr) => new ImDrawListSplitterPtr(nativePtr); - public ref int _Current => ref Unsafe.AsRef(&NativePtr->_Current); - public ref int _Count => ref Unsafe.AsRef(&NativePtr->_Count); - public ImPtrVector _Channels => new ImPtrVector(NativePtr->_Channels, Unsafe.SizeOf()); + public ref int _Current => ref UnsafeUtility.AsRef(&NativePtr->_Current); + public ref int _Count => ref UnsafeUtility.AsRef(&NativePtr->_Count); + public ImPtrVector _Channels => new ImPtrVector(NativePtr->_Channels, UnsafeUtility.SizeOf()); public void Clear() { - ImGuiNative.ImDrawListSplitter_Clear(NativePtr); + ImGuiNative.ImDrawListSplitter_Clear((ImDrawListSplitter*)(NativePtr)); } public void ClearFreeMemory() { - ImGuiNative.ImDrawListSplitter_ClearFreeMemory(NativePtr); + ImGuiNative.ImDrawListSplitter_ClearFreeMemory((ImDrawListSplitter*)(NativePtr)); } public void Destroy() { - ImGuiNative.ImDrawListSplitter_destroy(NativePtr); + ImGuiNative.ImDrawListSplitter_destroy((ImDrawListSplitter*)(NativePtr)); } public void Merge(ImDrawListPtr draw_list) { ImDrawList* native_draw_list = draw_list.NativePtr; - ImGuiNative.ImDrawListSplitter_Merge(NativePtr, native_draw_list); + ImGuiNative.ImDrawListSplitter_Merge((ImDrawListSplitter*)(NativePtr), native_draw_list); } public void SetCurrentChannel(ImDrawListPtr draw_list, int channel_idx) { ImDrawList* native_draw_list = draw_list.NativePtr; - ImGuiNative.ImDrawListSplitter_SetCurrentChannel(NativePtr, native_draw_list, channel_idx); + ImGuiNative.ImDrawListSplitter_SetCurrentChannel((ImDrawListSplitter*)(NativePtr), native_draw_list, channel_idx); } public void Split(ImDrawListPtr draw_list, int count) { ImDrawList* native_draw_list = draw_list.NativePtr; - ImGuiNative.ImDrawListSplitter_Split(NativePtr, native_draw_list, count); + ImGuiNative.ImDrawListSplitter_Split((ImDrawListSplitter*)(NativePtr), native_draw_list, count); } } } diff --git a/ImGuiNET/Wrapper/Generated/ImDrawVert.gen.cs b/ImGuiNET/Wrapper/Generated/ImDrawVert.gen.cs index 1271792..b642ea7 100644 --- a/ImGuiNET/Wrapper/Generated/ImDrawVert.gen.cs +++ b/ImGuiNET/Wrapper/Generated/ImDrawVert.gen.cs @@ -1,7 +1,7 @@ using System; -using System.Runtime.CompilerServices; -using System.Text; using UnityEngine; +using Unity.Collections.LowLevel.Unsafe; +using System.Text; namespace ImGuiNET { @@ -19,8 +19,8 @@ public unsafe partial struct ImDrawVertPtr public static implicit operator ImDrawVertPtr(ImDrawVert* nativePtr) => new ImDrawVertPtr(nativePtr); public static implicit operator ImDrawVert* (ImDrawVertPtr wrappedPtr) => wrappedPtr.NativePtr; public static implicit operator ImDrawVertPtr(IntPtr nativePtr) => new ImDrawVertPtr(nativePtr); - public ref Vector2 pos => ref Unsafe.AsRef(&NativePtr->pos); - public ref Vector2 uv => ref Unsafe.AsRef(&NativePtr->uv); - public ref uint col => ref Unsafe.AsRef(&NativePtr->col); + public ref Vector2 pos => ref UnsafeUtility.AsRef(&NativePtr->pos); + public ref Vector2 uv => ref UnsafeUtility.AsRef(&NativePtr->uv); + public ref uint col => ref UnsafeUtility.AsRef(&NativePtr->col); } } diff --git a/ImGuiNET/Wrapper/Generated/ImFont.gen.cs b/ImGuiNET/Wrapper/Generated/ImFont.gen.cs index 4f97ccf..2a5a804 100644 --- a/ImGuiNET/Wrapper/Generated/ImFont.gen.cs +++ b/ImGuiNET/Wrapper/Generated/ImFont.gen.cs @@ -1,7 +1,7 @@ using System; -using System.Runtime.CompilerServices; -using System.Text; using UnityEngine; +using Unity.Collections.LowLevel.Unsafe; +using System.Text; namespace ImGuiNET { @@ -13,17 +13,18 @@ public unsafe partial struct ImFont public ImVector IndexLookup; public ImVector Glyphs; public ImFontGlyph* FallbackGlyph; - public Vector2 DisplayOffset; public ImFontAtlas* ContainerAtlas; public ImFontConfig* ConfigData; public short ConfigDataCount; public ushort FallbackChar; public ushort EllipsisChar; + public ushort DotChar; public byte DirtyLookupTables; public float Scale; public float Ascent; public float Descent; public int MetricsTotalSurface; + public fixed byte Used4kPagesMap[2]; } public unsafe partial struct ImFontPtr { @@ -34,85 +35,88 @@ public unsafe partial struct ImFontPtr public static implicit operator ImFont* (ImFontPtr wrappedPtr) => wrappedPtr.NativePtr; public static implicit operator ImFontPtr(IntPtr nativePtr) => new ImFontPtr(nativePtr); public ImVector IndexAdvanceX => new ImVector(NativePtr->IndexAdvanceX); - public ref float FallbackAdvanceX => ref Unsafe.AsRef(&NativePtr->FallbackAdvanceX); - public ref float FontSize => ref Unsafe.AsRef(&NativePtr->FontSize); + public ref float FallbackAdvanceX => ref UnsafeUtility.AsRef(&NativePtr->FallbackAdvanceX); + public ref float FontSize => ref UnsafeUtility.AsRef(&NativePtr->FontSize); public ImVector IndexLookup => new ImVector(NativePtr->IndexLookup); - public ImPtrVector Glyphs => new ImPtrVector(NativePtr->Glyphs, Unsafe.SizeOf()); + public ImPtrVector Glyphs => new ImPtrVector(NativePtr->Glyphs, UnsafeUtility.SizeOf()); public ImFontGlyphPtr FallbackGlyph => new ImFontGlyphPtr(NativePtr->FallbackGlyph); - public ref Vector2 DisplayOffset => ref Unsafe.AsRef(&NativePtr->DisplayOffset); public ImFontAtlasPtr ContainerAtlas => new ImFontAtlasPtr(NativePtr->ContainerAtlas); public ImFontConfigPtr ConfigData => new ImFontConfigPtr(NativePtr->ConfigData); - public ref short ConfigDataCount => ref Unsafe.AsRef(&NativePtr->ConfigDataCount); - public ref ushort FallbackChar => ref Unsafe.AsRef(&NativePtr->FallbackChar); - public ref ushort EllipsisChar => ref Unsafe.AsRef(&NativePtr->EllipsisChar); - public ref bool DirtyLookupTables => ref Unsafe.AsRef(&NativePtr->DirtyLookupTables); - public ref float Scale => ref Unsafe.AsRef(&NativePtr->Scale); - public ref float Ascent => ref Unsafe.AsRef(&NativePtr->Ascent); - public ref float Descent => ref Unsafe.AsRef(&NativePtr->Descent); - public ref int MetricsTotalSurface => ref Unsafe.AsRef(&NativePtr->MetricsTotalSurface); - 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 ref short ConfigDataCount => ref UnsafeUtility.AsRef(&NativePtr->ConfigDataCount); + public ref ushort FallbackChar => ref UnsafeUtility.AsRef(&NativePtr->FallbackChar); + public ref ushort EllipsisChar => ref UnsafeUtility.AsRef(&NativePtr->EllipsisChar); + public ref ushort DotChar => ref UnsafeUtility.AsRef(&NativePtr->DotChar); + public ref bool DirtyLookupTables => ref UnsafeUtility.AsRef(&NativePtr->DirtyLookupTables); + public ref float Scale => ref UnsafeUtility.AsRef(&NativePtr->Scale); + public ref float Ascent => ref UnsafeUtility.AsRef(&NativePtr->Ascent); + public ref float Descent => ref UnsafeUtility.AsRef(&NativePtr->Descent); + public ref int MetricsTotalSurface => ref UnsafeUtility.AsRef(&NativePtr->MetricsTotalSurface); + public RangeAccessor Used4kPagesMap => new RangeAccessor(NativePtr->Used4kPagesMap, 2); + public void AddGlyph(ImFontConfigPtr src_cfg, ushort c, float x0, float y0, float x1, float y1, float u0, float v0, float u1, float v1, float advance_x) { - ImGuiNative.ImFont_AddGlyph(NativePtr, c, x0, y0, x1, y1, u0, v0, u1, v1, advance_x); + ImFontConfig* native_src_cfg = src_cfg.NativePtr; + ImGuiNative.ImFont_AddGlyph((ImFont*)(NativePtr), native_src_cfg, c, x0, y0, x1, y1, u0, v0, u1, v1, advance_x); } public void AddRemapChar(ushort dst, ushort src) { byte overwrite_dst = 1; - ImGuiNative.ImFont_AddRemapChar(NativePtr, dst, src, overwrite_dst); + ImGuiNative.ImFont_AddRemapChar((ImFont*)(NativePtr), dst, src, overwrite_dst); } public void AddRemapChar(ushort dst, ushort src, bool overwrite_dst) { byte native_overwrite_dst = overwrite_dst ? (byte)1 : (byte)0; - ImGuiNative.ImFont_AddRemapChar(NativePtr, dst, src, native_overwrite_dst); + ImGuiNative.ImFont_AddRemapChar((ImFont*)(NativePtr), dst, src, native_overwrite_dst); } public void BuildLookupTable() { - ImGuiNative.ImFont_BuildLookupTable(NativePtr); + ImGuiNative.ImFont_BuildLookupTable((ImFont*)(NativePtr)); } public void ClearOutputData() { - ImGuiNative.ImFont_ClearOutputData(NativePtr); + ImGuiNative.ImFont_ClearOutputData((ImFont*)(NativePtr)); } public void Destroy() { - ImGuiNative.ImFont_destroy(NativePtr); + ImGuiNative.ImFont_destroy((ImFont*)(NativePtr)); } public ImFontGlyphPtr FindGlyph(ushort c) { - ImFontGlyph* ret = ImGuiNative.ImFont_FindGlyph(NativePtr, c); + ImFontGlyph* ret = ImGuiNative.ImFont_FindGlyph((ImFont*)(NativePtr), c); return new ImFontGlyphPtr(ret); } public ImFontGlyphPtr FindGlyphNoFallback(ushort c) { - ImFontGlyph* ret = ImGuiNative.ImFont_FindGlyphNoFallback(NativePtr, c); + ImFontGlyph* ret = ImGuiNative.ImFont_FindGlyphNoFallback((ImFont*)(NativePtr), c); return new ImFontGlyphPtr(ret); } public float GetCharAdvance(ushort c) { - float ret = ImGuiNative.ImFont_GetCharAdvance(NativePtr, c); + float ret = ImGuiNative.ImFont_GetCharAdvance((ImFont*)(NativePtr), c); return ret; } public string GetDebugName() { - byte* ret = ImGuiNative.ImFont_GetDebugName(NativePtr); + byte* ret = ImGuiNative.ImFont_GetDebugName((ImFont*)(NativePtr)); return Util.StringFromPtr(ret); } public void GrowIndex(int new_size) { - ImGuiNative.ImFont_GrowIndex(NativePtr, new_size); + ImGuiNative.ImFont_GrowIndex((ImFont*)(NativePtr), new_size); } public bool IsLoaded() { - byte ret = ImGuiNative.ImFont_IsLoaded(NativePtr); + byte ret = ImGuiNative.ImFont_IsLoaded((ImFont*)(NativePtr)); return ret != 0; } public void RenderChar(ImDrawListPtr draw_list, float size, Vector2 pos, uint col, ushort c) { ImDrawList* native_draw_list = draw_list.NativePtr; - ImGuiNative.ImFont_RenderChar(NativePtr, native_draw_list, size, pos, col, c); + ImGuiNative.ImFont_RenderChar((ImFont*)(NativePtr), native_draw_list, size, pos, col, c); } - public void SetFallbackChar(ushort c) + public void SetGlyphVisible(ushort c, bool visible) { - ImGuiNative.ImFont_SetFallbackChar(NativePtr, c); + byte native_visible = visible ? (byte)1 : (byte)0; + ImGuiNative.ImFont_SetGlyphVisible((ImFont*)(NativePtr), c, native_visible); } } } diff --git a/ImGuiNET/Wrapper/Generated/ImFontAtlas.gen.cs b/ImGuiNET/Wrapper/Generated/ImFontAtlas.gen.cs index 4621d03..5bc6c4e 100644 --- a/ImGuiNET/Wrapper/Generated/ImFontAtlas.gen.cs +++ b/ImGuiNET/Wrapper/Generated/ImFontAtlas.gen.cs @@ -1,17 +1,19 @@ using System; -using System.Runtime.CompilerServices; -using System.Text; using UnityEngine; +using Unity.Collections.LowLevel.Unsafe; +using System.Text; namespace ImGuiNET { public unsafe partial struct ImFontAtlas { - public byte Locked; public ImFontAtlasFlags Flags; public IntPtr TexID; public int TexDesiredWidth; public int TexGlyphPadding; + public byte Locked; + public byte TexReady; + public byte TexPixelsUseColors; public byte* TexPixelsAlpha8; public uint* TexPixelsRGBA32; public int TexWidth; @@ -21,7 +23,74 @@ public unsafe partial struct ImFontAtlas public ImVector Fonts; public ImVector CustomRects; public ImVector ConfigData; - public fixed int CustomRectIds[1]; + public Vector4 TexUvLines_0; + public Vector4 TexUvLines_1; + public Vector4 TexUvLines_2; + public Vector4 TexUvLines_3; + public Vector4 TexUvLines_4; + public Vector4 TexUvLines_5; + public Vector4 TexUvLines_6; + public Vector4 TexUvLines_7; + public Vector4 TexUvLines_8; + public Vector4 TexUvLines_9; + public Vector4 TexUvLines_10; + public Vector4 TexUvLines_11; + public Vector4 TexUvLines_12; + public Vector4 TexUvLines_13; + public Vector4 TexUvLines_14; + public Vector4 TexUvLines_15; + public Vector4 TexUvLines_16; + public Vector4 TexUvLines_17; + public Vector4 TexUvLines_18; + public Vector4 TexUvLines_19; + public Vector4 TexUvLines_20; + public Vector4 TexUvLines_21; + public Vector4 TexUvLines_22; + public Vector4 TexUvLines_23; + public Vector4 TexUvLines_24; + public Vector4 TexUvLines_25; + public Vector4 TexUvLines_26; + public Vector4 TexUvLines_27; + public Vector4 TexUvLines_28; + public Vector4 TexUvLines_29; + public Vector4 TexUvLines_30; + public Vector4 TexUvLines_31; + public Vector4 TexUvLines_32; + public Vector4 TexUvLines_33; + public Vector4 TexUvLines_34; + public Vector4 TexUvLines_35; + public Vector4 TexUvLines_36; + public Vector4 TexUvLines_37; + public Vector4 TexUvLines_38; + public Vector4 TexUvLines_39; + public Vector4 TexUvLines_40; + public Vector4 TexUvLines_41; + public Vector4 TexUvLines_42; + public Vector4 TexUvLines_43; + public Vector4 TexUvLines_44; + public Vector4 TexUvLines_45; + public Vector4 TexUvLines_46; + public Vector4 TexUvLines_47; + public Vector4 TexUvLines_48; + public Vector4 TexUvLines_49; + public Vector4 TexUvLines_50; + public Vector4 TexUvLines_51; + public Vector4 TexUvLines_52; + public Vector4 TexUvLines_53; + public Vector4 TexUvLines_54; + public Vector4 TexUvLines_55; + public Vector4 TexUvLines_56; + public Vector4 TexUvLines_57; + public Vector4 TexUvLines_58; + public Vector4 TexUvLines_59; + public Vector4 TexUvLines_60; + public Vector4 TexUvLines_61; + public Vector4 TexUvLines_62; + public Vector4 TexUvLines_63; + public IntPtr* FontBuilderIO; + public uint FontBuilderFlags; + public int PackIdMouseCursors; + public int PackIdLines; } public unsafe partial struct ImFontAtlasPtr { @@ -31,55 +100,61 @@ public unsafe partial struct ImFontAtlasPtr public static implicit operator ImFontAtlasPtr(ImFontAtlas* nativePtr) => new ImFontAtlasPtr(nativePtr); public static implicit operator ImFontAtlas* (ImFontAtlasPtr wrappedPtr) => wrappedPtr.NativePtr; public static implicit operator ImFontAtlasPtr(IntPtr nativePtr) => new ImFontAtlasPtr(nativePtr); - public ref bool Locked => ref Unsafe.AsRef(&NativePtr->Locked); - public ref ImFontAtlasFlags Flags => ref Unsafe.AsRef(&NativePtr->Flags); - public ref IntPtr TexID => ref Unsafe.AsRef(&NativePtr->TexID); - public ref int TexDesiredWidth => ref Unsafe.AsRef(&NativePtr->TexDesiredWidth); - public ref int TexGlyphPadding => ref Unsafe.AsRef(&NativePtr->TexGlyphPadding); + public ref ImFontAtlasFlags Flags => ref UnsafeUtility.AsRef(&NativePtr->Flags); + public ref IntPtr TexID => ref UnsafeUtility.AsRef(&NativePtr->TexID); + public ref int TexDesiredWidth => ref UnsafeUtility.AsRef(&NativePtr->TexDesiredWidth); + public ref int TexGlyphPadding => ref UnsafeUtility.AsRef(&NativePtr->TexGlyphPadding); + public ref bool Locked => ref UnsafeUtility.AsRef(&NativePtr->Locked); + public ref bool TexReady => ref UnsafeUtility.AsRef(&NativePtr->TexReady); + public ref bool TexPixelsUseColors => ref UnsafeUtility.AsRef(&NativePtr->TexPixelsUseColors); public IntPtr TexPixelsAlpha8 { get => (IntPtr)NativePtr->TexPixelsAlpha8; set => NativePtr->TexPixelsAlpha8 = (byte*)value; } public IntPtr TexPixelsRGBA32 { get => (IntPtr)NativePtr->TexPixelsRGBA32; set => NativePtr->TexPixelsRGBA32 = (uint*)value; } - public ref int TexWidth => ref Unsafe.AsRef(&NativePtr->TexWidth); - public ref int TexHeight => ref Unsafe.AsRef(&NativePtr->TexHeight); - public ref Vector2 TexUvScale => ref Unsafe.AsRef(&NativePtr->TexUvScale); - public ref Vector2 TexUvWhitePixel => ref Unsafe.AsRef(&NativePtr->TexUvWhitePixel); + public ref int TexWidth => ref UnsafeUtility.AsRef(&NativePtr->TexWidth); + public ref int TexHeight => ref UnsafeUtility.AsRef(&NativePtr->TexHeight); + public ref Vector2 TexUvScale => ref UnsafeUtility.AsRef(&NativePtr->TexUvScale); + public ref Vector2 TexUvWhitePixel => ref UnsafeUtility.AsRef(&NativePtr->TexUvWhitePixel); public ImVector Fonts => new ImVector(NativePtr->Fonts); - public ImPtrVector CustomRects => new ImPtrVector(NativePtr->CustomRects, Unsafe.SizeOf()); - public ImPtrVector ConfigData => new ImPtrVector(NativePtr->ConfigData, Unsafe.SizeOf()); - public RangeAccessor CustomRectIds => new RangeAccessor(NativePtr->CustomRectIds, 1); + public ImPtrVector CustomRects => new ImPtrVector(NativePtr->CustomRects, UnsafeUtility.SizeOf()); + public ImPtrVector ConfigData => new ImPtrVector(NativePtr->ConfigData, UnsafeUtility.SizeOf()); + public RangeAccessor TexUvLines => new RangeAccessor(&NativePtr->TexUvLines_0, 64); + public IntPtr FontBuilderIO { get => (IntPtr)NativePtr->FontBuilderIO; set => NativePtr->FontBuilderIO = (IntPtr*)value; } + public ref uint FontBuilderFlags => ref UnsafeUtility.AsRef(&NativePtr->FontBuilderFlags); + public ref int PackIdMouseCursors => ref UnsafeUtility.AsRef(&NativePtr->PackIdMouseCursors); + public ref int PackIdLines => ref UnsafeUtility.AsRef(&NativePtr->PackIdLines); public int AddCustomRectFontGlyph(ImFontPtr font, ushort id, int width, int height, float advance_x) { ImFont* native_font = font.NativePtr; Vector2 offset = new Vector2(); - int ret = ImGuiNative.ImFontAtlas_AddCustomRectFontGlyph(NativePtr, native_font, id, width, height, advance_x, offset); + int ret = ImGuiNative.ImFontAtlas_AddCustomRectFontGlyph((ImFontAtlas*)(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); + int ret = ImGuiNative.ImFontAtlas_AddCustomRectFontGlyph((ImFontAtlas*)(NativePtr), native_font, id, width, height, advance_x, offset); return ret; } - public int AddCustomRectRegular(uint id, int width, int height) + public int AddCustomRectRegular(int width, int height) { - int ret = ImGuiNative.ImFontAtlas_AddCustomRectRegular(NativePtr, id, width, height); + int ret = ImGuiNative.ImFontAtlas_AddCustomRectRegular((ImFontAtlas*)(NativePtr), 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); + ImFont* ret = ImGuiNative.ImFontAtlas_AddFont((ImFontAtlas*)(NativePtr), native_font_cfg); return new ImFontPtr(ret); } public ImFontPtr AddFontDefault() { ImFontConfig* font_cfg = null; - ImFont* ret = ImGuiNative.ImFontAtlas_AddFontDefault(NativePtr, font_cfg); + ImFont* ret = ImGuiNative.ImFontAtlas_AddFontDefault((ImFontAtlas*)(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); + ImFont* ret = ImGuiNative.ImFontAtlas_AddFontDefault((ImFontAtlas*)(NativePtr), native_font_cfg); return new ImFontPtr(ret); } public ImFontPtr AddFontFromFileTTF(string filename, float size_pixels) @@ -104,7 +179,7 @@ public ImFontPtr AddFontFromFileTTF(string filename, float size_pixels) 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); + ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromFileTTF((ImFontAtlas*)(NativePtr), native_filename, size_pixels, font_cfg, glyph_ranges); if (filename_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_filename); @@ -133,7 +208,7 @@ public ImFontPtr AddFontFromFileTTF(string filename, float size_pixels, ImFontCo 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); + ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromFileTTF((ImFontAtlas*)(NativePtr), native_filename, size_pixels, native_font_cfg, glyph_ranges); if (filename_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_filename); @@ -162,7 +237,7 @@ public ImFontPtr AddFontFromFileTTF(string filename, float size_pixels, ImFontCo 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); + ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromFileTTF((ImFontAtlas*)(NativePtr), native_filename, size_pixels, native_font_cfg, native_glyph_ranges); if (filename_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_filename); @@ -191,7 +266,7 @@ public ImFontPtr AddFontFromMemoryCompressedBase85TTF(string compressed_font_dat else { native_compressed_font_data_base85 = null; } ImFontConfig* font_cfg = null; ushort* glyph_ranges = null; - ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryCompressedBase85TTF(NativePtr, native_compressed_font_data_base85, size_pixels, font_cfg, glyph_ranges); + ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryCompressedBase85TTF((ImFontAtlas*)(NativePtr), native_compressed_font_data_base85, size_pixels, font_cfg, glyph_ranges); if (compressed_font_data_base85_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_compressed_font_data_base85); @@ -220,7 +295,7 @@ public ImFontPtr AddFontFromMemoryCompressedBase85TTF(string compressed_font_dat else { native_compressed_font_data_base85 = null; } ImFontConfig* native_font_cfg = font_cfg.NativePtr; ushort* glyph_ranges = null; - ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryCompressedBase85TTF(NativePtr, native_compressed_font_data_base85, size_pixels, native_font_cfg, glyph_ranges); + ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryCompressedBase85TTF((ImFontAtlas*)(NativePtr), native_compressed_font_data_base85, size_pixels, native_font_cfg, glyph_ranges); if (compressed_font_data_base85_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_compressed_font_data_base85); @@ -249,7 +324,7 @@ public ImFontPtr AddFontFromMemoryCompressedBase85TTF(string compressed_font_dat else { native_compressed_font_data_base85 = null; } ImFontConfig* native_font_cfg = font_cfg.NativePtr; ushort* native_glyph_ranges = (ushort*)glyph_ranges.ToPointer(); - ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryCompressedBase85TTF(NativePtr, native_compressed_font_data_base85, size_pixels, native_font_cfg, native_glyph_ranges); + ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryCompressedBase85TTF((ImFontAtlas*)(NativePtr), native_compressed_font_data_base85, size_pixels, native_font_cfg, native_glyph_ranges); if (compressed_font_data_base85_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_compressed_font_data_base85); @@ -261,7 +336,7 @@ public ImFontPtr AddFontFromMemoryCompressedTTF(IntPtr compressed_font_data, int void* native_compressed_font_data = (void*)compressed_font_data.ToPointer(); ImFontConfig* font_cfg = null; ushort* glyph_ranges = null; - ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryCompressedTTF(NativePtr, native_compressed_font_data, compressed_font_size, size_pixels, font_cfg, glyph_ranges); + ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryCompressedTTF((ImFontAtlas*)(NativePtr), native_compressed_font_data, compressed_font_size, size_pixels, font_cfg, glyph_ranges); return new ImFontPtr(ret); } public ImFontPtr AddFontFromMemoryCompressedTTF(IntPtr compressed_font_data, int compressed_font_size, float size_pixels, ImFontConfigPtr font_cfg) @@ -269,7 +344,7 @@ public ImFontPtr AddFontFromMemoryCompressedTTF(IntPtr compressed_font_data, int void* native_compressed_font_data = (void*)compressed_font_data.ToPointer(); ImFontConfig* native_font_cfg = font_cfg.NativePtr; ushort* glyph_ranges = null; - ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryCompressedTTF(NativePtr, native_compressed_font_data, compressed_font_size, size_pixels, native_font_cfg, glyph_ranges); + ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryCompressedTTF((ImFontAtlas*)(NativePtr), native_compressed_font_data, compressed_font_size, size_pixels, native_font_cfg, glyph_ranges); return new ImFontPtr(ret); } public ImFontPtr AddFontFromMemoryCompressedTTF(IntPtr compressed_font_data, int compressed_font_size, float size_pixels, ImFontConfigPtr font_cfg, IntPtr glyph_ranges) @@ -277,7 +352,7 @@ public ImFontPtr AddFontFromMemoryCompressedTTF(IntPtr compressed_font_data, int void* native_compressed_font_data = (void*)compressed_font_data.ToPointer(); ImFontConfig* native_font_cfg = font_cfg.NativePtr; ushort* native_glyph_ranges = (ushort*)glyph_ranges.ToPointer(); - ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryCompressedTTF(NativePtr, native_compressed_font_data, compressed_font_size, size_pixels, native_font_cfg, native_glyph_ranges); + ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryCompressedTTF((ImFontAtlas*)(NativePtr), native_compressed_font_data, compressed_font_size, size_pixels, native_font_cfg, native_glyph_ranges); return new ImFontPtr(ret); } public ImFontPtr AddFontFromMemoryTTF(IntPtr font_data, int font_size, float size_pixels) @@ -285,7 +360,7 @@ public ImFontPtr AddFontFromMemoryTTF(IntPtr font_data, int font_size, float siz void* native_font_data = (void*)font_data.ToPointer(); ImFontConfig* font_cfg = null; ushort* glyph_ranges = null; - ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryTTF(NativePtr, native_font_data, font_size, size_pixels, font_cfg, glyph_ranges); + ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryTTF((ImFontAtlas*)(NativePtr), native_font_data, font_size, size_pixels, font_cfg, glyph_ranges); return new ImFontPtr(ret); } public ImFontPtr AddFontFromMemoryTTF(IntPtr font_data, int font_size, float size_pixels, ImFontConfigPtr font_cfg) @@ -293,7 +368,7 @@ public ImFontPtr AddFontFromMemoryTTF(IntPtr font_data, int font_size, float siz void* native_font_data = (void*)font_data.ToPointer(); ImFontConfig* native_font_cfg = font_cfg.NativePtr; ushort* glyph_ranges = null; - ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryTTF(NativePtr, native_font_data, font_size, size_pixels, native_font_cfg, glyph_ranges); + ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryTTF((ImFontAtlas*)(NativePtr), native_font_data, font_size, size_pixels, native_font_cfg, glyph_ranges); return new ImFontPtr(ret); } public ImFontPtr AddFontFromMemoryTTF(IntPtr font_data, int font_size, float size_pixels, ImFontConfigPtr font_cfg, IntPtr glyph_ranges) @@ -301,12 +376,12 @@ public ImFontPtr AddFontFromMemoryTTF(IntPtr font_data, int font_size, float siz void* native_font_data = (void*)font_data.ToPointer(); ImFontConfig* native_font_cfg = font_cfg.NativePtr; ushort* native_glyph_ranges = (ushort*)glyph_ranges.ToPointer(); - ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryTTF(NativePtr, native_font_data, font_size, size_pixels, native_font_cfg, native_glyph_ranges); + ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryTTF((ImFontAtlas*)(NativePtr), native_font_data, font_size, size_pixels, native_font_cfg, native_glyph_ranges); return new ImFontPtr(ret); } public bool Build() { - byte ret = ImGuiNative.ImFontAtlas_Build(NativePtr); + byte ret = ImGuiNative.ImFontAtlas_Build((ImFontAtlas*)(NativePtr)); return ret != 0; } public void CalcCustomRectUV(ImFontAtlasCustomRectPtr rect, out Vector2 out_uv_min, out Vector2 out_uv_max) @@ -316,73 +391,73 @@ public void CalcCustomRectUV(ImFontAtlasCustomRectPtr rect, out Vector2 out_uv_m { fixed (Vector2* native_out_uv_max = &out_uv_max) { - ImGuiNative.ImFontAtlas_CalcCustomRectUV(NativePtr, native_rect, native_out_uv_min, native_out_uv_max); + ImGuiNative.ImFontAtlas_CalcCustomRectUV((ImFontAtlas*)(NativePtr), native_rect, native_out_uv_min, native_out_uv_max); } } } public void Clear() { - ImGuiNative.ImFontAtlas_Clear(NativePtr); + ImGuiNative.ImFontAtlas_Clear((ImFontAtlas*)(NativePtr)); } public void ClearFonts() { - ImGuiNative.ImFontAtlas_ClearFonts(NativePtr); + ImGuiNative.ImFontAtlas_ClearFonts((ImFontAtlas*)(NativePtr)); } public void ClearInputData() { - ImGuiNative.ImFontAtlas_ClearInputData(NativePtr); + ImGuiNative.ImFontAtlas_ClearInputData((ImFontAtlas*)(NativePtr)); } public void ClearTexData() { - ImGuiNative.ImFontAtlas_ClearTexData(NativePtr); + ImGuiNative.ImFontAtlas_ClearTexData((ImFontAtlas*)(NativePtr)); } public void Destroy() { - ImGuiNative.ImFontAtlas_destroy(NativePtr); + ImGuiNative.ImFontAtlas_destroy((ImFontAtlas*)(NativePtr)); } public ImFontAtlasCustomRectPtr GetCustomRectByIndex(int index) { - ImFontAtlasCustomRect* ret = ImGuiNative.ImFontAtlas_GetCustomRectByIndex(NativePtr, index); + ImFontAtlasCustomRect* ret = ImGuiNative.ImFontAtlas_GetCustomRectByIndex((ImFontAtlas*)(NativePtr), index); return new ImFontAtlasCustomRectPtr(ret); } public IntPtr GetGlyphRangesChineseFull() { - ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesChineseFull(NativePtr); + ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesChineseFull((ImFontAtlas*)(NativePtr)); return (IntPtr)ret; } public IntPtr GetGlyphRangesChineseSimplifiedCommon() { - ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesChineseSimplifiedCommon(NativePtr); + ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesChineseSimplifiedCommon((ImFontAtlas*)(NativePtr)); return (IntPtr)ret; } public IntPtr GetGlyphRangesCyrillic() { - ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesCyrillic(NativePtr); + ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesCyrillic((ImFontAtlas*)(NativePtr)); return (IntPtr)ret; } public IntPtr GetGlyphRangesDefault() { - ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesDefault(NativePtr); + ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesDefault((ImFontAtlas*)(NativePtr)); return (IntPtr)ret; } public IntPtr GetGlyphRangesJapanese() { - ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesJapanese(NativePtr); + ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesJapanese((ImFontAtlas*)(NativePtr)); return (IntPtr)ret; } public IntPtr GetGlyphRangesKorean() { - ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesKorean(NativePtr); + ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesKorean((ImFontAtlas*)(NativePtr)); return (IntPtr)ret; } public IntPtr GetGlyphRangesThai() { - ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesThai(NativePtr); + ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesThai((ImFontAtlas*)(NativePtr)); return (IntPtr)ret; } public IntPtr GetGlyphRangesVietnamese() { - ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesVietnamese(NativePtr); + ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesVietnamese((ImFontAtlas*)(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) @@ -395,7 +470,7 @@ public bool GetMouseCursorTexData(ImGuiMouseCursor cursor, out Vector2 out_offse { 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); + byte ret = ImGuiNative.ImFontAtlas_GetMouseCursorTexData((ImFontAtlas*)(NativePtr), cursor, native_out_offset, native_out_size, native_out_uv_border, native_out_uv_fill); return ret != 0; } } @@ -411,7 +486,7 @@ public void GetTexDataAsAlpha8(out byte* out_pixels, out int out_width, out int { fixed (int* native_out_height = &out_height) { - ImGuiNative.ImFontAtlas_GetTexDataAsAlpha8(NativePtr, native_out_pixels, native_out_width, native_out_height, out_bytes_per_pixel); + ImGuiNative.ImFontAtlas_GetTexDataAsAlpha8((ImFontAtlas*)(NativePtr), native_out_pixels, native_out_width, native_out_height, out_bytes_per_pixel); } } } @@ -426,7 +501,7 @@ public void GetTexDataAsAlpha8(out byte* out_pixels, out int out_width, out int { fixed (int* native_out_bytes_per_pixel = &out_bytes_per_pixel) { - ImGuiNative.ImFontAtlas_GetTexDataAsAlpha8(NativePtr, native_out_pixels, native_out_width, native_out_height, native_out_bytes_per_pixel); + ImGuiNative.ImFontAtlas_GetTexDataAsAlpha8((ImFontAtlas*)(NativePtr), native_out_pixels, native_out_width, native_out_height, native_out_bytes_per_pixel); } } } @@ -441,7 +516,7 @@ public void GetTexDataAsAlpha8(out IntPtr out_pixels, out int out_width, out int { fixed (int* native_out_height = &out_height) { - ImGuiNative.ImFontAtlas_GetTexDataAsAlpha8(NativePtr, native_out_pixels, native_out_width, native_out_height, out_bytes_per_pixel); + ImGuiNative.ImFontAtlas_GetTexDataAsAlpha8((ImFontAtlas*)(NativePtr), native_out_pixels, native_out_width, native_out_height, out_bytes_per_pixel); } } } @@ -456,7 +531,7 @@ public void GetTexDataAsAlpha8(out IntPtr out_pixels, out int out_width, out int { fixed (int* native_out_bytes_per_pixel = &out_bytes_per_pixel) { - ImGuiNative.ImFontAtlas_GetTexDataAsAlpha8(NativePtr, native_out_pixels, native_out_width, native_out_height, native_out_bytes_per_pixel); + ImGuiNative.ImFontAtlas_GetTexDataAsAlpha8((ImFontAtlas*)(NativePtr), native_out_pixels, native_out_width, native_out_height, native_out_bytes_per_pixel); } } } @@ -471,7 +546,7 @@ public void GetTexDataAsRGBA32(out byte* out_pixels, out int out_width, out int { fixed (int* native_out_height = &out_height) { - ImGuiNative.ImFontAtlas_GetTexDataAsRGBA32(NativePtr, native_out_pixels, native_out_width, native_out_height, out_bytes_per_pixel); + ImGuiNative.ImFontAtlas_GetTexDataAsRGBA32((ImFontAtlas*)(NativePtr), native_out_pixels, native_out_width, native_out_height, out_bytes_per_pixel); } } } @@ -486,7 +561,7 @@ public void GetTexDataAsRGBA32(out byte* out_pixels, out int out_width, out int { fixed (int* native_out_bytes_per_pixel = &out_bytes_per_pixel) { - ImGuiNative.ImFontAtlas_GetTexDataAsRGBA32(NativePtr, native_out_pixels, native_out_width, native_out_height, native_out_bytes_per_pixel); + ImGuiNative.ImFontAtlas_GetTexDataAsRGBA32((ImFontAtlas*)(NativePtr), native_out_pixels, native_out_width, native_out_height, native_out_bytes_per_pixel); } } } @@ -501,7 +576,7 @@ public void GetTexDataAsRGBA32(out IntPtr out_pixels, out int out_width, out int { fixed (int* native_out_height = &out_height) { - ImGuiNative.ImFontAtlas_GetTexDataAsRGBA32(NativePtr, native_out_pixels, native_out_width, native_out_height, out_bytes_per_pixel); + ImGuiNative.ImFontAtlas_GetTexDataAsRGBA32((ImFontAtlas*)(NativePtr), native_out_pixels, native_out_width, native_out_height, out_bytes_per_pixel); } } } @@ -516,7 +591,7 @@ public void GetTexDataAsRGBA32(out IntPtr out_pixels, out int out_width, out int { fixed (int* native_out_bytes_per_pixel = &out_bytes_per_pixel) { - ImGuiNative.ImFontAtlas_GetTexDataAsRGBA32(NativePtr, native_out_pixels, native_out_width, native_out_height, native_out_bytes_per_pixel); + ImGuiNative.ImFontAtlas_GetTexDataAsRGBA32((ImFontAtlas*)(NativePtr), native_out_pixels, native_out_width, native_out_height, native_out_bytes_per_pixel); } } } @@ -524,12 +599,12 @@ public void GetTexDataAsRGBA32(out IntPtr out_pixels, out int out_width, out int } public bool IsBuilt() { - byte ret = ImGuiNative.ImFontAtlas_IsBuilt(NativePtr); + byte ret = ImGuiNative.ImFontAtlas_IsBuilt((ImFontAtlas*)(NativePtr)); return ret != 0; } public void SetTexID(IntPtr id) { - ImGuiNative.ImFontAtlas_SetTexID(NativePtr, id); + ImGuiNative.ImFontAtlas_SetTexID((ImFontAtlas*)(NativePtr), id); } } } diff --git a/ImGuiNET/Wrapper/Generated/ImFontAtlasCustomRect.gen.cs b/ImGuiNET/Wrapper/Generated/ImFontAtlasCustomRect.gen.cs index 4f2b29f..48f7137 100644 --- a/ImGuiNET/Wrapper/Generated/ImFontAtlasCustomRect.gen.cs +++ b/ImGuiNET/Wrapper/Generated/ImFontAtlasCustomRect.gen.cs @@ -1,17 +1,17 @@ using System; -using System.Runtime.CompilerServices; -using System.Text; using UnityEngine; +using Unity.Collections.LowLevel.Unsafe; +using System.Text; namespace ImGuiNET { public unsafe partial struct ImFontAtlasCustomRect { - public uint ID; public ushort Width; public ushort Height; public ushort X; public ushort Y; + public uint GlyphID; public float GlyphAdvanceX; public Vector2 GlyphOffset; public ImFont* Font; @@ -24,21 +24,21 @@ public unsafe partial struct ImFontAtlasCustomRectPtr public static implicit operator ImFontAtlasCustomRectPtr(ImFontAtlasCustomRect* nativePtr) => new ImFontAtlasCustomRectPtr(nativePtr); public static implicit operator ImFontAtlasCustomRect* (ImFontAtlasCustomRectPtr wrappedPtr) => wrappedPtr.NativePtr; public static implicit operator ImFontAtlasCustomRectPtr(IntPtr nativePtr) => new ImFontAtlasCustomRectPtr(nativePtr); - public ref uint ID => ref Unsafe.AsRef(&NativePtr->ID); - public ref ushort Width => ref Unsafe.AsRef(&NativePtr->Width); - public ref ushort Height => ref Unsafe.AsRef(&NativePtr->Height); - public ref ushort X => ref Unsafe.AsRef(&NativePtr->X); - public ref ushort Y => ref Unsafe.AsRef(&NativePtr->Y); - public ref float GlyphAdvanceX => ref Unsafe.AsRef(&NativePtr->GlyphAdvanceX); - public ref Vector2 GlyphOffset => ref Unsafe.AsRef(&NativePtr->GlyphOffset); + public ref ushort Width => ref UnsafeUtility.AsRef(&NativePtr->Width); + public ref ushort Height => ref UnsafeUtility.AsRef(&NativePtr->Height); + public ref ushort X => ref UnsafeUtility.AsRef(&NativePtr->X); + public ref ushort Y => ref UnsafeUtility.AsRef(&NativePtr->Y); + public ref uint GlyphID => ref UnsafeUtility.AsRef(&NativePtr->GlyphID); + public ref float GlyphAdvanceX => ref UnsafeUtility.AsRef(&NativePtr->GlyphAdvanceX); + public ref Vector2 GlyphOffset => ref UnsafeUtility.AsRef(&NativePtr->GlyphOffset); public ImFontPtr Font => new ImFontPtr(NativePtr->Font); public void Destroy() { - ImGuiNative.ImFontAtlasCustomRect_destroy(NativePtr); + ImGuiNative.ImFontAtlasCustomRect_destroy((ImFontAtlasCustomRect*)(NativePtr)); } public bool IsPacked() { - byte ret = ImGuiNative.ImFontAtlasCustomRect_IsPacked(NativePtr); + byte ret = ImGuiNative.ImFontAtlasCustomRect_IsPacked((ImFontAtlasCustomRect*)(NativePtr)); return ret != 0; } } diff --git a/ImGuiNET/Wrapper/Generated/ImFontAtlasFlags.gen.cs b/ImGuiNET/Wrapper/Generated/ImFontAtlasFlags.gen.cs index 1a6da21..336f53e 100644 --- a/ImGuiNET/Wrapper/Generated/ImFontAtlasFlags.gen.cs +++ b/ImGuiNET/Wrapper/Generated/ImFontAtlasFlags.gen.cs @@ -4,7 +4,8 @@ namespace ImGuiNET public enum ImFontAtlasFlags { None = 0, - NoPowerOfTwoHeight = 1 << 0, - NoMouseCursors = 1 << 1, + NoPowerOfTwoHeight = 1, + NoMouseCursors = 2, + NoBakedLines = 4, } } diff --git a/ImGuiNET/Wrapper/Generated/ImFontConfig.gen.cs b/ImGuiNET/Wrapper/Generated/ImFontConfig.gen.cs index e5f2cb8..d17dc47 100644 --- a/ImGuiNET/Wrapper/Generated/ImFontConfig.gen.cs +++ b/ImGuiNET/Wrapper/Generated/ImFontConfig.gen.cs @@ -1,7 +1,7 @@ using System; -using System.Runtime.CompilerServices; -using System.Text; using UnityEngine; +using Unity.Collections.LowLevel.Unsafe; +using System.Text; namespace ImGuiNET { @@ -21,7 +21,7 @@ public unsafe partial struct ImFontConfig public float GlyphMinAdvanceX; public float GlyphMaxAdvanceX; public byte MergeMode; - public uint RasterizerFlags; + public uint FontBuilderFlags; public float RasterizerMultiply; public ushort EllipsisChar; public fixed byte Name[40]; @@ -36,27 +36,27 @@ public unsafe partial struct ImFontConfigPtr public static implicit operator ImFontConfig* (ImFontConfigPtr wrappedPtr) => wrappedPtr.NativePtr; public static implicit operator ImFontConfigPtr(IntPtr nativePtr) => new ImFontConfigPtr(nativePtr); public IntPtr FontData { get => (IntPtr)NativePtr->FontData; set => NativePtr->FontData = (void*)value; } - public ref int FontDataSize => ref Unsafe.AsRef(&NativePtr->FontDataSize); - public ref bool FontDataOwnedByAtlas => ref Unsafe.AsRef(&NativePtr->FontDataOwnedByAtlas); - public ref int FontNo => ref Unsafe.AsRef(&NativePtr->FontNo); - public ref float SizePixels => ref Unsafe.AsRef(&NativePtr->SizePixels); - public ref int OversampleH => ref Unsafe.AsRef(&NativePtr->OversampleH); - public ref int OversampleV => ref Unsafe.AsRef(&NativePtr->OversampleV); - public ref bool PixelSnapH => ref Unsafe.AsRef(&NativePtr->PixelSnapH); - public ref Vector2 GlyphExtraSpacing => ref Unsafe.AsRef(&NativePtr->GlyphExtraSpacing); - public ref Vector2 GlyphOffset => ref Unsafe.AsRef(&NativePtr->GlyphOffset); + public ref int FontDataSize => ref UnsafeUtility.AsRef(&NativePtr->FontDataSize); + public ref bool FontDataOwnedByAtlas => ref UnsafeUtility.AsRef(&NativePtr->FontDataOwnedByAtlas); + public ref int FontNo => ref UnsafeUtility.AsRef(&NativePtr->FontNo); + public ref float SizePixels => ref UnsafeUtility.AsRef(&NativePtr->SizePixels); + public ref int OversampleH => ref UnsafeUtility.AsRef(&NativePtr->OversampleH); + public ref int OversampleV => ref UnsafeUtility.AsRef(&NativePtr->OversampleV); + public ref bool PixelSnapH => ref UnsafeUtility.AsRef(&NativePtr->PixelSnapH); + public ref Vector2 GlyphExtraSpacing => ref UnsafeUtility.AsRef(&NativePtr->GlyphExtraSpacing); + public ref Vector2 GlyphOffset => ref UnsafeUtility.AsRef(&NativePtr->GlyphOffset); public IntPtr GlyphRanges { get => (IntPtr)NativePtr->GlyphRanges; set => NativePtr->GlyphRanges = (ushort*)value; } - public ref float GlyphMinAdvanceX => ref Unsafe.AsRef(&NativePtr->GlyphMinAdvanceX); - public ref float GlyphMaxAdvanceX => ref Unsafe.AsRef(&NativePtr->GlyphMaxAdvanceX); - public ref bool MergeMode => ref Unsafe.AsRef(&NativePtr->MergeMode); - public ref uint RasterizerFlags => ref Unsafe.AsRef(&NativePtr->RasterizerFlags); - public ref float RasterizerMultiply => ref Unsafe.AsRef(&NativePtr->RasterizerMultiply); - public ref ushort EllipsisChar => ref Unsafe.AsRef(&NativePtr->EllipsisChar); + public ref float GlyphMinAdvanceX => ref UnsafeUtility.AsRef(&NativePtr->GlyphMinAdvanceX); + public ref float GlyphMaxAdvanceX => ref UnsafeUtility.AsRef(&NativePtr->GlyphMaxAdvanceX); + public ref bool MergeMode => ref UnsafeUtility.AsRef(&NativePtr->MergeMode); + public ref uint FontBuilderFlags => ref UnsafeUtility.AsRef(&NativePtr->FontBuilderFlags); + public ref float RasterizerMultiply => ref UnsafeUtility.AsRef(&NativePtr->RasterizerMultiply); + public ref ushort EllipsisChar => ref UnsafeUtility.AsRef(&NativePtr->EllipsisChar); public RangeAccessor Name => new RangeAccessor(NativePtr->Name, 40); public ImFontPtr DstFont => new ImFontPtr(NativePtr->DstFont); public void Destroy() { - ImGuiNative.ImFontConfig_destroy(NativePtr); + ImGuiNative.ImFontConfig_destroy((ImFontConfig*)(NativePtr)); } } } diff --git a/ImGuiNET/Wrapper/Generated/ImFontGlyph.gen.cs b/ImGuiNET/Wrapper/Generated/ImFontGlyph.gen.cs index d1533a4..6c68f80 100644 --- a/ImGuiNET/Wrapper/Generated/ImFontGlyph.gen.cs +++ b/ImGuiNET/Wrapper/Generated/ImFontGlyph.gen.cs @@ -1,13 +1,15 @@ using System; -using System.Runtime.CompilerServices; -using System.Text; using UnityEngine; +using Unity.Collections.LowLevel.Unsafe; +using System.Text; namespace ImGuiNET { public unsafe partial struct ImFontGlyph { - public ushort Codepoint; + public uint Colored; + public uint Visible; + public uint Codepoint; public float AdvanceX; public float X0; public float Y0; @@ -26,15 +28,17 @@ public unsafe partial struct ImFontGlyphPtr public static implicit operator ImFontGlyphPtr(ImFontGlyph* nativePtr) => new ImFontGlyphPtr(nativePtr); public static implicit operator ImFontGlyph* (ImFontGlyphPtr wrappedPtr) => wrappedPtr.NativePtr; public static implicit operator ImFontGlyphPtr(IntPtr nativePtr) => new ImFontGlyphPtr(nativePtr); - public ref ushort Codepoint => ref Unsafe.AsRef(&NativePtr->Codepoint); - public ref float AdvanceX => ref Unsafe.AsRef(&NativePtr->AdvanceX); - public ref float X0 => ref Unsafe.AsRef(&NativePtr->X0); - public ref float Y0 => ref Unsafe.AsRef(&NativePtr->Y0); - public ref float X1 => ref Unsafe.AsRef(&NativePtr->X1); - public ref float Y1 => ref Unsafe.AsRef(&NativePtr->Y1); - public ref float U0 => ref Unsafe.AsRef(&NativePtr->U0); - public ref float V0 => ref Unsafe.AsRef(&NativePtr->V0); - public ref float U1 => ref Unsafe.AsRef(&NativePtr->U1); - public ref float V1 => ref Unsafe.AsRef(&NativePtr->V1); + public ref uint Colored => ref UnsafeUtility.AsRef(&NativePtr->Colored); + public ref uint Visible => ref UnsafeUtility.AsRef(&NativePtr->Visible); + public ref uint Codepoint => ref UnsafeUtility.AsRef(&NativePtr->Codepoint); + public ref float AdvanceX => ref UnsafeUtility.AsRef(&NativePtr->AdvanceX); + public ref float X0 => ref UnsafeUtility.AsRef(&NativePtr->X0); + public ref float Y0 => ref UnsafeUtility.AsRef(&NativePtr->Y0); + public ref float X1 => ref UnsafeUtility.AsRef(&NativePtr->X1); + public ref float Y1 => ref UnsafeUtility.AsRef(&NativePtr->Y1); + public ref float U0 => ref UnsafeUtility.AsRef(&NativePtr->U0); + public ref float V0 => ref UnsafeUtility.AsRef(&NativePtr->V0); + public ref float U1 => ref UnsafeUtility.AsRef(&NativePtr->U1); + public ref float V1 => ref UnsafeUtility.AsRef(&NativePtr->V1); } } diff --git a/ImGuiNET/Wrapper/Generated/ImFontGlyphRangesBuilder.gen.cs b/ImGuiNET/Wrapper/Generated/ImFontGlyphRangesBuilder.gen.cs index 5893312..f1378f5 100644 --- a/ImGuiNET/Wrapper/Generated/ImFontGlyphRangesBuilder.gen.cs +++ b/ImGuiNET/Wrapper/Generated/ImFontGlyphRangesBuilder.gen.cs @@ -1,7 +1,7 @@ using System; -using System.Runtime.CompilerServices; -using System.Text; using UnityEngine; +using Unity.Collections.LowLevel.Unsafe; +using System.Text; namespace ImGuiNET { @@ -20,12 +20,12 @@ public unsafe partial struct ImFontGlyphRangesBuilderPtr public ImVector UsedChars => new ImVector(NativePtr->UsedChars); public void AddChar(ushort c) { - ImGuiNative.ImFontGlyphRangesBuilder_AddChar(NativePtr, c); + ImGuiNative.ImFontGlyphRangesBuilder_AddChar((ImFontGlyphRangesBuilder*)(NativePtr), c); } public void AddRanges(IntPtr ranges) { ushort* native_ranges = (ushort*)ranges.ToPointer(); - ImGuiNative.ImFontGlyphRangesBuilder_AddRanges(NativePtr, native_ranges); + ImGuiNative.ImFontGlyphRangesBuilder_AddRanges((ImFontGlyphRangesBuilder*)(NativePtr), native_ranges); } public void AddText(string text) { @@ -48,7 +48,7 @@ public void AddText(string text) } else { native_text = null; } byte* native_text_end = null; - ImGuiNative.ImFontGlyphRangesBuilder_AddText(NativePtr, native_text, native_text_end); + ImGuiNative.ImFontGlyphRangesBuilder_AddText((ImFontGlyphRangesBuilder*)(NativePtr), native_text, native_text_end); if (text_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_text); @@ -58,25 +58,25 @@ public void BuildRanges(out ImVector out_ranges) { fixed (ImVector* native_out_ranges = &out_ranges) { - ImGuiNative.ImFontGlyphRangesBuilder_BuildRanges(NativePtr, native_out_ranges); + ImGuiNative.ImFontGlyphRangesBuilder_BuildRanges((ImFontGlyphRangesBuilder*)(NativePtr), native_out_ranges); } } public void Clear() { - ImGuiNative.ImFontGlyphRangesBuilder_Clear(NativePtr); + ImGuiNative.ImFontGlyphRangesBuilder_Clear((ImFontGlyphRangesBuilder*)(NativePtr)); } public void Destroy() { - ImGuiNative.ImFontGlyphRangesBuilder_destroy(NativePtr); + ImGuiNative.ImFontGlyphRangesBuilder_destroy((ImFontGlyphRangesBuilder*)(NativePtr)); } - public bool GetBit(int n) + public bool GetBit(uint n) { - byte ret = ImGuiNative.ImFontGlyphRangesBuilder_GetBit(NativePtr, n); + byte ret = ImGuiNative.ImFontGlyphRangesBuilder_GetBit((ImFontGlyphRangesBuilder*)(NativePtr), n); return ret != 0; } - public void SetBit(int n) + public void SetBit(uint n) { - ImGuiNative.ImFontGlyphRangesBuilder_SetBit(NativePtr, n); + ImGuiNative.ImFontGlyphRangesBuilder_SetBit((ImFontGlyphRangesBuilder*)(NativePtr), n); } } } diff --git a/ImGuiNET/Wrapper/Generated/ImGui.gen.cs b/ImGuiNET/Wrapper/Generated/ImGui.gen.cs index 0774b7f..9b2d45f 100644 --- a/ImGuiNET/Wrapper/Generated/ImGui.gen.cs +++ b/ImGuiNET/Wrapper/Generated/ImGui.gen.cs @@ -1,7 +1,7 @@ using System; +using UnityEngine; using System.Runtime.InteropServices; using System.Text; -using UnityEngine; namespace ImGuiNET { @@ -206,7 +206,7 @@ public static bool BeginChild(string str_id) Vector2 size = new Vector2(); byte border = 0; ImGuiWindowFlags flags = (ImGuiWindowFlags)0; - byte ret = ImGuiNative.igBeginChild(native_str_id, size, border, flags); + byte ret = ImGuiNative.igBeginChild_Str(native_str_id, size, border, flags); if (str_id_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_str_id); @@ -235,7 +235,7 @@ public static bool BeginChild(string str_id, Vector2 size) else { native_str_id = null; } byte border = 0; ImGuiWindowFlags flags = (ImGuiWindowFlags)0; - byte ret = ImGuiNative.igBeginChild(native_str_id, size, border, flags); + byte ret = ImGuiNative.igBeginChild_Str(native_str_id, size, border, flags); if (str_id_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_str_id); @@ -264,7 +264,7 @@ public static bool BeginChild(string str_id, Vector2 size, bool border) else { native_str_id = null; } byte native_border = border ? (byte)1 : (byte)0; ImGuiWindowFlags flags = (ImGuiWindowFlags)0; - byte ret = ImGuiNative.igBeginChild(native_str_id, size, native_border, flags); + byte ret = ImGuiNative.igBeginChild_Str(native_str_id, size, native_border, flags); if (str_id_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_str_id); @@ -292,7 +292,7 @@ public static bool BeginChild(string str_id, Vector2 size, bool border, ImGuiWin } else { native_str_id = null; } byte native_border = border ? (byte)1 : (byte)0; - byte ret = ImGuiNative.igBeginChild(native_str_id, size, native_border, flags); + byte ret = ImGuiNative.igBeginChild_Str(native_str_id, size, native_border, flags); if (str_id_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_str_id); @@ -304,27 +304,27 @@ public static bool BeginChild(uint id) Vector2 size = new Vector2(); byte border = 0; ImGuiWindowFlags flags = (ImGuiWindowFlags)0; - byte ret = ImGuiNative.igBeginChildID(id, size, border, flags); + byte ret = ImGuiNative.igBeginChild_ID(id, size, border, flags); return ret != 0; } public static bool BeginChild(uint id, Vector2 size) { byte border = 0; ImGuiWindowFlags flags = (ImGuiWindowFlags)0; - byte ret = ImGuiNative.igBeginChildID(id, size, border, flags); + byte ret = ImGuiNative.igBeginChild_ID(id, size, border, flags); return ret != 0; } public static bool BeginChild(uint id, Vector2 size, bool border) { byte native_border = border ? (byte)1 : (byte)0; ImGuiWindowFlags flags = (ImGuiWindowFlags)0; - byte ret = ImGuiNative.igBeginChildID(id, size, native_border, flags); + byte ret = ImGuiNative.igBeginChild_ID(id, size, native_border, flags); return ret != 0; } public static bool BeginChild(uint id, Vector2 size, bool border, ImGuiWindowFlags flags) { byte native_border = border ? (byte)1 : (byte)0; - byte ret = ImGuiNative.igBeginChildID(id, size, native_border, flags); + byte ret = ImGuiNative.igBeginChild_ID(id, size, native_border, flags); return ret != 0; } public static bool BeginChildFrame(uint id, Vector2 size) @@ -437,6 +437,16 @@ public static bool BeginCombo(string label, string preview_value, ImGuiComboFlag } return ret != 0; } + public static void BeginDisabled() + { + byte disabled = 1; + ImGuiNative.igBeginDisabled(disabled); + } + public static void BeginDisabled(bool disabled) + { + byte native_disabled = disabled ? (byte)1 : (byte)0; + ImGuiNative.igBeginDisabled(native_disabled); + } public static bool BeginDragDropSource() { ImGuiDragDropFlags flags = (ImGuiDragDropFlags)0; @@ -457,6 +467,61 @@ public static void BeginGroup() { ImGuiNative.igBeginGroup(); } + public static bool BeginListBox(string label) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + Vector2 size = new Vector2(); + byte ret = ImGuiNative.igBeginListBox(native_label, size); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + public static bool BeginListBox(string label, Vector2 size) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte ret = ImGuiNative.igBeginListBox(native_label, size); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } public static bool BeginMainMenuBar() { byte ret = ImGuiNative.igBeginMainMenuBar(); @@ -581,8 +646,8 @@ public static bool BeginPopup(string str_id, ImGuiWindowFlags flags) public static bool BeginPopupContextItem() { byte* native_str_id = null; - ImGuiMouseButton mouse_button = (ImGuiMouseButton)1; - byte ret = ImGuiNative.igBeginPopupContextItem(native_str_id, mouse_button); + ImGuiPopupFlags popup_flags = (ImGuiPopupFlags)1; + byte ret = ImGuiNative.igBeginPopupContextItem(native_str_id, popup_flags); return ret != 0; } public static bool BeginPopupContextItem(string str_id) @@ -605,15 +670,15 @@ public static bool BeginPopupContextItem(string str_id) native_str_id[native_str_id_offset] = 0; } else { native_str_id = null; } - ImGuiMouseButton mouse_button = (ImGuiMouseButton)1; - byte ret = ImGuiNative.igBeginPopupContextItem(native_str_id, mouse_button); + ImGuiPopupFlags popup_flags = (ImGuiPopupFlags)1; + byte ret = ImGuiNative.igBeginPopupContextItem(native_str_id, popup_flags); if (str_id_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_str_id); } return ret != 0; } - public static bool BeginPopupContextItem(string str_id, ImGuiMouseButton mouse_button) + public static bool BeginPopupContextItem(string str_id, ImGuiPopupFlags popup_flags) { byte* native_str_id; int str_id_byteCount = 0; @@ -633,7 +698,7 @@ public static bool BeginPopupContextItem(string str_id, ImGuiMouseButton mouse_b native_str_id[native_str_id_offset] = 0; } else { native_str_id = null; } - byte ret = ImGuiNative.igBeginPopupContextItem(native_str_id, mouse_button); + byte ret = ImGuiNative.igBeginPopupContextItem(native_str_id, popup_flags); if (str_id_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_str_id); @@ -643,8 +708,8 @@ public static bool BeginPopupContextItem(string str_id, ImGuiMouseButton mouse_b public static bool BeginPopupContextVoid() { byte* native_str_id = null; - ImGuiMouseButton mouse_button = (ImGuiMouseButton)1; - byte ret = ImGuiNative.igBeginPopupContextVoid(native_str_id, mouse_button); + ImGuiPopupFlags popup_flags = (ImGuiPopupFlags)1; + byte ret = ImGuiNative.igBeginPopupContextVoid(native_str_id, popup_flags); return ret != 0; } public static bool BeginPopupContextVoid(string str_id) @@ -667,15 +732,15 @@ public static bool BeginPopupContextVoid(string str_id) native_str_id[native_str_id_offset] = 0; } else { native_str_id = null; } - ImGuiMouseButton mouse_button = (ImGuiMouseButton)1; - byte ret = ImGuiNative.igBeginPopupContextVoid(native_str_id, mouse_button); + ImGuiPopupFlags popup_flags = (ImGuiPopupFlags)1; + byte ret = ImGuiNative.igBeginPopupContextVoid(native_str_id, popup_flags); if (str_id_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_str_id); } return ret != 0; } - public static bool BeginPopupContextVoid(string str_id, ImGuiMouseButton mouse_button) + public static bool BeginPopupContextVoid(string str_id, ImGuiPopupFlags popup_flags) { byte* native_str_id; int str_id_byteCount = 0; @@ -695,7 +760,7 @@ public static bool BeginPopupContextVoid(string str_id, ImGuiMouseButton mouse_b native_str_id[native_str_id_offset] = 0; } else { native_str_id = null; } - byte ret = ImGuiNative.igBeginPopupContextVoid(native_str_id, mouse_button); + byte ret = ImGuiNative.igBeginPopupContextVoid(native_str_id, popup_flags); if (str_id_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_str_id); @@ -705,9 +770,8 @@ public static bool BeginPopupContextVoid(string str_id, ImGuiMouseButton mouse_b public static bool BeginPopupContextWindow() { byte* native_str_id = null; - ImGuiMouseButton mouse_button = (ImGuiMouseButton)1; - byte also_over_items = 1; - byte ret = ImGuiNative.igBeginPopupContextWindow(native_str_id, mouse_button, also_over_items); + ImGuiPopupFlags popup_flags = (ImGuiPopupFlags)1; + byte ret = ImGuiNative.igBeginPopupContextWindow(native_str_id, popup_flags); return ret != 0; } public static bool BeginPopupContextWindow(string str_id) @@ -730,44 +794,15 @@ public static bool BeginPopupContextWindow(string str_id) native_str_id[native_str_id_offset] = 0; } else { native_str_id = null; } - ImGuiMouseButton mouse_button = (ImGuiMouseButton)1; - byte also_over_items = 1; - byte ret = ImGuiNative.igBeginPopupContextWindow(native_str_id, mouse_button, also_over_items); - if (str_id_byteCount > Util.StackAllocationSizeLimit) - { - Util.Free(native_str_id); - } - return ret != 0; - } - public static bool BeginPopupContextWindow(string str_id, ImGuiMouseButton mouse_button) - { - byte* native_str_id; - int str_id_byteCount = 0; - if (str_id != null) - { - str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); - if (str_id_byteCount > Util.StackAllocationSizeLimit) - { - native_str_id = Util.Allocate(str_id_byteCount + 1); - } - else - { - byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; - native_str_id = native_str_id_stackBytes; - } - int native_str_id_offset = Util.GetUtf8(str_id, native_str_id, str_id_byteCount); - native_str_id[native_str_id_offset] = 0; - } - else { native_str_id = null; } - byte also_over_items = 1; - byte ret = ImGuiNative.igBeginPopupContextWindow(native_str_id, mouse_button, also_over_items); + ImGuiPopupFlags popup_flags = (ImGuiPopupFlags)1; + byte ret = ImGuiNative.igBeginPopupContextWindow(native_str_id, popup_flags); if (str_id_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_str_id); } return ret != 0; } - public static bool BeginPopupContextWindow(string str_id, ImGuiMouseButton mouse_button, bool also_over_items) + public static bool BeginPopupContextWindow(string str_id, ImGuiPopupFlags popup_flags) { byte* native_str_id; int str_id_byteCount = 0; @@ -787,8 +822,7 @@ public static bool BeginPopupContextWindow(string str_id, ImGuiMouseButton mouse 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); + byte ret = ImGuiNative.igBeginPopupContextWindow(native_str_id, popup_flags); if (str_id_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_str_id); @@ -1030,6 +1064,120 @@ public static bool BeginTabItem(string label, ref bool p_open, ImGuiTabItemFlags p_open = native_p_open_val != 0; return ret != 0; } + public static bool BeginTable(string str_id, int column) + { + byte* native_str_id; + int str_id_byteCount = 0; + if (str_id != null) + { + str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + native_str_id = Util.Allocate(str_id_byteCount + 1); + } + else + { + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + } + int native_str_id_offset = Util.GetUtf8(str_id, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + else { native_str_id = null; } + ImGuiTableFlags flags = (ImGuiTableFlags)0; + Vector2 outer_size = new Vector2(); + float inner_width = 0.0f; + byte ret = ImGuiNative.igBeginTable(native_str_id, column, flags, outer_size, inner_width); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_str_id); + } + return ret != 0; + } + public static bool BeginTable(string str_id, int column, ImGuiTableFlags flags) + { + byte* native_str_id; + int str_id_byteCount = 0; + if (str_id != null) + { + str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + native_str_id = Util.Allocate(str_id_byteCount + 1); + } + else + { + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + } + int native_str_id_offset = Util.GetUtf8(str_id, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + else { native_str_id = null; } + Vector2 outer_size = new Vector2(); + float inner_width = 0.0f; + byte ret = ImGuiNative.igBeginTable(native_str_id, column, flags, outer_size, inner_width); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_str_id); + } + return ret != 0; + } + public static bool BeginTable(string str_id, int column, ImGuiTableFlags flags, Vector2 outer_size) + { + byte* native_str_id; + int str_id_byteCount = 0; + if (str_id != null) + { + str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + native_str_id = Util.Allocate(str_id_byteCount + 1); + } + else + { + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + } + int native_str_id_offset = Util.GetUtf8(str_id, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + else { native_str_id = null; } + float inner_width = 0.0f; + byte ret = ImGuiNative.igBeginTable(native_str_id, column, flags, outer_size, inner_width); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_str_id); + } + return ret != 0; + } + public static bool BeginTable(string str_id, int column, ImGuiTableFlags flags, Vector2 outer_size, float inner_width) + { + byte* native_str_id; + int str_id_byteCount = 0; + if (str_id != null) + { + str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + native_str_id = Util.Allocate(str_id_byteCount + 1); + } + else + { + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + } + int native_str_id_offset = Util.GetUtf8(str_id, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + else { native_str_id = null; } + byte ret = ImGuiNative.igBeginTable(native_str_id, column, flags, outer_size, inner_width); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_str_id); + } + return ret != 0; + } public static void BeginTooltip() { ImGuiNative.igBeginTooltip(); @@ -1124,36 +1272,6 @@ public static float CalcItemWidth() float ret = ImGuiNative.igCalcItemWidth(); return ret; } - public static Vector2 CalcTextSize(string text) - { - byte* native_text; - int text_byteCount = 0; - if (text != null) - { - text_byteCount = Encoding.UTF8.GetByteCount(text); - if (text_byteCount > Util.StackAllocationSizeLimit) - { - native_text = Util.Allocate(text_byteCount + 1); - } - else - { - byte* native_text_stackBytes = stackalloc byte[text_byteCount + 1]; - native_text = native_text_stackBytes; - } - int native_text_offset = Util.GetUtf8(text, native_text, text_byteCount); - native_text[native_text_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); - if (text_byteCount > Util.StackAllocationSizeLimit) - { - Util.Free(native_text); - } - return ret; - } public static void CaptureKeyboardFromApp() { byte want_capture_keyboard_value = 1; @@ -1204,6 +1322,36 @@ public static bool Checkbox(string label, ref bool v) v = native_v_val != 0; return ret != 0; } + public static bool CheckboxFlags(string label, ref int flags, int flags_value) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + fixed (int* native_flags = &flags) + { + byte ret = ImGuiNative.igCheckboxFlags_IntPtr(native_label, native_flags, flags_value); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + } public static bool CheckboxFlags(string label, ref uint flags, uint flags_value) { byte* native_label; @@ -1226,7 +1374,7 @@ public static bool CheckboxFlags(string label, ref uint flags, uint flags_value) else { native_label = null; } fixed (uint* native_flags = &flags) { - byte ret = ImGuiNative.igCheckboxFlags(native_label, native_flags, flags_value); + byte ret = ImGuiNative.igCheckboxFlags_UintPtr(native_label, native_flags, flags_value); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -1259,7 +1407,7 @@ public static bool CollapsingHeader(string label) } else { native_label = null; } ImGuiTreeNodeFlags flags = (ImGuiTreeNodeFlags)0; - byte ret = ImGuiNative.igCollapsingHeader(native_label, flags); + byte ret = ImGuiNative.igCollapsingHeader_TreeNodeFlags(native_label, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -1286,14 +1434,14 @@ public static bool CollapsingHeader(string label, ImGuiTreeNodeFlags flags) native_label[native_label_offset] = 0; } else { native_label = null; } - byte ret = ImGuiNative.igCollapsingHeader(native_label, flags); + byte ret = ImGuiNative.igCollapsingHeader_TreeNodeFlags(native_label, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); } return ret != 0; } - public static bool CollapsingHeader(string label, ref bool p_open) + public static bool CollapsingHeader(string label, ref bool p_visible) { byte* native_label; int label_byteCount = 0; @@ -1313,18 +1461,18 @@ public static bool CollapsingHeader(string label, ref bool p_open) native_label[native_label_offset] = 0; } else { native_label = null; } - byte native_p_open_val = p_open ? (byte)1 : (byte)0; - byte* native_p_open = &native_p_open_val; + byte native_p_visible_val = p_visible ? (byte)1 : (byte)0; + byte* native_p_visible = &native_p_visible_val; ImGuiTreeNodeFlags flags = (ImGuiTreeNodeFlags)0; - byte ret = ImGuiNative.igCollapsingHeaderBoolPtr(native_label, native_p_open, flags); + byte ret = ImGuiNative.igCollapsingHeader_BoolPtr(native_label, native_p_visible, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); } - p_open = native_p_open_val != 0; + p_visible = native_p_visible_val != 0; return ret != 0; } - public static bool CollapsingHeader(string label, ref bool p_open, ImGuiTreeNodeFlags flags) + public static bool CollapsingHeader(string label, ref bool p_visible, ImGuiTreeNodeFlags flags) { byte* native_label; int label_byteCount = 0; @@ -1344,14 +1492,14 @@ public static bool CollapsingHeader(string label, ref bool p_open, ImGuiTreeNode native_label[native_label_offset] = 0; } 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); + byte native_p_visible_val = p_visible ? (byte)1 : (byte)0; + byte* native_p_visible = &native_p_visible_val; + byte ret = ImGuiNative.igCollapsingHeader_BoolPtr(native_label, native_p_visible, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); } - p_open = native_p_open_val != 0; + p_visible = native_p_visible_val != 0; return ret != 0; } public static bool ColorButton(string desc_id, Vector4 col) @@ -1471,8 +1619,9 @@ public static void ColorConvertRGBtoHSV(float r, float g, float b, out float out } public static Vector4 ColorConvertU32ToFloat4(uint @in) { - Vector4 ret = ImGuiNative.igColorConvertU32ToFloat4(@in); - return ret; + Vector4 __retval; + ImGuiNative.igColorConvertU32ToFloat4(&__retval, @in); + return __retval; } public static bool ColorEdit3(string label, ref Vector3 col) { @@ -1870,7 +2019,7 @@ public static bool Combo(string label, ref int current_item, string[] items, int 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); + byte ret = ImGuiNative.igCombo_Str_arr(native_label, native_current_item, native_items, items_count, popup_max_height_in_items); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -1927,7 +2076,7 @@ public static bool Combo(string label, ref int current_item, string[] items, int } 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); + byte ret = ImGuiNative.igCombo_Str_arr(native_label, native_current_item, native_items, items_count, popup_max_height_in_items); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -1976,7 +2125,7 @@ public static bool Combo(string label, ref int current_item, string items_separa 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); + byte ret = ImGuiNative.igCombo_Str(native_label, native_current_item, native_items_separated_by_zeros, popup_max_height_in_items); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -2028,7 +2177,7 @@ public static bool Combo(string label, ref int current_item, string items_separa 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); + byte ret = ImGuiNative.igCombo_Str(native_label, native_current_item, native_items_separated_by_zeros, popup_max_height_in_items); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -2088,21 +2237,82 @@ public static void DestroyContext(IntPtr ctx) { ImGuiNative.igDestroyContext(ctx); } - public static bool DragFloat(string label, ref float v) + public static void DestroyPlatformWindows() { - byte* native_label; - int label_byteCount = 0; - if (label != null) - { - label_byteCount = Encoding.UTF8.GetByteCount(label); - if (label_byteCount > Util.StackAllocationSizeLimit) - { - native_label = Util.Allocate(label_byteCount + 1); - } - else - { - byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; - native_label = native_label_stackBytes; + ImGuiNative.igDestroyPlatformWindows(); + } + public static uint DockSpace(uint id) + { + Vector2 size = new Vector2(); + ImGuiDockNodeFlags flags = (ImGuiDockNodeFlags)0; + ImGuiWindowClass* window_class = null; + uint ret = ImGuiNative.igDockSpace(id, size, flags, window_class); + return ret; + } + public static uint DockSpace(uint id, Vector2 size) + { + ImGuiDockNodeFlags flags = (ImGuiDockNodeFlags)0; + ImGuiWindowClass* window_class = null; + uint ret = ImGuiNative.igDockSpace(id, size, flags, window_class); + return ret; + } + public static uint DockSpace(uint id, Vector2 size, ImGuiDockNodeFlags flags) + { + ImGuiWindowClass* window_class = null; + uint ret = ImGuiNative.igDockSpace(id, size, flags, window_class); + return ret; + } + public static uint DockSpace(uint id, Vector2 size, ImGuiDockNodeFlags flags, ImGuiWindowClassPtr window_class) + { + ImGuiWindowClass* native_window_class = window_class.NativePtr; + uint ret = ImGuiNative.igDockSpace(id, size, flags, native_window_class); + return ret; + } + public static uint DockSpaceOverViewport() + { + ImGuiViewport* viewport = null; + ImGuiDockNodeFlags flags = (ImGuiDockNodeFlags)0; + ImGuiWindowClass* window_class = null; + uint ret = ImGuiNative.igDockSpaceOverViewport(viewport, flags, window_class); + return ret; + } + public static uint DockSpaceOverViewport(ImGuiViewportPtr viewport) + { + ImGuiViewport* native_viewport = viewport.NativePtr; + ImGuiDockNodeFlags flags = (ImGuiDockNodeFlags)0; + ImGuiWindowClass* window_class = null; + uint ret = ImGuiNative.igDockSpaceOverViewport(native_viewport, flags, window_class); + return ret; + } + public static uint DockSpaceOverViewport(ImGuiViewportPtr viewport, ImGuiDockNodeFlags flags) + { + ImGuiViewport* native_viewport = viewport.NativePtr; + ImGuiWindowClass* window_class = null; + uint ret = ImGuiNative.igDockSpaceOverViewport(native_viewport, flags, window_class); + return ret; + } + public static uint DockSpaceOverViewport(ImGuiViewportPtr viewport, ImGuiDockNodeFlags flags, ImGuiWindowClassPtr window_class) + { + ImGuiViewport* native_viewport = viewport.NativePtr; + ImGuiWindowClass* native_window_class = window_class.NativePtr; + uint ret = ImGuiNative.igDockSpaceOverViewport(native_viewport, flags, native_window_class); + return ret; + } + public static bool DragFloat(string label, ref float v) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; } int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); native_label[native_label_offset] = 0; @@ -2125,10 +2335,10 @@ public static bool DragFloat(string label, ref float v) } int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); native_format[native_format_offset] = 0; - float power = 1.0f; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; fixed (float* native_v = &v) { - byte ret = ImGuiNative.igDragFloat(native_label, native_v, v_speed, v_min, v_max, native_format, power); + byte ret = ImGuiNative.igDragFloat(native_label, native_v, v_speed, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -2176,10 +2386,10 @@ public static bool DragFloat(string label, ref float v, float v_speed) } int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); native_format[native_format_offset] = 0; - float power = 1.0f; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; fixed (float* native_v = &v) { - byte ret = ImGuiNative.igDragFloat(native_label, native_v, v_speed, v_min, v_max, native_format, power); + byte ret = ImGuiNative.igDragFloat(native_label, native_v, v_speed, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -2226,10 +2436,10 @@ public static bool DragFloat(string label, ref float v, float v_speed, float v_m } int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); native_format[native_format_offset] = 0; - float power = 1.0f; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; fixed (float* native_v = &v) { - byte ret = ImGuiNative.igDragFloat(native_label, native_v, v_speed, v_min, v_max, native_format, power); + byte ret = ImGuiNative.igDragFloat(native_label, native_v, v_speed, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -2275,10 +2485,10 @@ public static bool DragFloat(string label, ref float v, float v_speed, float v_m } int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); native_format[native_format_offset] = 0; - float power = 1.0f; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; fixed (float* native_v = &v) { - byte ret = ImGuiNative.igDragFloat(native_label, native_v, v_speed, v_min, v_max, native_format, power); + byte ret = ImGuiNative.igDragFloat(native_label, native_v, v_speed, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -2328,10 +2538,10 @@ public static bool DragFloat(string label, ref float v, float v_speed, float v_m native_format[native_format_offset] = 0; } else { native_format = null; } - float power = 1.0f; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; fixed (float* native_v = &v) { - byte ret = ImGuiNative.igDragFloat(native_label, native_v, v_speed, v_min, v_max, native_format, power); + byte ret = ImGuiNative.igDragFloat(native_label, native_v, v_speed, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -2343,7 +2553,7 @@ public static bool DragFloat(string label, ref float v, float v_speed, float v_m 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 DragFloat(string label, ref float v, float v_speed, float v_min, float v_max, string format, ImGuiSliderFlags flags) { byte* native_label; int label_byteCount = 0; @@ -2383,7 +2593,7 @@ public static bool DragFloat(string label, ref float v, float v_speed, float v_m 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); + byte ret = ImGuiNative.igDragFloat(native_label, native_v, v_speed, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -2432,10 +2642,10 @@ public static bool DragFloat2(string label, ref Vector2 v) } int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); native_format[native_format_offset] = 0; - float power = 1.0f; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; fixed (Vector2* native_v = &v) { - byte ret = ImGuiNative.igDragFloat2(native_label, native_v, v_speed, v_min, v_max, native_format, power); + byte ret = ImGuiNative.igDragFloat2(native_label, native_v, v_speed, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -2483,10 +2693,10 @@ public static bool DragFloat2(string label, ref Vector2 v, float v_speed) } int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); native_format[native_format_offset] = 0; - float power = 1.0f; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; fixed (Vector2* native_v = &v) { - byte ret = ImGuiNative.igDragFloat2(native_label, native_v, v_speed, v_min, v_max, native_format, power); + byte ret = ImGuiNative.igDragFloat2(native_label, native_v, v_speed, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -2533,10 +2743,10 @@ public static bool DragFloat2(string label, ref Vector2 v, float v_speed, float } int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); native_format[native_format_offset] = 0; - float power = 1.0f; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; fixed (Vector2* native_v = &v) { - byte ret = ImGuiNative.igDragFloat2(native_label, native_v, v_speed, v_min, v_max, native_format, power); + byte ret = ImGuiNative.igDragFloat2(native_label, native_v, v_speed, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -2582,10 +2792,10 @@ public static bool DragFloat2(string label, ref Vector2 v, float v_speed, float } int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); native_format[native_format_offset] = 0; - float power = 1.0f; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; fixed (Vector2* native_v = &v) { - byte ret = ImGuiNative.igDragFloat2(native_label, native_v, v_speed, v_min, v_max, native_format, power); + byte ret = ImGuiNative.igDragFloat2(native_label, native_v, v_speed, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -2635,10 +2845,10 @@ public static bool DragFloat2(string label, ref Vector2 v, float v_speed, float native_format[native_format_offset] = 0; } else { native_format = null; } - float power = 1.0f; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; fixed (Vector2* native_v = &v) { - byte ret = ImGuiNative.igDragFloat2(native_label, native_v, v_speed, v_min, v_max, native_format, power); + byte ret = ImGuiNative.igDragFloat2(native_label, native_v, v_speed, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -2650,7 +2860,7 @@ public static bool DragFloat2(string label, ref Vector2 v, float v_speed, float 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 DragFloat2(string label, ref Vector2 v, float v_speed, float v_min, float v_max, string format, ImGuiSliderFlags flags) { byte* native_label; int label_byteCount = 0; @@ -2690,7 +2900,7 @@ public static bool DragFloat2(string label, ref Vector2 v, float v_speed, float 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); + byte ret = ImGuiNative.igDragFloat2(native_label, native_v, v_speed, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -2739,10 +2949,10 @@ public static bool DragFloat3(string label, ref Vector3 v) } int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); native_format[native_format_offset] = 0; - float power = 1.0f; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; fixed (Vector3* native_v = &v) { - byte ret = ImGuiNative.igDragFloat3(native_label, native_v, v_speed, v_min, v_max, native_format, power); + byte ret = ImGuiNative.igDragFloat3(native_label, native_v, v_speed, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -2790,10 +3000,10 @@ public static bool DragFloat3(string label, ref Vector3 v, float v_speed) } int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); native_format[native_format_offset] = 0; - float power = 1.0f; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; fixed (Vector3* native_v = &v) { - byte ret = ImGuiNative.igDragFloat3(native_label, native_v, v_speed, v_min, v_max, native_format, power); + byte ret = ImGuiNative.igDragFloat3(native_label, native_v, v_speed, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -2840,10 +3050,10 @@ public static bool DragFloat3(string label, ref Vector3 v, float v_speed, float } int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); native_format[native_format_offset] = 0; - float power = 1.0f; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; fixed (Vector3* native_v = &v) { - byte ret = ImGuiNative.igDragFloat3(native_label, native_v, v_speed, v_min, v_max, native_format, power); + byte ret = ImGuiNative.igDragFloat3(native_label, native_v, v_speed, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -2889,10 +3099,10 @@ public static bool DragFloat3(string label, ref Vector3 v, float v_speed, float } int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); native_format[native_format_offset] = 0; - float power = 1.0f; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; fixed (Vector3* native_v = &v) { - byte ret = ImGuiNative.igDragFloat3(native_label, native_v, v_speed, v_min, v_max, native_format, power); + byte ret = ImGuiNative.igDragFloat3(native_label, native_v, v_speed, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -2942,10 +3152,10 @@ public static bool DragFloat3(string label, ref Vector3 v, float v_speed, float native_format[native_format_offset] = 0; } else { native_format = null; } - float power = 1.0f; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; fixed (Vector3* native_v = &v) { - byte ret = ImGuiNative.igDragFloat3(native_label, native_v, v_speed, v_min, v_max, native_format, power); + byte ret = ImGuiNative.igDragFloat3(native_label, native_v, v_speed, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -2957,7 +3167,7 @@ public static bool DragFloat3(string label, ref Vector3 v, float v_speed, float 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 DragFloat3(string label, ref Vector3 v, float v_speed, float v_min, float v_max, string format, ImGuiSliderFlags flags) { byte* native_label; int label_byteCount = 0; @@ -2997,7 +3207,7 @@ public static bool DragFloat3(string label, ref Vector3 v, float v_speed, float 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); + byte ret = ImGuiNative.igDragFloat3(native_label, native_v, v_speed, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -3046,10 +3256,10 @@ public static bool DragFloat4(string label, ref Vector4 v) } int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); native_format[native_format_offset] = 0; - float power = 1.0f; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; fixed (Vector4* native_v = &v) { - byte ret = ImGuiNative.igDragFloat4(native_label, native_v, v_speed, v_min, v_max, native_format, power); + byte ret = ImGuiNative.igDragFloat4(native_label, native_v, v_speed, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -3097,10 +3307,10 @@ public static bool DragFloat4(string label, ref Vector4 v, float v_speed) } int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); native_format[native_format_offset] = 0; - float power = 1.0f; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; fixed (Vector4* native_v = &v) { - byte ret = ImGuiNative.igDragFloat4(native_label, native_v, v_speed, v_min, v_max, native_format, power); + byte ret = ImGuiNative.igDragFloat4(native_label, native_v, v_speed, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -3147,10 +3357,10 @@ public static bool DragFloat4(string label, ref Vector4 v, float v_speed, float } int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); native_format[native_format_offset] = 0; - float power = 1.0f; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; fixed (Vector4* native_v = &v) { - byte ret = ImGuiNative.igDragFloat4(native_label, native_v, v_speed, v_min, v_max, native_format, power); + byte ret = ImGuiNative.igDragFloat4(native_label, native_v, v_speed, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -3196,10 +3406,10 @@ public static bool DragFloat4(string label, ref Vector4 v, float v_speed, float } int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); native_format[native_format_offset] = 0; - float power = 1.0f; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; fixed (Vector4* native_v = &v) { - byte ret = ImGuiNative.igDragFloat4(native_label, native_v, v_speed, v_min, v_max, native_format, power); + byte ret = ImGuiNative.igDragFloat4(native_label, native_v, v_speed, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -3249,10 +3459,10 @@ public static bool DragFloat4(string label, ref Vector4 v, float v_speed, float native_format[native_format_offset] = 0; } else { native_format = null; } - float power = 1.0f; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; fixed (Vector4* native_v = &v) { - byte ret = ImGuiNative.igDragFloat4(native_label, native_v, v_speed, v_min, v_max, native_format, power); + byte ret = ImGuiNative.igDragFloat4(native_label, native_v, v_speed, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -3264,7 +3474,7 @@ public static bool DragFloat4(string label, ref Vector4 v, float v_speed, float 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 DragFloat4(string label, ref Vector4 v, float v_speed, float v_min, float v_max, string format, ImGuiSliderFlags flags) { byte* native_label; int label_byteCount = 0; @@ -3304,7 +3514,7 @@ public static bool DragFloat4(string label, ref Vector4 v, float v_speed, float 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); + byte ret = ImGuiNative.igDragFloat4(native_label, native_v, v_speed, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -3354,12 +3564,12 @@ public static bool DragFloatRange2(string label, ref float v_current_min, ref fl int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); native_format[native_format_offset] = 0; byte* native_format_max = null; - float power = 1.0f; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; 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); + 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, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -3409,12 +3619,12 @@ public static bool DragFloatRange2(string label, ref float v_current_min, ref fl int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); native_format[native_format_offset] = 0; byte* native_format_max = null; - float power = 1.0f; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; 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); + 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, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -3463,12 +3673,12 @@ public static bool DragFloatRange2(string label, ref float v_current_min, ref fl int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); native_format[native_format_offset] = 0; byte* native_format_max = null; - float power = 1.0f; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; 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); + 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, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -3516,12 +3726,12 @@ public static bool DragFloatRange2(string label, ref float v_current_min, ref fl int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); native_format[native_format_offset] = 0; byte* native_format_max = null; - float power = 1.0f; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; 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); + 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, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -3573,12 +3783,12 @@ public static bool DragFloatRange2(string label, ref float v_current_min, ref fl } else { native_format = null; } byte* native_format_max = null; - float power = 1.0f; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; 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); + 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, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -3647,12 +3857,12 @@ public static bool DragFloatRange2(string label, ref float v_current_min, ref fl native_format_max[native_format_max_offset] = 0; } else { native_format_max = null; } - float power = 1.0f; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; 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); + 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, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -3669,7 +3879,7 @@ public static bool DragFloatRange2(string label, ref float v_current_min, ref fl } } } - 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 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, ImGuiSliderFlags flags) { byte* native_label; int label_byteCount = 0; @@ -3729,7 +3939,7 @@ public static bool DragFloatRange2(string label, ref float v_current_min, ref fl { 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); + 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, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -3783,9 +3993,10 @@ public static bool DragInt(string label, ref int v) } int native_format_offset = Util.GetUtf8("%d", native_format, format_byteCount); native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)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.igDragInt(native_label, native_v, v_speed, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -3833,9 +4044,10 @@ public static bool DragInt(string label, ref int v, float v_speed) } int native_format_offset = Util.GetUtf8("%d", native_format, format_byteCount); native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)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.igDragInt(native_label, native_v, v_speed, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -3882,9 +4094,10 @@ public static bool DragInt(string label, ref int v, float v_speed, int v_min) } int native_format_offset = Util.GetUtf8("%d", native_format, format_byteCount); native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)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.igDragInt(native_label, native_v, v_speed, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -3930,9 +4143,10 @@ public static bool DragInt(string label, ref int v, float v_speed, int v_min, in } int native_format_offset = Util.GetUtf8("%d", native_format, format_byteCount); native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)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.igDragInt(native_label, native_v, v_speed, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -3945,6 +4159,59 @@ public static bool DragInt(string label, ref int v, float v_speed, int v_min, in } } public static bool DragInt(string label, ref int v, float v_speed, int v_min, int v_max, string format) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt(native_label, native_v, v_speed, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool DragInt(string label, ref int v, float v_speed, int v_min, int v_max, string format, ImGuiSliderFlags flags) { byte* native_label; int label_byteCount = 0; @@ -3984,7 +4251,7 @@ public static bool DragInt(string label, ref int v, float v_speed, int v_min, in 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.igDragInt(native_label, native_v, v_speed, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -4033,9 +4300,10 @@ public static bool DragInt2(string label, ref int v) } int native_format_offset = Util.GetUtf8("%d", native_format, format_byteCount); native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; fixed (int* native_v = &v) { - byte ret = ImGuiNative.igDragInt2(native_label, native_v, v_speed, v_min, v_max, native_format); + byte ret = ImGuiNative.igDragInt2(native_label, native_v, v_speed, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -4083,9 +4351,10 @@ public static bool DragInt2(string label, ref int v, float v_speed) } int native_format_offset = Util.GetUtf8("%d", native_format, format_byteCount); native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; fixed (int* native_v = &v) { - byte ret = ImGuiNative.igDragInt2(native_label, native_v, v_speed, v_min, v_max, native_format); + byte ret = ImGuiNative.igDragInt2(native_label, native_v, v_speed, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -4132,9 +4401,10 @@ public static bool DragInt2(string label, ref int v, float v_speed, int v_min) } int native_format_offset = Util.GetUtf8("%d", native_format, format_byteCount); native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; fixed (int* native_v = &v) { - byte ret = ImGuiNative.igDragInt2(native_label, native_v, v_speed, v_min, v_max, native_format); + byte ret = ImGuiNative.igDragInt2(native_label, native_v, v_speed, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -4180,9 +4450,10 @@ public static bool DragInt2(string label, ref int v, float v_speed, int v_min, i } int native_format_offset = Util.GetUtf8("%d", native_format, format_byteCount); native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; fixed (int* native_v = &v) { - byte ret = ImGuiNative.igDragInt2(native_label, native_v, v_speed, v_min, v_max, native_format); + byte ret = ImGuiNative.igDragInt2(native_label, native_v, v_speed, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -4195,6 +4466,59 @@ public static bool DragInt2(string label, ref int v, float v_speed, int v_min, i } } public static bool DragInt2(string label, ref int v, float v_speed, int v_min, int v_max, string format) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt2(native_label, native_v, v_speed, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(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, ImGuiSliderFlags flags) { byte* native_label; int label_byteCount = 0; @@ -4234,7 +4558,7 @@ public static bool DragInt2(string label, ref int v, float v_speed, int v_min, i 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.igDragInt2(native_label, native_v, v_speed, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -4283,9 +4607,10 @@ public static bool DragInt3(string label, ref int v) } int native_format_offset = Util.GetUtf8("%d", native_format, format_byteCount); native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; fixed (int* native_v = &v) { - byte ret = ImGuiNative.igDragInt3(native_label, native_v, v_speed, v_min, v_max, native_format); + byte ret = ImGuiNative.igDragInt3(native_label, native_v, v_speed, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -4333,9 +4658,10 @@ public static bool DragInt3(string label, ref int v, float v_speed) } int native_format_offset = Util.GetUtf8("%d", native_format, format_byteCount); native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; fixed (int* native_v = &v) { - byte ret = ImGuiNative.igDragInt3(native_label, native_v, v_speed, v_min, v_max, native_format); + byte ret = ImGuiNative.igDragInt3(native_label, native_v, v_speed, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -4382,9 +4708,10 @@ public static bool DragInt3(string label, ref int v, float v_speed, int v_min) } int native_format_offset = Util.GetUtf8("%d", native_format, format_byteCount); native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; fixed (int* native_v = &v) { - byte ret = ImGuiNative.igDragInt3(native_label, native_v, v_speed, v_min, v_max, native_format); + byte ret = ImGuiNative.igDragInt3(native_label, native_v, v_speed, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -4430,9 +4757,10 @@ public static bool DragInt3(string label, ref int v, float v_speed, int v_min, i } int native_format_offset = Util.GetUtf8("%d", native_format, format_byteCount); native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; fixed (int* native_v = &v) { - byte ret = ImGuiNative.igDragInt3(native_label, native_v, v_speed, v_min, v_max, native_format); + byte ret = ImGuiNative.igDragInt3(native_label, native_v, v_speed, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -4445,6 +4773,59 @@ public static bool DragInt3(string label, ref int v, float v_speed, int v_min, i } } public static bool DragInt3(string label, ref int v, float v_speed, int v_min, int v_max, string format) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt3(native_label, native_v, v_speed, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool DragInt3(string label, ref int v, float v_speed, int v_min, int v_max, string format, ImGuiSliderFlags flags) { byte* native_label; int label_byteCount = 0; @@ -4484,7 +4865,7 @@ public static bool DragInt3(string label, ref int v, float v_speed, int v_min, i 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); + byte ret = ImGuiNative.igDragInt3(native_label, native_v, v_speed, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -4533,9 +4914,10 @@ public static bool DragInt4(string label, ref int v) } int native_format_offset = Util.GetUtf8("%d", native_format, format_byteCount); native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; fixed (int* native_v = &v) { - byte ret = ImGuiNative.igDragInt4(native_label, native_v, v_speed, v_min, v_max, native_format); + byte ret = ImGuiNative.igDragInt4(native_label, native_v, v_speed, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -4583,9 +4965,10 @@ public static bool DragInt4(string label, ref int v, float v_speed) } int native_format_offset = Util.GetUtf8("%d", native_format, format_byteCount); native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; fixed (int* native_v = &v) { - byte ret = ImGuiNative.igDragInt4(native_label, native_v, v_speed, v_min, v_max, native_format); + byte ret = ImGuiNative.igDragInt4(native_label, native_v, v_speed, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -4632,9 +5015,10 @@ public static bool DragInt4(string label, ref int v, float v_speed, int v_min) } int native_format_offset = Util.GetUtf8("%d", native_format, format_byteCount); native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; fixed (int* native_v = &v) { - byte ret = ImGuiNative.igDragInt4(native_label, native_v, v_speed, v_min, v_max, native_format); + byte ret = ImGuiNative.igDragInt4(native_label, native_v, v_speed, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -4680,9 +5064,10 @@ public static bool DragInt4(string label, ref int v, float v_speed, int v_min, i } int native_format_offset = Util.GetUtf8("%d", native_format, format_byteCount); native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; fixed (int* native_v = &v) { - byte ret = ImGuiNative.igDragInt4(native_label, native_v, v_speed, v_min, v_max, native_format); + byte ret = ImGuiNative.igDragInt4(native_label, native_v, v_speed, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -4695,6 +5080,59 @@ public static bool DragInt4(string label, ref int v, float v_speed, int v_min, i } } public static bool DragInt4(string label, ref int v, float v_speed, int v_min, int v_max, string format) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt4(native_label, native_v, v_speed, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool DragInt4(string label, ref int v, float v_speed, int v_min, int v_max, string format, ImGuiSliderFlags flags) { byte* native_label; int label_byteCount = 0; @@ -4734,7 +5172,7 @@ public static bool DragInt4(string label, ref int v, float v_speed, int v_min, i 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); + byte ret = ImGuiNative.igDragInt4(native_label, native_v, v_speed, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -4784,11 +5222,12 @@ public static bool DragIntRange2(string label, ref int v_current_min, ref int v_ int native_format_offset = Util.GetUtf8("%d", native_format, format_byteCount); native_format[native_format_offset] = 0; byte* native_format_max = null; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; 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); + 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, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -4838,11 +5277,12 @@ public static bool DragIntRange2(string label, ref int v_current_min, ref int v_ int native_format_offset = Util.GetUtf8("%d", native_format, format_byteCount); native_format[native_format_offset] = 0; byte* native_format_max = null; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; 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); + 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, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -4891,11 +5331,12 @@ public static bool DragIntRange2(string label, ref int v_current_min, ref int v_ int native_format_offset = Util.GetUtf8("%d", native_format, format_byteCount); native_format[native_format_offset] = 0; byte* native_format_max = null; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; 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); + 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, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -4943,11 +5384,12 @@ public static bool DragIntRange2(string label, ref int v_current_min, ref int v_ int native_format_offset = Util.GetUtf8("%d", native_format, format_byteCount); native_format[native_format_offset] = 0; byte* native_format_max = null; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; 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); + 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, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -4999,11 +5441,12 @@ public static bool DragIntRange2(string label, ref int v_current_min, ref int v_ } else { native_format = null; } byte* native_format_max = null; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; 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); + 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, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -5072,11 +5515,12 @@ public static bool DragIntRange2(string label, ref int v_current_min, ref int v_ native_format_max[native_format_max_offset] = 0; } else { native_format_max = null; } + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; 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); + 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, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -5093,7 +5537,7 @@ public static bool DragIntRange2(string label, ref int v_current_min, ref int v_ } } } - public static bool DragScalar(string label, ImGuiDataType data_type, IntPtr p_data, float v_speed) + 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, ImGuiSliderFlags flags) { byte* native_label; int label_byteCount = 0; @@ -5113,20 +5557,130 @@ public static bool DragScalar(string label, ImGuiDataType data_type, IntPtr p_da native_label[native_label_offset] = 0; } else { native_label = null; } - void* native_p_data = (void*)p_data.ToPointer(); - void* p_min = null; - void* p_max = null; - byte* native_format = null; - float power = 1.0f; - byte ret = ImGuiNative.igDragScalar(native_label, data_type, native_p_data, v_speed, p_min, p_max, native_format, power); - if (label_byteCount > Util.StackAllocationSizeLimit) + byte* native_format; + int format_byteCount = 0; + if (format != null) { - Util.Free(native_label); - } - return ret != 0; - } - public static bool DragScalar(string label, ImGuiDataType data_type, IntPtr p_data, float v_speed, IntPtr p_min) - { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + byte* native_format_max; + int format_max_byteCount = 0; + if (format_max != null) + { + format_max_byteCount = Encoding.UTF8.GetByteCount(format_max); + if (format_max_byteCount > Util.StackAllocationSizeLimit) + { + native_format_max = Util.Allocate(format_max_byteCount + 1); + } + else + { + byte* native_format_max_stackBytes = stackalloc byte[format_max_byteCount + 1]; + native_format_max = native_format_max_stackBytes; + } + int native_format_max_offset = Util.GetUtf8(format_max, 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, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + if (format_max_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format_max); + } + return ret != 0; + } + } + } + public static bool DragScalar(string label, ImGuiDataType data_type, IntPtr p_data) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + void* native_p_data = (void*)p_data.ToPointer(); + float v_speed = 1.0f; + void* p_min = null; + void* p_max = null; + byte* native_format = null; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + byte ret = ImGuiNative.igDragScalar(native_label, data_type, native_p_data, v_speed, p_min, p_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + public static bool DragScalar(string label, ImGuiDataType data_type, IntPtr p_data, float v_speed) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + void* native_p_data = (void*)p_data.ToPointer(); + void* p_min = null; + void* p_max = null; + byte* native_format = null; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + byte ret = ImGuiNative.igDragScalar(native_label, data_type, native_p_data, v_speed, p_min, p_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + public static bool DragScalar(string label, ImGuiDataType data_type, IntPtr p_data, float v_speed, IntPtr p_min) + { byte* native_label; int label_byteCount = 0; if (label != null) @@ -5149,8 +5703,8 @@ public static bool DragScalar(string label, ImGuiDataType data_type, IntPtr p_da void* native_p_min = (void*)p_min.ToPointer(); void* p_max = null; byte* native_format = null; - float power = 1.0f; - byte ret = ImGuiNative.igDragScalar(native_label, data_type, native_p_data, v_speed, native_p_min, p_max, native_format, power); + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + byte ret = ImGuiNative.igDragScalar(native_label, data_type, native_p_data, v_speed, native_p_min, p_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -5181,8 +5735,8 @@ public static bool DragScalar(string label, ImGuiDataType data_type, IntPtr p_da void* native_p_min = (void*)p_min.ToPointer(); void* native_p_max = (void*)p_max.ToPointer(); byte* native_format = null; - float power = 1.0f; - byte ret = ImGuiNative.igDragScalar(native_label, data_type, native_p_data, v_speed, native_p_min, native_p_max, native_format, power); + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + byte ret = ImGuiNative.igDragScalar(native_label, data_type, native_p_data, v_speed, native_p_min, native_p_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -5230,8 +5784,8 @@ public static bool DragScalar(string label, ImGuiDataType data_type, IntPtr p_da native_format[native_format_offset] = 0; } else { native_format = null; } - float power = 1.0f; - byte ret = ImGuiNative.igDragScalar(native_label, data_type, native_p_data, v_speed, native_p_min, native_p_max, native_format, power); + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + byte ret = ImGuiNative.igDragScalar(native_label, data_type, native_p_data, v_speed, native_p_min, native_p_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -5242,7 +5796,7 @@ public static bool DragScalar(string label, ImGuiDataType data_type, IntPtr p_da } return ret != 0; } - public static bool DragScalar(string label, ImGuiDataType data_type, IntPtr p_data, float v_speed, IntPtr p_min, IntPtr p_max, string format, float power) + public static bool DragScalar(string label, ImGuiDataType data_type, IntPtr p_data, float v_speed, IntPtr p_min, IntPtr p_max, string format, ImGuiSliderFlags flags) { byte* native_label; int label_byteCount = 0; @@ -5283,7 +5837,7 @@ public static bool DragScalar(string label, ImGuiDataType data_type, IntPtr p_da native_format[native_format_offset] = 0; } else { native_format = null; } - byte ret = ImGuiNative.igDragScalar(native_label, data_type, native_p_data, v_speed, native_p_min, native_p_max, native_format, power); + byte ret = ImGuiNative.igDragScalar(native_label, data_type, native_p_data, v_speed, native_p_min, native_p_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -5294,6 +5848,39 @@ public static bool DragScalar(string label, ImGuiDataType data_type, IntPtr p_da } return ret != 0; } + public static bool DragScalarN(string label, ImGuiDataType data_type, IntPtr p_data, int components) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + void* native_p_data = (void*)p_data.ToPointer(); + float v_speed = 1.0f; + void* p_min = null; + void* p_max = null; + byte* native_format = null; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + byte ret = ImGuiNative.igDragScalarN(native_label, data_type, native_p_data, components, v_speed, p_min, p_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } public static bool DragScalarN(string label, ImGuiDataType data_type, IntPtr p_data, int components, float v_speed) { byte* native_label; @@ -5318,8 +5905,8 @@ public static bool DragScalarN(string label, ImGuiDataType data_type, IntPtr p_d void* p_min = null; void* p_max = null; byte* native_format = null; - float power = 1.0f; - byte ret = ImGuiNative.igDragScalarN(native_label, data_type, native_p_data, components, v_speed, p_min, p_max, native_format, power); + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + byte ret = ImGuiNative.igDragScalarN(native_label, data_type, native_p_data, components, v_speed, p_min, p_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -5350,8 +5937,8 @@ public static bool DragScalarN(string label, ImGuiDataType data_type, IntPtr p_d void* native_p_min = (void*)p_min.ToPointer(); void* p_max = null; byte* native_format = null; - float power = 1.0f; - byte ret = ImGuiNative.igDragScalarN(native_label, data_type, native_p_data, components, v_speed, native_p_min, p_max, native_format, power); + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + byte ret = ImGuiNative.igDragScalarN(native_label, data_type, native_p_data, components, v_speed, native_p_min, p_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -5382,8 +5969,8 @@ public static bool DragScalarN(string label, ImGuiDataType data_type, IntPtr p_d void* native_p_min = (void*)p_min.ToPointer(); void* native_p_max = (void*)p_max.ToPointer(); byte* native_format = null; - float power = 1.0f; - byte ret = ImGuiNative.igDragScalarN(native_label, data_type, native_p_data, components, v_speed, native_p_min, native_p_max, native_format, power); + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + byte ret = ImGuiNative.igDragScalarN(native_label, data_type, native_p_data, components, v_speed, native_p_min, native_p_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -5431,8 +6018,8 @@ public static bool DragScalarN(string label, ImGuiDataType data_type, IntPtr p_d native_format[native_format_offset] = 0; } else { native_format = null; } - float power = 1.0f; - byte ret = ImGuiNative.igDragScalarN(native_label, data_type, native_p_data, components, v_speed, native_p_min, native_p_max, native_format, power); + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + byte ret = ImGuiNative.igDragScalarN(native_label, data_type, native_p_data, components, v_speed, native_p_min, native_p_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -5443,7 +6030,7 @@ public static bool DragScalarN(string label, ImGuiDataType data_type, IntPtr p_d } return ret != 0; } - public static bool DragScalarN(string label, ImGuiDataType data_type, IntPtr p_data, int components, float v_speed, IntPtr p_min, IntPtr p_max, string format, float power) + public static bool DragScalarN(string label, ImGuiDataType data_type, IntPtr p_data, int components, float v_speed, IntPtr p_min, IntPtr p_max, string format, ImGuiSliderFlags flags) { byte* native_label; int label_byteCount = 0; @@ -5484,7 +6071,7 @@ public static bool DragScalarN(string label, ImGuiDataType data_type, IntPtr p_d native_format[native_format_offset] = 0; } else { native_format = null; } - byte ret = ImGuiNative.igDragScalarN(native_label, data_type, native_p_data, components, v_speed, native_p_min, native_p_max, native_format, power); + byte ret = ImGuiNative.igDragScalarN(native_label, data_type, native_p_data, components, v_speed, native_p_min, native_p_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -5515,6 +6102,10 @@ public static void EndCombo() { ImGuiNative.igEndCombo(); } + public static void EndDisabled() + { + ImGuiNative.igEndDisabled(); + } public static void EndDragDropSource() { ImGuiNative.igEndDragDropSource(); @@ -5531,6 +6122,10 @@ public static void EndGroup() { ImGuiNative.igEndGroup(); } + public static void EndListBox() + { + ImGuiNative.igEndListBox(); + } public static void EndMainMenuBar() { ImGuiNative.igEndMainMenuBar(); @@ -5555,13 +6150,47 @@ public static void EndTabItem() { ImGuiNative.igEndTabItem(); } + public static void EndTable() + { + ImGuiNative.igEndTable(); + } public static void EndTooltip() { ImGuiNative.igEndTooltip(); } + public static ImGuiViewportPtr FindViewportByID(uint id) + { + ImGuiViewport* ret = ImGuiNative.igFindViewportByID(id); + return new ImGuiViewportPtr(ret); + } + public static ImGuiViewportPtr FindViewportByPlatformHandle(IntPtr platform_handle) + { + void* native_platform_handle = (void*)platform_handle.ToPointer(); + ImGuiViewport* ret = ImGuiNative.igFindViewportByPlatformHandle(native_platform_handle); + return new ImGuiViewportPtr(ret); + } + public static void GetAllocatorFunctions(ref IntPtr p_alloc_func, ref IntPtr p_free_func, ref void* p_user_data) + { + fixed (IntPtr* native_p_alloc_func = &p_alloc_func) + { + fixed (IntPtr* native_p_free_func = &p_free_func) + { + fixed (void** native_p_user_data = &p_user_data) + { + ImGuiNative.igGetAllocatorFunctions(native_p_alloc_func, native_p_free_func, native_p_user_data); + } + } + } + } public static ImDrawListPtr GetBackgroundDrawList() { - ImDrawList* ret = ImGuiNative.igGetBackgroundDrawList(); + ImDrawList* ret = ImGuiNative.igGetBackgroundDrawList_Nil(); + return new ImDrawListPtr(ret); + } + public static ImDrawListPtr GetBackgroundDrawList(ImGuiViewportPtr viewport) + { + ImGuiViewport* native_viewport = viewport.NativePtr; + ImDrawList* ret = ImGuiNative.igGetBackgroundDrawList_ViewportPtr(native_viewport); return new ImDrawListPtr(ret); } public static string GetClipboardText() @@ -5572,22 +6201,22 @@ public static string GetClipboardText() public static uint GetColorU32(ImGuiCol idx) { float alpha_mul = 1.0f; - uint ret = ImGuiNative.igGetColorU32(idx, alpha_mul); + uint ret = ImGuiNative.igGetColorU32_Col(idx, alpha_mul); return ret; } public static uint GetColorU32(ImGuiCol idx, float alpha_mul) { - uint ret = ImGuiNative.igGetColorU32(idx, alpha_mul); + uint ret = ImGuiNative.igGetColorU32_Col(idx, alpha_mul); return ret; } public static uint GetColorU32(Vector4 col) { - uint ret = ImGuiNative.igGetColorU32Vec4(col); + uint ret = ImGuiNative.igGetColorU32_Vec4(col); return ret; } public static uint GetColorU32(uint col) { - uint ret = ImGuiNative.igGetColorU32U32(col); + uint ret = ImGuiNative.igGetColorU32_U32(col); return ret; } public static int GetColumnIndex() @@ -5624,13 +6253,15 @@ public static float GetColumnWidth(int column_index) } public static Vector2 GetContentRegionAvail() { - Vector2 ret = ImGuiNative.igGetContentRegionAvail(); - return ret; + Vector2 __retval; + ImGuiNative.igGetContentRegionAvail(&__retval); + return __retval; } public static Vector2 GetContentRegionMax() { - Vector2 ret = ImGuiNative.igGetContentRegionMax(); - return ret; + Vector2 __retval; + ImGuiNative.igGetContentRegionMax(&__retval); + return __retval; } public static IntPtr GetCurrentContext() { @@ -5639,8 +6270,9 @@ public static IntPtr GetCurrentContext() } public static Vector2 GetCursorPos() { - Vector2 ret = ImGuiNative.igGetCursorPos(); - return ret; + Vector2 __retval; + ImGuiNative.igGetCursorPos(&__retval); + return __retval; } public static float GetCursorPosX() { @@ -5654,13 +6286,15 @@ public static float GetCursorPosY() } public static Vector2 GetCursorScreenPos() { - Vector2 ret = ImGuiNative.igGetCursorScreenPos(); - return ret; + Vector2 __retval; + ImGuiNative.igGetCursorScreenPos(&__retval); + return __retval; } public static Vector2 GetCursorStartPos() { - Vector2 ret = ImGuiNative.igGetCursorStartPos(); - return ret; + Vector2 __retval; + ImGuiNative.igGetCursorStartPos(&__retval); + return __retval; } public static ImGuiPayloadPtr GetDragDropPayload() { @@ -5689,12 +6323,19 @@ public static float GetFontSize() } public static Vector2 GetFontTexUvWhitePixel() { - Vector2 ret = ImGuiNative.igGetFontTexUvWhitePixel(); - return ret; + Vector2 __retval; + ImGuiNative.igGetFontTexUvWhitePixel(&__retval); + return __retval; } public static ImDrawListPtr GetForegroundDrawList() { - ImDrawList* ret = ImGuiNative.igGetForegroundDrawList(); + ImDrawList* ret = ImGuiNative.igGetForegroundDrawList_Nil(); + return new ImDrawListPtr(ret); + } + public static ImDrawListPtr GetForegroundDrawList(ImGuiViewportPtr viewport) + { + ImGuiViewport* native_viewport = viewport.NativePtr; + ImDrawList* ret = ImGuiNative.igGetForegroundDrawList_ViewportPtr(native_viewport); return new ImDrawListPtr(ret); } public static int GetFrameCount() @@ -5732,7 +6373,7 @@ public static uint GetID(string str_id) native_str_id[native_str_id_offset] = 0; } else { native_str_id = null; } - uint ret = ImGuiNative.igGetIDStr(native_str_id); + uint ret = ImGuiNative.igGetID_Str(native_str_id); if (str_id_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_str_id); @@ -5742,7 +6383,7 @@ public static uint GetID(string str_id) public static uint GetID(IntPtr ptr_id) { void* native_ptr_id = (void*)ptr_id.ToPointer(); - uint ret = ImGuiNative.igGetIDPtr(native_ptr_id); + uint ret = ImGuiNative.igGetID_Ptr(native_ptr_id); return ret; } public static ImGuiIOPtr GetIO() @@ -5752,27 +6393,45 @@ public static ImGuiIOPtr GetIO() } public static Vector2 GetItemRectMax() { - Vector2 ret = ImGuiNative.igGetItemRectMax(); - return ret; + Vector2 __retval; + ImGuiNative.igGetItemRectMax(&__retval); + return __retval; } public static Vector2 GetItemRectMin() { - Vector2 ret = ImGuiNative.igGetItemRectMin(); - return ret; + Vector2 __retval; + ImGuiNative.igGetItemRectMin(&__retval); + return __retval; } public static Vector2 GetItemRectSize() { - Vector2 ret = ImGuiNative.igGetItemRectSize(); + Vector2 __retval; + ImGuiNative.igGetItemRectSize(&__retval); + return __retval; + } + public static int GetKeyIndex(ImGuiKey key) + { + int ret = ImGuiNative.igGetKeyIndex(key); return ret; } - public static int GetKeyIndex(ImGuiKey imgui_key) + public static string GetKeyName(ImGuiKey key) + { + byte* ret = ImGuiNative.igGetKeyName(key); + return Util.StringFromPtr(ret); + } + public static int GetKeyPressedAmount(ImGuiKey key, float repeat_delay, float rate) { - int ret = ImGuiNative.igGetKeyIndex(imgui_key); + int ret = ImGuiNative.igGetKeyPressedAmount(key, repeat_delay, rate); return ret; } - public static int GetKeyPressedAmount(int key_index, float repeat_delay, float rate) + public static ImGuiViewportPtr GetMainViewport() + { + ImGuiViewport* ret = ImGuiNative.igGetMainViewport(); + return new ImGuiViewportPtr(ret); + } + public static int GetMouseClickedCount(ImGuiMouseButton button) { - int ret = ImGuiNative.igGetKeyPressedAmount(key_index, repeat_delay, rate); + int ret = ImGuiNative.igGetMouseClickedCount(button); return ret; } public static ImGuiMouseCursor GetMouseCursor() @@ -5782,31 +6441,41 @@ public static ImGuiMouseCursor GetMouseCursor() } public static Vector2 GetMouseDragDelta() { + Vector2 __retval; ImGuiMouseButton button = (ImGuiMouseButton)0; float lock_threshold = -1.0f; - Vector2 ret = ImGuiNative.igGetMouseDragDelta(button, lock_threshold); - return ret; + ImGuiNative.igGetMouseDragDelta(&__retval, button, lock_threshold); + return __retval; } public static Vector2 GetMouseDragDelta(ImGuiMouseButton button) { + Vector2 __retval; float lock_threshold = -1.0f; - Vector2 ret = ImGuiNative.igGetMouseDragDelta(button, lock_threshold); - return ret; + ImGuiNative.igGetMouseDragDelta(&__retval, button, lock_threshold); + return __retval; } public static Vector2 GetMouseDragDelta(ImGuiMouseButton button, float lock_threshold) { - Vector2 ret = ImGuiNative.igGetMouseDragDelta(button, lock_threshold); - return ret; + Vector2 __retval; + ImGuiNative.igGetMouseDragDelta(&__retval, button, lock_threshold); + return __retval; } public static Vector2 GetMousePos() { - Vector2 ret = ImGuiNative.igGetMousePos(); - return ret; + Vector2 __retval; + ImGuiNative.igGetMousePos(&__retval); + return __retval; } public static Vector2 GetMousePosOnOpeningCurrentPopup() { - Vector2 ret = ImGuiNative.igGetMousePosOnOpeningCurrentPopup(); - return ret; + Vector2 __retval; + ImGuiNative.igGetMousePosOnOpeningCurrentPopup(&__retval); + return __retval; + } + public static ImGuiPlatformIOPtr GetPlatformIO() + { + ImGuiPlatformIO* ret = ImGuiNative.igGetPlatformIO(); + return new ImGuiPlatformIOPtr(ret); } public static float GetScrollMaxX() { @@ -5875,17 +6544,24 @@ public static string GetVersion() } public static Vector2 GetWindowContentRegionMax() { - Vector2 ret = ImGuiNative.igGetWindowContentRegionMax(); - return ret; + Vector2 __retval; + ImGuiNative.igGetWindowContentRegionMax(&__retval); + return __retval; } public static Vector2 GetWindowContentRegionMin() { - Vector2 ret = ImGuiNative.igGetWindowContentRegionMin(); + Vector2 __retval; + ImGuiNative.igGetWindowContentRegionMin(&__retval); + return __retval; + } + public static uint GetWindowDockID() + { + uint ret = ImGuiNative.igGetWindowDockID(); return ret; } - public static float GetWindowContentRegionWidth() + public static float GetWindowDpiScale() { - float ret = ImGuiNative.igGetWindowContentRegionWidth(); + float ret = ImGuiNative.igGetWindowDpiScale(); return ret; } public static ImDrawListPtr GetWindowDrawList() @@ -5900,13 +6576,20 @@ public static float GetWindowHeight() } public static Vector2 GetWindowPos() { - Vector2 ret = ImGuiNative.igGetWindowPos(); - return ret; + Vector2 __retval; + ImGuiNative.igGetWindowPos(&__retval); + return __retval; } public static Vector2 GetWindowSize() { - Vector2 ret = ImGuiNative.igGetWindowSize(); - return ret; + Vector2 __retval; + ImGuiNative.igGetWindowSize(&__retval); + return __retval; + } + public static ImGuiViewportPtr GetWindowViewport() + { + ImGuiViewport* ret = ImGuiNative.igGetWindowViewport(); + return new ImGuiViewportPtr(ret); } public static float GetWindowWidth() { @@ -7680,325 +8363,62 @@ public static bool InputScalarN(string label, ImGuiDataType data_type, IntPtr p_ } return ret != 0; } - public static bool InputTextWithHint(string label, string hint, string buf, uint buf_size) + public static bool InvisibleButton(string str_id, Vector2 size) { - byte* native_label; - int label_byteCount = 0; - if (label != null) + byte* native_str_id; + int str_id_byteCount = 0; + if (str_id != null) { - label_byteCount = Encoding.UTF8.GetByteCount(label); - if (label_byteCount > Util.StackAllocationSizeLimit) + str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + if (str_id_byteCount > Util.StackAllocationSizeLimit) { - native_label = Util.Allocate(label_byteCount + 1); + native_str_id = Util.Allocate(str_id_byteCount + 1); } else { - byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; - native_label = native_label_stackBytes; + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; } - int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); - native_label[native_label_offset] = 0; + int native_str_id_offset = Util.GetUtf8(str_id, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; } - else { native_label = null; } - byte* native_hint; - int hint_byteCount = 0; - if (hint != null) + else { native_str_id = null; } + ImGuiButtonFlags flags = (ImGuiButtonFlags)0; + byte ret = ImGuiNative.igInvisibleButton(native_str_id, size, flags); + if (str_id_byteCount > Util.StackAllocationSizeLimit) { - hint_byteCount = Encoding.UTF8.GetByteCount(hint); - if (hint_byteCount > Util.StackAllocationSizeLimit) - { - native_hint = Util.Allocate(hint_byteCount + 1); - } - else - { - byte* native_hint_stackBytes = stackalloc byte[hint_byteCount + 1]; - native_hint = native_hint_stackBytes; - } - int native_hint_offset = Util.GetUtf8(hint, native_hint, hint_byteCount); - native_hint[native_hint_offset] = 0; + Util.Free(native_str_id); } - else { native_hint = null; } - byte* native_buf; - int buf_byteCount = 0; - if (buf != null) + return ret != 0; + } + public static bool InvisibleButton(string str_id, Vector2 size, ImGuiButtonFlags flags) + { + byte* native_str_id; + int str_id_byteCount = 0; + if (str_id != null) { - buf_byteCount = Encoding.UTF8.GetByteCount(buf); - if (buf_byteCount > Util.StackAllocationSizeLimit) + str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + if (str_id_byteCount > Util.StackAllocationSizeLimit) { - native_buf = Util.Allocate(buf_byteCount + 1); + native_str_id = Util.Allocate(str_id_byteCount + 1); } else { - byte* native_buf_stackBytes = stackalloc byte[buf_byteCount + 1]; - native_buf = native_buf_stackBytes; + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; } - int native_buf_offset = Util.GetUtf8(buf, native_buf, buf_byteCount); - native_buf[native_buf_offset] = 0; - } - else { native_buf = null; } - ImGuiInputTextFlags flags = (ImGuiInputTextFlags)0; - ImGuiInputTextCallback callback = null; - void* user_data = null; - byte ret = ImGuiNative.igInputTextWithHint(native_label, native_hint, native_buf, buf_size, flags, callback, user_data); - if (label_byteCount > Util.StackAllocationSizeLimit) - { - Util.Free(native_label); - } - if (hint_byteCount > Util.StackAllocationSizeLimit) - { - Util.Free(native_hint); + int native_str_id_offset = Util.GetUtf8(str_id, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; } - if (buf_byteCount > Util.StackAllocationSizeLimit) + else { native_str_id = null; } + byte ret = ImGuiNative.igInvisibleButton(native_str_id, size, flags); + if (str_id_byteCount > Util.StackAllocationSizeLimit) { - Util.Free(native_buf); + Util.Free(native_str_id); } return ret != 0; } - public static bool InputTextWithHint(string label, string hint, string buf, uint buf_size, ImGuiInputTextFlags flags) - { - byte* native_label; - int label_byteCount = 0; - if (label != null) - { - label_byteCount = Encoding.UTF8.GetByteCount(label); - if (label_byteCount > Util.StackAllocationSizeLimit) - { - native_label = Util.Allocate(label_byteCount + 1); - } - else - { - byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; - native_label = native_label_stackBytes; - } - int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); - native_label[native_label_offset] = 0; - } - else { native_label = null; } - byte* native_hint; - int hint_byteCount = 0; - if (hint != null) - { - hint_byteCount = Encoding.UTF8.GetByteCount(hint); - if (hint_byteCount > Util.StackAllocationSizeLimit) - { - native_hint = Util.Allocate(hint_byteCount + 1); - } - else - { - byte* native_hint_stackBytes = stackalloc byte[hint_byteCount + 1]; - native_hint = native_hint_stackBytes; - } - int native_hint_offset = Util.GetUtf8(hint, native_hint, hint_byteCount); - native_hint[native_hint_offset] = 0; - } - else { native_hint = null; } - byte* native_buf; - int buf_byteCount = 0; - if (buf != null) - { - buf_byteCount = Encoding.UTF8.GetByteCount(buf); - if (buf_byteCount > Util.StackAllocationSizeLimit) - { - native_buf = Util.Allocate(buf_byteCount + 1); - } - else - { - byte* native_buf_stackBytes = stackalloc byte[buf_byteCount + 1]; - native_buf = native_buf_stackBytes; - } - int native_buf_offset = Util.GetUtf8(buf, native_buf, buf_byteCount); - native_buf[native_buf_offset] = 0; - } - else { native_buf = null; } - ImGuiInputTextCallback callback = null; - void* user_data = null; - byte ret = ImGuiNative.igInputTextWithHint(native_label, native_hint, native_buf, buf_size, flags, callback, user_data); - if (label_byteCount > Util.StackAllocationSizeLimit) - { - Util.Free(native_label); - } - if (hint_byteCount > Util.StackAllocationSizeLimit) - { - Util.Free(native_hint); - } - if (buf_byteCount > Util.StackAllocationSizeLimit) - { - Util.Free(native_buf); - } - return ret != 0; - } - public static bool InputTextWithHint(string label, string hint, string buf, uint buf_size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) - { - byte* native_label; - int label_byteCount = 0; - if (label != null) - { - label_byteCount = Encoding.UTF8.GetByteCount(label); - if (label_byteCount > Util.StackAllocationSizeLimit) - { - native_label = Util.Allocate(label_byteCount + 1); - } - else - { - byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; - native_label = native_label_stackBytes; - } - int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); - native_label[native_label_offset] = 0; - } - else { native_label = null; } - byte* native_hint; - int hint_byteCount = 0; - if (hint != null) - { - hint_byteCount = Encoding.UTF8.GetByteCount(hint); - if (hint_byteCount > Util.StackAllocationSizeLimit) - { - native_hint = Util.Allocate(hint_byteCount + 1); - } - else - { - byte* native_hint_stackBytes = stackalloc byte[hint_byteCount + 1]; - native_hint = native_hint_stackBytes; - } - int native_hint_offset = Util.GetUtf8(hint, native_hint, hint_byteCount); - native_hint[native_hint_offset] = 0; - } - else { native_hint = null; } - byte* native_buf; - int buf_byteCount = 0; - if (buf != null) - { - buf_byteCount = Encoding.UTF8.GetByteCount(buf); - if (buf_byteCount > Util.StackAllocationSizeLimit) - { - native_buf = Util.Allocate(buf_byteCount + 1); - } - else - { - byte* native_buf_stackBytes = stackalloc byte[buf_byteCount + 1]; - native_buf = native_buf_stackBytes; - } - int native_buf_offset = Util.GetUtf8(buf, native_buf, buf_byteCount); - native_buf[native_buf_offset] = 0; - } - else { native_buf = null; } - void* user_data = null; - byte ret = ImGuiNative.igInputTextWithHint(native_label, native_hint, native_buf, buf_size, flags, callback, user_data); - if (label_byteCount > Util.StackAllocationSizeLimit) - { - Util.Free(native_label); - } - if (hint_byteCount > Util.StackAllocationSizeLimit) - { - Util.Free(native_hint); - } - if (buf_byteCount > Util.StackAllocationSizeLimit) - { - Util.Free(native_buf); - } - return ret != 0; - } - public static bool InputTextWithHint(string label, string hint, string buf, uint buf_size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, IntPtr user_data) - { - byte* native_label; - int label_byteCount = 0; - if (label != null) - { - label_byteCount = Encoding.UTF8.GetByteCount(label); - if (label_byteCount > Util.StackAllocationSizeLimit) - { - native_label = Util.Allocate(label_byteCount + 1); - } - else - { - byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; - native_label = native_label_stackBytes; - } - int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); - native_label[native_label_offset] = 0; - } - else { native_label = null; } - byte* native_hint; - int hint_byteCount = 0; - if (hint != null) - { - hint_byteCount = Encoding.UTF8.GetByteCount(hint); - if (hint_byteCount > Util.StackAllocationSizeLimit) - { - native_hint = Util.Allocate(hint_byteCount + 1); - } - else - { - byte* native_hint_stackBytes = stackalloc byte[hint_byteCount + 1]; - native_hint = native_hint_stackBytes; - } - int native_hint_offset = Util.GetUtf8(hint, native_hint, hint_byteCount); - native_hint[native_hint_offset] = 0; - } - else { native_hint = null; } - byte* native_buf; - int buf_byteCount = 0; - if (buf != null) - { - buf_byteCount = Encoding.UTF8.GetByteCount(buf); - if (buf_byteCount > Util.StackAllocationSizeLimit) - { - native_buf = Util.Allocate(buf_byteCount + 1); - } - else - { - byte* native_buf_stackBytes = stackalloc byte[buf_byteCount + 1]; - native_buf = native_buf_stackBytes; - } - int native_buf_offset = Util.GetUtf8(buf, native_buf, buf_byteCount); - native_buf[native_buf_offset] = 0; - } - else { native_buf = null; } - void* native_user_data = (void*)user_data.ToPointer(); - byte ret = ImGuiNative.igInputTextWithHint(native_label, native_hint, native_buf, buf_size, flags, callback, native_user_data); - if (label_byteCount > Util.StackAllocationSizeLimit) - { - Util.Free(native_label); - } - if (hint_byteCount > Util.StackAllocationSizeLimit) - { - Util.Free(native_hint); - } - if (buf_byteCount > Util.StackAllocationSizeLimit) - { - Util.Free(native_buf); - } - return ret != 0; - } - public static bool InvisibleButton(string str_id, Vector2 size) - { - byte* native_str_id; - int str_id_byteCount = 0; - if (str_id != null) - { - str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); - if (str_id_byteCount > Util.StackAllocationSizeLimit) - { - native_str_id = Util.Allocate(str_id_byteCount + 1); - } - else - { - byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; - native_str_id = native_str_id_stackBytes; - } - int native_str_id_offset = Util.GetUtf8(str_id, 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); - if (str_id_byteCount > Util.StackAllocationSizeLimit) - { - Util.Free(native_str_id); - } - return ret != 0; - } - public static bool IsAnyItemActive() + public static bool IsAnyItemActive() { byte ret = ImGuiNative.igIsAnyItemActive(); return ret != 0; @@ -8080,26 +8500,26 @@ public static bool IsItemVisible() byte ret = ImGuiNative.igIsItemVisible(); return ret != 0; } - public static bool IsKeyDown(int user_key_index) + public static bool IsKeyDown(ImGuiKey key) { - byte ret = ImGuiNative.igIsKeyDown(user_key_index); + byte ret = ImGuiNative.igIsKeyDown(key); return ret != 0; } - public static bool IsKeyPressed(int user_key_index) + public static bool IsKeyPressed(ImGuiKey key) { byte repeat = 1; - byte ret = ImGuiNative.igIsKeyPressed(user_key_index, repeat); + byte ret = ImGuiNative.igIsKeyPressed(key, repeat); return ret != 0; } - public static bool IsKeyPressed(int user_key_index, bool repeat) + public static bool IsKeyPressed(ImGuiKey key, bool repeat) { byte native_repeat = repeat ? (byte)1 : (byte)0; - byte ret = ImGuiNative.igIsKeyPressed(user_key_index, native_repeat); + byte ret = ImGuiNative.igIsKeyPressed(key, native_repeat); return ret != 0; } - public static bool IsKeyReleased(int user_key_index) + public static bool IsKeyReleased(ImGuiKey key) { - byte ret = ImGuiNative.igIsKeyReleased(user_key_index); + byte ret = ImGuiNative.igIsKeyReleased(key); return ret != 0; } public static bool IsMouseClicked(ImGuiMouseButton button) @@ -8186,7 +8606,35 @@ public static bool IsPopupOpen(string str_id) native_str_id[native_str_id_offset] = 0; } else { native_str_id = null; } - byte ret = ImGuiNative.igIsPopupOpen(native_str_id); + ImGuiPopupFlags flags = (ImGuiPopupFlags)0; + byte ret = ImGuiNative.igIsPopupOpen_Str(native_str_id, flags); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_str_id); + } + return ret != 0; + } + public static bool IsPopupOpen(string str_id, ImGuiPopupFlags flags) + { + byte* native_str_id; + int str_id_byteCount = 0; + if (str_id != null) + { + str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + native_str_id = Util.Allocate(str_id_byteCount + 1); + } + else + { + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + } + int native_str_id_offset = Util.GetUtf8(str_id, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + else { native_str_id = null; } + byte ret = ImGuiNative.igIsPopupOpen_Str(native_str_id, flags); if (str_id_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_str_id); @@ -8195,12 +8643,12 @@ public static bool IsPopupOpen(string str_id) } public static bool IsRectVisible(Vector2 size) { - byte ret = ImGuiNative.igIsRectVisible(size); + byte ret = ImGuiNative.igIsRectVisible_Nil(size); return ret != 0; } public static bool IsRectVisible(Vector2 rect_min, Vector2 rect_max) { - byte ret = ImGuiNative.igIsRectVisibleVec2(rect_min, rect_max); + byte ret = ImGuiNative.igIsRectVisible_Vec2(rect_min, rect_max); return ret != 0; } public static bool IsWindowAppearing() @@ -8213,6 +8661,11 @@ public static bool IsWindowCollapsed() byte ret = ImGuiNative.igIsWindowCollapsed(); return ret != 0; } + public static bool IsWindowDocked() + { + byte ret = ImGuiNative.igIsWindowDocked(); + return ret != 0; + } public static bool IsWindowFocused() { ImGuiFocusedFlags flags = (ImGuiFocusedFlags)0; @@ -8333,7 +8786,7 @@ public static bool ListBox(string label, ref int current_item, string[] items, i 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); + byte ret = ImGuiNative.igListBox_Str_arr(native_label, native_current_item, native_items, items_count, height_in_items); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -8390,7 +8843,7 @@ public static bool ListBox(string label, ref int current_item, string[] items, i } fixed (int* native_current_item = ¤t_item) { - byte ret = ImGuiNative.igListBoxStr_arr(native_label, native_current_item, native_items, items_count, height_in_items); + byte ret = ImGuiNative.igListBox_Str_arr(native_label, native_current_item, native_items, items_count, height_in_items); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -8398,181 +8851,67 @@ public static bool ListBox(string label, ref int current_item, string[] items, i return ret != 0; } } - public static void ListBoxFooter() - { - ImGuiNative.igListBoxFooter(); - } - public static bool ListBoxHeader(string label) + public static void LoadIniSettingsFromDisk(string ini_filename) { - byte* native_label; - int label_byteCount = 0; - if (label != null) + byte* native_ini_filename; + int ini_filename_byteCount = 0; + if (ini_filename != null) { - label_byteCount = Encoding.UTF8.GetByteCount(label); - if (label_byteCount > Util.StackAllocationSizeLimit) + ini_filename_byteCount = Encoding.UTF8.GetByteCount(ini_filename); + if (ini_filename_byteCount > Util.StackAllocationSizeLimit) { - native_label = Util.Allocate(label_byteCount + 1); + native_ini_filename = Util.Allocate(ini_filename_byteCount + 1); } else { - byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; - native_label = native_label_stackBytes; + byte* native_ini_filename_stackBytes = stackalloc byte[ini_filename_byteCount + 1]; + native_ini_filename = native_ini_filename_stackBytes; } - int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); - native_label[native_label_offset] = 0; + int native_ini_filename_offset = Util.GetUtf8(ini_filename, native_ini_filename, ini_filename_byteCount); + native_ini_filename[native_ini_filename_offset] = 0; } - else { native_label = null; } - Vector2 size = new Vector2(); - byte ret = ImGuiNative.igListBoxHeaderVec2(native_label, size); - if (label_byteCount > Util.StackAllocationSizeLimit) + else { native_ini_filename = null; } + ImGuiNative.igLoadIniSettingsFromDisk(native_ini_filename); + if (ini_filename_byteCount > Util.StackAllocationSizeLimit) { - Util.Free(native_label); + Util.Free(native_ini_filename); } - return ret != 0; } - public static bool ListBoxHeader(string label, Vector2 size) + public static void LoadIniSettingsFromMemory(string ini_data) { - byte* native_label; - int label_byteCount = 0; - if (label != null) + byte* native_ini_data; + int ini_data_byteCount = 0; + if (ini_data != null) { - label_byteCount = Encoding.UTF8.GetByteCount(label); - if (label_byteCount > Util.StackAllocationSizeLimit) + ini_data_byteCount = Encoding.UTF8.GetByteCount(ini_data); + if (ini_data_byteCount > Util.StackAllocationSizeLimit) { - native_label = Util.Allocate(label_byteCount + 1); + native_ini_data = Util.Allocate(ini_data_byteCount + 1); } else { - byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; - native_label = native_label_stackBytes; + byte* native_ini_data_stackBytes = stackalloc byte[ini_data_byteCount + 1]; + native_ini_data = native_ini_data_stackBytes; } - int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); - native_label[native_label_offset] = 0; + int native_ini_data_offset = Util.GetUtf8(ini_data, native_ini_data, ini_data_byteCount); + native_ini_data[native_ini_data_offset] = 0; } - else { native_label = null; } - byte ret = ImGuiNative.igListBoxHeaderVec2(native_label, size); - if (label_byteCount > Util.StackAllocationSizeLimit) + else { native_ini_data = null; } + uint ini_size = 0; + ImGuiNative.igLoadIniSettingsFromMemory(native_ini_data, ini_size); + if (ini_data_byteCount > Util.StackAllocationSizeLimit) { - Util.Free(native_label); + Util.Free(native_ini_data); } - return ret != 0; } - public static bool ListBoxHeader(string label, int items_count) + public static void LoadIniSettingsFromMemory(string ini_data, uint ini_size) { - byte* native_label; - int label_byteCount = 0; - if (label != null) + byte* native_ini_data; + int ini_data_byteCount = 0; + if (ini_data != null) { - label_byteCount = Encoding.UTF8.GetByteCount(label); - if (label_byteCount > Util.StackAllocationSizeLimit) - { - native_label = Util.Allocate(label_byteCount + 1); - } - else - { - byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; - native_label = native_label_stackBytes; - } - int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); - native_label[native_label_offset] = 0; - } - else { native_label = null; } - int height_in_items = -1; - byte ret = ImGuiNative.igListBoxHeaderInt(native_label, items_count, height_in_items); - if (label_byteCount > Util.StackAllocationSizeLimit) - { - Util.Free(native_label); - } - return ret != 0; - } - public static bool ListBoxHeader(string label, int items_count, int height_in_items) - { - byte* native_label; - int label_byteCount = 0; - if (label != null) - { - label_byteCount = Encoding.UTF8.GetByteCount(label); - if (label_byteCount > Util.StackAllocationSizeLimit) - { - native_label = Util.Allocate(label_byteCount + 1); - } - else - { - byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; - native_label = native_label_stackBytes; - } - int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); - native_label[native_label_offset] = 0; - } - else { native_label = null; } - byte ret = ImGuiNative.igListBoxHeaderInt(native_label, items_count, height_in_items); - if (label_byteCount > Util.StackAllocationSizeLimit) - { - Util.Free(native_label); - } - return ret != 0; - } - public static void LoadIniSettingsFromDisk(string ini_filename) - { - byte* native_ini_filename; - int ini_filename_byteCount = 0; - if (ini_filename != null) - { - ini_filename_byteCount = Encoding.UTF8.GetByteCount(ini_filename); - if (ini_filename_byteCount > Util.StackAllocationSizeLimit) - { - native_ini_filename = Util.Allocate(ini_filename_byteCount + 1); - } - else - { - byte* native_ini_filename_stackBytes = stackalloc byte[ini_filename_byteCount + 1]; - native_ini_filename = native_ini_filename_stackBytes; - } - int native_ini_filename_offset = Util.GetUtf8(ini_filename, native_ini_filename, ini_filename_byteCount); - native_ini_filename[native_ini_filename_offset] = 0; - } - else { native_ini_filename = null; } - ImGuiNative.igLoadIniSettingsFromDisk(native_ini_filename); - if (ini_filename_byteCount > Util.StackAllocationSizeLimit) - { - Util.Free(native_ini_filename); - } - } - public static void LoadIniSettingsFromMemory(string ini_data) - { - byte* native_ini_data; - int ini_data_byteCount = 0; - if (ini_data != null) - { - ini_data_byteCount = Encoding.UTF8.GetByteCount(ini_data); - if (ini_data_byteCount > Util.StackAllocationSizeLimit) - { - native_ini_data = Util.Allocate(ini_data_byteCount + 1); - } - else - { - byte* native_ini_data_stackBytes = stackalloc byte[ini_data_byteCount + 1]; - native_ini_data = native_ini_data_stackBytes; - } - int native_ini_data_offset = Util.GetUtf8(ini_data, 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); - if (ini_data_byteCount > Util.StackAllocationSizeLimit) - { - Util.Free(native_ini_data); - } - } - public static void LoadIniSettingsFromMemory(string ini_data, uint ini_size) - { - byte* native_ini_data; - int ini_data_byteCount = 0; - if (ini_data != null) - { - ini_data_byteCount = Encoding.UTF8.GetByteCount(ini_data); - if (ini_data_byteCount > Util.StackAllocationSizeLimit) + ini_data_byteCount = Encoding.UTF8.GetByteCount(ini_data); + if (ini_data_byteCount > Util.StackAllocationSizeLimit) { native_ini_data = Util.Allocate(ini_data_byteCount + 1); } @@ -8713,7 +9052,7 @@ public static bool MenuItem(string label) byte* native_shortcut = null; byte selected = 0; byte enabled = 1; - byte ret = ImGuiNative.igMenuItemBool(native_label, native_shortcut, selected, enabled); + byte ret = ImGuiNative.igMenuItem_Bool(native_label, native_shortcut, selected, enabled); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -8760,7 +9099,7 @@ public static bool MenuItem(string label, string shortcut) else { native_shortcut = null; } byte selected = 0; byte enabled = 1; - byte ret = ImGuiNative.igMenuItemBool(native_label, native_shortcut, selected, enabled); + byte ret = ImGuiNative.igMenuItem_Bool(native_label, native_shortcut, selected, enabled); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -8811,7 +9150,7 @@ public static bool MenuItem(string label, string shortcut, bool selected) 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); + byte ret = ImGuiNative.igMenuItem_Bool(native_label, native_shortcut, native_selected, enabled); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -8862,7 +9201,7 @@ public static bool MenuItem(string label, string shortcut, bool selected, bool e 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); + byte ret = ImGuiNative.igMenuItem_Bool(native_label, native_shortcut, native_selected, native_enabled); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -8914,7 +9253,7 @@ public static bool MenuItem(string label, string shortcut, ref bool p_selected) 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); + byte ret = ImGuiNative.igMenuItem_BoolPtr(native_label, native_shortcut, native_p_selected, enabled); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -8967,7 +9306,7 @@ public static bool MenuItem(string label, string shortcut, ref bool p_selected, 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); + byte ret = ImGuiNative.igMenuItem_BoolPtr(native_label, native_shortcut, native_p_selected, native_enabled); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -9011,20 +9350,55 @@ public static void OpenPopup(string str_id) native_str_id[native_str_id_offset] = 0; } else { native_str_id = null; } - ImGuiNative.igOpenPopup(native_str_id); + ImGuiPopupFlags popup_flags = (ImGuiPopupFlags)0; + ImGuiNative.igOpenPopup_Str(native_str_id, popup_flags); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_str_id); + } + } + public static void OpenPopup(string str_id, ImGuiPopupFlags popup_flags) + { + byte* native_str_id; + int str_id_byteCount = 0; + if (str_id != null) + { + str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + native_str_id = Util.Allocate(str_id_byteCount + 1); + } + else + { + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + } + int native_str_id_offset = Util.GetUtf8(str_id, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + else { native_str_id = null; } + ImGuiNative.igOpenPopup_Str(native_str_id, popup_flags); if (str_id_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_str_id); } } - public static bool OpenPopupOnItemClick() + public static void OpenPopup(uint id) + { + ImGuiPopupFlags popup_flags = (ImGuiPopupFlags)0; + ImGuiNative.igOpenPopup_ID(id, popup_flags); + } + public static void OpenPopup(uint id, ImGuiPopupFlags popup_flags) + { + ImGuiNative.igOpenPopup_ID(id, popup_flags); + } + public static void OpenPopupOnItemClick() { byte* native_str_id = null; - ImGuiMouseButton mouse_button = (ImGuiMouseButton)1; - byte ret = ImGuiNative.igOpenPopupOnItemClick(native_str_id, mouse_button); - return ret != 0; + ImGuiPopupFlags popup_flags = (ImGuiPopupFlags)1; + ImGuiNative.igOpenPopupOnItemClick(native_str_id, popup_flags); } - public static bool OpenPopupOnItemClick(string str_id) + public static void OpenPopupOnItemClick(string str_id) { byte* native_str_id; int str_id_byteCount = 0; @@ -9044,15 +9418,14 @@ public static bool OpenPopupOnItemClick(string str_id) native_str_id[native_str_id_offset] = 0; } else { native_str_id = null; } - ImGuiMouseButton mouse_button = (ImGuiMouseButton)1; - byte ret = ImGuiNative.igOpenPopupOnItemClick(native_str_id, mouse_button); + ImGuiPopupFlags popup_flags = (ImGuiPopupFlags)1; + ImGuiNative.igOpenPopupOnItemClick(native_str_id, popup_flags); if (str_id_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_str_id); } - return ret != 0; } - public static bool OpenPopupOnItemClick(string str_id, ImGuiMouseButton mouse_button) + public static void OpenPopupOnItemClick(string str_id, ImGuiPopupFlags popup_flags) { byte* native_str_id; int str_id_byteCount = 0; @@ -9072,12 +9445,11 @@ public static bool OpenPopupOnItemClick(string str_id, ImGuiMouseButton mouse_bu native_str_id[native_str_id_offset] = 0; } else { native_str_id = null; } - byte ret = ImGuiNative.igOpenPopupOnItemClick(native_str_id, mouse_button); + ImGuiNative.igOpenPopupOnItemClick(native_str_id, popup_flags); if (str_id_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_str_id); } - return ret != 0; } public static void PlotHistogram(string label, ref float values, int values_count) { @@ -9107,7 +9479,7 @@ public static void PlotHistogram(string label, ref float values, int values_coun 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); + ImGuiNative.igPlotHistogram_FloatPtr(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -9141,7 +9513,7 @@ public static void PlotHistogram(string label, ref float values, int values_coun 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); + ImGuiNative.igPlotHistogram_FloatPtr(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -9192,7 +9564,7 @@ public static void PlotHistogram(string label, ref float values, int values_coun 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); + ImGuiNative.igPlotHistogram_FloatPtr(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -9246,7 +9618,7 @@ public static void PlotHistogram(string label, ref float values, int values_coun 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); + ImGuiNative.igPlotHistogram_FloatPtr(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -9299,7 +9671,7 @@ public static void PlotHistogram(string label, ref float values, int values_coun 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); + ImGuiNative.igPlotHistogram_FloatPtr(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -9351,7 +9723,7 @@ public static void PlotHistogram(string label, ref float values, int values_coun 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); + ImGuiNative.igPlotHistogram_FloatPtr(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -9402,7 +9774,7 @@ public static void PlotHistogram(string label, ref float values, int values_coun 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); + ImGuiNative.igPlotHistogram_FloatPtr(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -9441,7 +9813,7 @@ public static void PlotLines(string label, ref float values, int values_count) 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); + ImGuiNative.igPlotLines_FloatPtr(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -9475,7 +9847,7 @@ public static void PlotLines(string label, ref float values, int values_count, i 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); + ImGuiNative.igPlotLines_FloatPtr(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -9526,7 +9898,7 @@ public static void PlotLines(string label, ref float values, int values_count, i 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); + ImGuiNative.igPlotLines_FloatPtr(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -9580,7 +9952,7 @@ public static void PlotLines(string label, ref float values, int values_count, i 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); + ImGuiNative.igPlotLines_FloatPtr(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -9633,7 +10005,7 @@ public static void PlotLines(string label, ref float values, int values_count, i 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); + ImGuiNative.igPlotLines_FloatPtr(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -9685,7 +10057,7 @@ public static void PlotLines(string label, ref float values, int values_count, i 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); + ImGuiNative.igPlotLines_FloatPtr(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -9736,7 +10108,7 @@ public static void PlotLines(string label, ref float values, int values_count, i else { native_overlay_text = null; } 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); + ImGuiNative.igPlotLines_FloatPtr(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -9795,7 +10167,7 @@ public static void PopTextWrapPos() } public static void ProgressBar(float fraction) { - Vector2 size_arg = new Vector2(-1, 0); + Vector2 size_arg = new Vector2(-float.MinValue, 0.0f); byte* native_overlay = null; ImGuiNative.igProgressBar(fraction, size_arg, native_overlay); } @@ -9870,7 +10242,7 @@ public static void PushID(string str_id) native_str_id[native_str_id_offset] = 0; } else { native_str_id = null; } - ImGuiNative.igPushIDStr(native_str_id); + ImGuiNative.igPushID_Str(native_str_id); if (str_id_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_str_id); @@ -9879,11 +10251,11 @@ public static void PushID(string str_id) public static void PushID(IntPtr ptr_id) { void* native_ptr_id = (void*)ptr_id.ToPointer(); - ImGuiNative.igPushIDPtr(native_ptr_id); + ImGuiNative.igPushID_Ptr(native_ptr_id); } public static void PushID(int int_id) { - ImGuiNative.igPushIDInt(int_id); + ImGuiNative.igPushID_Int(int_id); } public static void PushItemWidth(float item_width) { @@ -9891,19 +10263,19 @@ public static void PushItemWidth(float item_width) } public static void PushStyleColor(ImGuiCol idx, uint col) { - ImGuiNative.igPushStyleColorU32(idx, col); + ImGuiNative.igPushStyleColor_U32(idx, col); } public static void PushStyleColor(ImGuiCol idx, Vector4 col) { - ImGuiNative.igPushStyleColor(idx, col); + ImGuiNative.igPushStyleColor_Vec4(idx, col); } public static void PushStyleVar(ImGuiStyleVar idx, float val) { - ImGuiNative.igPushStyleVarFloat(idx, val); + ImGuiNative.igPushStyleVar_Float(idx, val); } public static void PushStyleVar(ImGuiStyleVar idx, Vector2 val) { - ImGuiNative.igPushStyleVarVec2(idx, val); + ImGuiNative.igPushStyleVar_Vec2(idx, val); } public static void PushTextWrapPos() { @@ -9935,7 +10307,7 @@ public static bool RadioButton(string label, bool active) } else { native_label = null; } byte native_active = active ? (byte)1 : (byte)0; - byte ret = ImGuiNative.igRadioButtonBool(native_label, native_active); + byte ret = ImGuiNative.igRadioButton_Bool(native_label, native_active); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -9964,7 +10336,7 @@ public static bool RadioButton(string label, ref int v, int v_button) else { native_label = null; } fixed (int* native_v = &v) { - byte ret = ImGuiNative.igRadioButtonIntPtr(native_label, native_v, v_button); + byte ret = ImGuiNative.igRadioButton_IntPtr(native_label, native_v, v_button); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -9976,6 +10348,24 @@ public static void Render() { ImGuiNative.igRender(); } + public static void RenderPlatformWindowsDefault() + { + void* platform_render_arg = null; + void* renderer_render_arg = null; + ImGuiNative.igRenderPlatformWindowsDefault(platform_render_arg, renderer_render_arg); + } + public static void RenderPlatformWindowsDefault(IntPtr platform_render_arg) + { + void* native_platform_render_arg = (void*)platform_render_arg.ToPointer(); + void* renderer_render_arg = null; + ImGuiNative.igRenderPlatformWindowsDefault(native_platform_render_arg, renderer_render_arg); + } + public static void RenderPlatformWindowsDefault(IntPtr platform_render_arg, IntPtr renderer_render_arg) + { + void* native_platform_render_arg = (void*)platform_render_arg.ToPointer(); + void* native_renderer_render_arg = (void*)renderer_render_arg.ToPointer(); + ImGuiNative.igRenderPlatformWindowsDefault(native_platform_render_arg, native_renderer_render_arg); + } public static void ResetMouseDragDelta() { ImGuiMouseButton button = (ImGuiMouseButton)0; @@ -10063,7 +10453,7 @@ public static bool Selectable(string label) byte selected = 0; ImGuiSelectableFlags flags = (ImGuiSelectableFlags)0; Vector2 size = new Vector2(); - byte ret = ImGuiNative.igSelectable(native_label, selected, flags, size); + byte ret = ImGuiNative.igSelectable_Bool(native_label, selected, flags, size); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -10093,7 +10483,7 @@ public static bool Selectable(string label, bool selected) byte native_selected = selected ? (byte)1 : (byte)0; ImGuiSelectableFlags flags = (ImGuiSelectableFlags)0; Vector2 size = new Vector2(); - byte ret = ImGuiNative.igSelectable(native_label, native_selected, flags, size); + byte ret = ImGuiNative.igSelectable_Bool(native_label, native_selected, flags, size); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -10122,7 +10512,7 @@ public static bool Selectable(string label, bool selected, ImGuiSelectableFlags 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); + byte ret = ImGuiNative.igSelectable_Bool(native_label, native_selected, flags, size); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -10150,7 +10540,7 @@ public static bool Selectable(string label, bool selected, ImGuiSelectableFlags } else { native_label = null; } byte native_selected = selected ? (byte)1 : (byte)0; - byte ret = ImGuiNative.igSelectable(native_label, native_selected, flags, size); + byte ret = ImGuiNative.igSelectable_Bool(native_label, native_selected, flags, size); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -10181,7 +10571,7 @@ public static bool Selectable(string label, ref bool p_selected) byte* native_p_selected = &native_p_selected_val; ImGuiSelectableFlags flags = (ImGuiSelectableFlags)0; Vector2 size = new Vector2(); - byte ret = ImGuiNative.igSelectableBoolPtr(native_label, native_p_selected, flags, size); + byte ret = ImGuiNative.igSelectable_BoolPtr(native_label, native_p_selected, flags, size); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -10212,7 +10602,7 @@ public static bool Selectable(string label, ref bool p_selected, ImGuiSelectable 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); + byte ret = ImGuiNative.igSelectable_BoolPtr(native_label, native_p_selected, flags, size); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -10242,7 +10632,7 @@ public static bool Selectable(string label, ref bool p_selected, ImGuiSelectable 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); + byte ret = ImGuiNative.igSelectable_BoolPtr(native_label, native_p_selected, flags, size); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -10254,6 +10644,16 @@ public static void Separator() { ImGuiNative.igSeparator(); } + public static void SetAllocatorFunctions(IntPtr alloc_func, IntPtr free_func) + { + void* user_data = null; + ImGuiNative.igSetAllocatorFunctions(alloc_func, free_func, user_data); + } + public static void SetAllocatorFunctions(IntPtr alloc_func, IntPtr free_func, IntPtr user_data) + { + void* native_user_data = (void*)user_data.ToPointer(); + ImGuiNative.igSetAllocatorFunctions(alloc_func, free_func, native_user_data); + } public static void SetClipboardText(string text) { byte* native_text; @@ -10409,6 +10809,11 @@ public static void SetNextWindowBgAlpha(float alpha) { ImGuiNative.igSetNextWindowBgAlpha(alpha); } + public static void SetNextWindowClass(ImGuiWindowClassPtr window_class) + { + ImGuiWindowClass* native_window_class = window_class.NativePtr; + ImGuiNative.igSetNextWindowClass(native_window_class); + } public static void SetNextWindowCollapsed(bool collapsed) { byte native_collapsed = collapsed ? (byte)1 : (byte)0; @@ -10424,6 +10829,15 @@ public static void SetNextWindowContentSize(Vector2 size) { ImGuiNative.igSetNextWindowContentSize(size); } + public static void SetNextWindowDockID(uint dock_id) + { + ImGuiCond cond = (ImGuiCond)0; + ImGuiNative.igSetNextWindowDockID(dock_id, cond); + } + public static void SetNextWindowDockID(uint dock_id, ImGuiCond cond) + { + ImGuiNative.igSetNextWindowDockID(dock_id, cond); + } public static void SetNextWindowFocus() { ImGuiNative.igSetNextWindowFocus(); @@ -10468,23 +10882,27 @@ public static void SetNextWindowSizeConstraints(Vector2 size_min, Vector2 size_m 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 SetNextWindowViewport(uint viewport_id) + { + ImGuiNative.igSetNextWindowViewport(viewport_id); + } public static void SetScrollFromPosX(float local_x) { float center_x_ratio = 0.5f; - ImGuiNative.igSetScrollFromPosX(local_x, center_x_ratio); + ImGuiNative.igSetScrollFromPosX_Float(local_x, center_x_ratio); } public static void SetScrollFromPosX(float local_x, float center_x_ratio) { - ImGuiNative.igSetScrollFromPosX(local_x, center_x_ratio); + ImGuiNative.igSetScrollFromPosX_Float(local_x, center_x_ratio); } public static void SetScrollFromPosY(float local_y) { float center_y_ratio = 0.5f; - ImGuiNative.igSetScrollFromPosY(local_y, center_y_ratio); + ImGuiNative.igSetScrollFromPosY_Float(local_y, center_y_ratio); } public static void SetScrollFromPosY(float local_y, float center_y_ratio) { - ImGuiNative.igSetScrollFromPosY(local_y, center_y_ratio); + ImGuiNative.igSetScrollFromPosY_Float(local_y, center_y_ratio); } public static void SetScrollHereX() { @@ -10506,11 +10924,11 @@ public static void SetScrollHereY(float center_y_ratio) } public static void SetScrollX(float scroll_x) { - ImGuiNative.igSetScrollX(scroll_x); + ImGuiNative.igSetScrollX_Float(scroll_x); } public static void SetScrollY(float scroll_y) { - ImGuiNative.igSetScrollY(scroll_y); + ImGuiNative.igSetScrollY_Float(scroll_y); } public static void SetStateStorage(ImGuiStoragePtr storage) { @@ -10573,12 +10991,12 @@ public static void SetWindowCollapsed(bool collapsed) { byte native_collapsed = collapsed ? (byte)1 : (byte)0; ImGuiCond cond = (ImGuiCond)0; - ImGuiNative.igSetWindowCollapsedBool(native_collapsed, cond); + ImGuiNative.igSetWindowCollapsed_Bool(native_collapsed, cond); } public static void SetWindowCollapsed(bool collapsed, ImGuiCond cond) { byte native_collapsed = collapsed ? (byte)1 : (byte)0; - ImGuiNative.igSetWindowCollapsedBool(native_collapsed, cond); + ImGuiNative.igSetWindowCollapsed_Bool(native_collapsed, cond); } public static void SetWindowCollapsed(string name, bool collapsed) { @@ -10602,7 +11020,7 @@ public static void SetWindowCollapsed(string name, bool collapsed) else { native_name = null; } byte native_collapsed = collapsed ? (byte)1 : (byte)0; ImGuiCond cond = (ImGuiCond)0; - ImGuiNative.igSetWindowCollapsedStr(native_name, native_collapsed, cond); + ImGuiNative.igSetWindowCollapsed_Str(native_name, native_collapsed, cond); if (name_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_name); @@ -10629,7 +11047,7 @@ public static void SetWindowCollapsed(string name, bool collapsed, ImGuiCond con } else { native_name = null; } byte native_collapsed = collapsed ? (byte)1 : (byte)0; - ImGuiNative.igSetWindowCollapsedStr(native_name, native_collapsed, cond); + ImGuiNative.igSetWindowCollapsed_Str(native_name, native_collapsed, cond); if (name_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_name); @@ -10637,7 +11055,7 @@ public static void SetWindowCollapsed(string name, bool collapsed, ImGuiCond con } public static void SetWindowFocus() { - ImGuiNative.igSetWindowFocus(); + ImGuiNative.igSetWindowFocus_Nil(); } public static void SetWindowFocus(string name) { @@ -10659,7 +11077,7 @@ public static void SetWindowFocus(string name) native_name[native_name_offset] = 0; } else { native_name = null; } - ImGuiNative.igSetWindowFocusStr(native_name); + ImGuiNative.igSetWindowFocus_Str(native_name); if (name_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_name); @@ -10672,11 +11090,11 @@ public static void SetWindowFontScale(float scale) public static void SetWindowPos(Vector2 pos) { ImGuiCond cond = (ImGuiCond)0; - ImGuiNative.igSetWindowPosVec2(pos, cond); + ImGuiNative.igSetWindowPos_Vec2(pos, cond); } public static void SetWindowPos(Vector2 pos, ImGuiCond cond) { - ImGuiNative.igSetWindowPosVec2(pos, cond); + ImGuiNative.igSetWindowPos_Vec2(pos, cond); } public static void SetWindowPos(string name, Vector2 pos) { @@ -10699,7 +11117,7 @@ public static void SetWindowPos(string name, Vector2 pos) } else { native_name = null; } ImGuiCond cond = (ImGuiCond)0; - ImGuiNative.igSetWindowPosStr(native_name, pos, cond); + ImGuiNative.igSetWindowPos_Str(native_name, pos, cond); if (name_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_name); @@ -10725,7 +11143,7 @@ public static void SetWindowPos(string name, Vector2 pos, ImGuiCond cond) native_name[native_name_offset] = 0; } else { native_name = null; } - ImGuiNative.igSetWindowPosStr(native_name, pos, cond); + ImGuiNative.igSetWindowPos_Str(native_name, pos, cond); if (name_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_name); @@ -10734,11 +11152,11 @@ public static void SetWindowPos(string name, Vector2 pos, ImGuiCond cond) public static void SetWindowSize(Vector2 size) { ImGuiCond cond = (ImGuiCond)0; - ImGuiNative.igSetWindowSizeVec2(size, cond); + ImGuiNative.igSetWindowSize_Vec2(size, cond); } public static void SetWindowSize(Vector2 size, ImGuiCond cond) { - ImGuiNative.igSetWindowSizeVec2(size, cond); + ImGuiNative.igSetWindowSize_Vec2(size, cond); } public static void SetWindowSize(string name, Vector2 size) { @@ -10761,7 +11179,7 @@ public static void SetWindowSize(string name, Vector2 size) } else { native_name = null; } ImGuiCond cond = (ImGuiCond)0; - ImGuiNative.igSetWindowSizeStr(native_name, size, cond); + ImGuiNative.igSetWindowSize_Str(native_name, size, cond); if (name_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_name); @@ -10787,7 +11205,7 @@ public static void SetWindowSize(string name, Vector2 size, ImGuiCond cond) native_name[native_name_offset] = 0; } else { native_name = null; } - ImGuiNative.igSetWindowSizeStr(native_name, size, cond); + ImGuiNative.igSetWindowSize_Str(native_name, size, cond); if (name_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_name); @@ -10855,6 +11273,18 @@ public static void ShowMetricsWindow(ref bool p_open) ImGuiNative.igShowMetricsWindow(native_p_open); p_open = native_p_open_val != 0; } + public static void ShowStackToolWindow() + { + byte* p_open = null; + ImGuiNative.igShowStackToolWindow(p_open); + } + public static void ShowStackToolWindow(ref bool p_open) + { + byte native_p_open_val = p_open ? (byte)1 : (byte)0; + byte* native_p_open = &native_p_open_val; + ImGuiNative.igShowStackToolWindow(native_p_open); + p_open = native_p_open_val != 0; + } public static void ShowStyleEditor() { ImGuiStyle* @ref = null; @@ -10932,9 +11362,10 @@ public static bool SliderAngle(string label, ref float v_rad) } int native_format_offset = Util.GetUtf8("%.0f deg", native_format, format_byteCount); native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; fixed (float* native_v_rad = &v_rad) { - byte ret = ImGuiNative.igSliderAngle(native_label, native_v_rad, v_degrees_min, v_degrees_max, native_format); + byte ret = ImGuiNative.igSliderAngle(native_label, native_v_rad, v_degrees_min, v_degrees_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -10981,9 +11412,10 @@ public static bool SliderAngle(string label, ref float v_rad, float v_degrees_mi } int native_format_offset = Util.GetUtf8("%.0f deg", native_format, format_byteCount); native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; fixed (float* native_v_rad = &v_rad) { - byte ret = ImGuiNative.igSliderAngle(native_label, native_v_rad, v_degrees_min, v_degrees_max, native_format); + byte ret = ImGuiNative.igSliderAngle(native_label, native_v_rad, v_degrees_min, v_degrees_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -11029,9 +11461,10 @@ public static bool SliderAngle(string label, ref float v_rad, float v_degrees_mi } int native_format_offset = Util.GetUtf8("%.0f deg", native_format, format_byteCount); native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; fixed (float* native_v_rad = &v_rad) { - byte ret = ImGuiNative.igSliderAngle(native_label, native_v_rad, v_degrees_min, v_degrees_max, native_format); + byte ret = ImGuiNative.igSliderAngle(native_label, native_v_rad, v_degrees_min, v_degrees_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -11044,6 +11477,59 @@ public static bool SliderAngle(string label, ref float v_rad, float v_degrees_mi } } public static bool SliderAngle(string label, ref float v_rad, float v_degrees_min, float v_degrees_max, string format) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (float* native_v_rad = &v_rad) + { + byte ret = ImGuiNative.igSliderAngle(native_label, native_v_rad, v_degrees_min, v_degrees_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool SliderAngle(string label, ref float v_rad, float v_degrees_min, float v_degrees_max, string format, ImGuiSliderFlags flags) { byte* native_label; int label_byteCount = 0; @@ -11083,7 +11569,7 @@ public static bool SliderAngle(string label, ref float v_rad, float v_degrees_mi else { native_format = null; } fixed (float* native_v_rad = &v_rad) { - byte ret = ImGuiNative.igSliderAngle(native_label, native_v_rad, v_degrees_min, v_degrees_max, native_format); + byte ret = ImGuiNative.igSliderAngle(native_label, native_v_rad, v_degrees_min, v_degrees_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -11129,10 +11615,10 @@ public static bool SliderFloat(string label, ref float v, float v_min, float v_m } int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); native_format[native_format_offset] = 0; - float power = 1.0f; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; fixed (float* native_v = &v) { - byte ret = ImGuiNative.igSliderFloat(native_label, native_v, v_min, v_max, native_format, power); + byte ret = ImGuiNative.igSliderFloat(native_label, native_v, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -11182,10 +11668,472 @@ public static bool SliderFloat(string label, ref float v, float v_min, float v_m native_format[native_format_offset] = 0; } else { native_format = null; } - float power = 1.0f; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; fixed (float* native_v = &v) { - byte ret = ImGuiNative.igSliderFloat(native_label, native_v, v_min, v_max, native_format, power); + byte ret = ImGuiNative.igSliderFloat(native_label, native_v, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool SliderFloat(string label, ref float v, float v_min, float v_max, string format, ImGuiSliderFlags flags) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + fixed (float* native_v = &v) + { + byte ret = ImGuiNative.igSliderFloat(native_label, native_v, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool SliderFloat2(string label, ref Vector2 v, float v_min, float v_max) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); + native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (Vector2* native_v = &v) + { + byte ret = ImGuiNative.igSliderFloat2(native_label, native_v, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool SliderFloat2(string label, ref Vector2 v, float v_min, float v_max, string format) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (Vector2* native_v = &v) + { + byte ret = ImGuiNative.igSliderFloat2(native_label, native_v, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool SliderFloat2(string label, ref Vector2 v, float v_min, float v_max, string format, ImGuiSliderFlags flags) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, 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, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool SliderFloat3(string label, ref Vector3 v, float v_min, float v_max) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); + native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (Vector3* native_v = &v) + { + byte ret = ImGuiNative.igSliderFloat3(native_label, native_v, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool SliderFloat3(string label, ref Vector3 v, float v_min, float v_max, string format) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (Vector3* native_v = &v) + { + byte ret = ImGuiNative.igSliderFloat3(native_label, native_v, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool SliderFloat3(string label, ref Vector3 v, float v_min, float v_max, string format, ImGuiSliderFlags flags) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + fixed (Vector3* native_v = &v) + { + byte ret = ImGuiNative.igSliderFloat3(native_label, native_v, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool SliderFloat4(string label, ref Vector4 v, float v_min, float v_max) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); + native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (Vector4* native_v = &v) + { + byte ret = ImGuiNative.igSliderFloat4(native_label, native_v, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool SliderFloat4(string label, ref Vector4 v, float v_min, float v_max, string format) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (Vector4* native_v = &v) + { + byte ret = ImGuiNative.igSliderFloat4(native_label, native_v, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -11197,7 +12145,7 @@ public static bool SliderFloat(string label, ref float v, float v_min, float v_m 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 SliderFloat4(string label, ref Vector4 v, float v_min, float v_max, string format, ImGuiSliderFlags flags) { byte* native_label; int label_byteCount = 0; @@ -11235,9 +12183,9 @@ public static bool SliderFloat(string label, ref float v, float v_min, float v_m native_format[native_format_offset] = 0; } else { native_format = null; } - fixed (float* native_v = &v) + fixed (Vector4* native_v = &v) { - byte ret = ImGuiNative.igSliderFloat(native_label, native_v, v_min, v_max, native_format, power); + byte ret = ImGuiNative.igSliderFloat4(native_label, native_v, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -11249,7 +12197,7 @@ public static bool SliderFloat(string label, ref float v, float v_min, float v_m return ret != 0; } } - public static bool SliderFloat2(string label, ref Vector2 v, float v_min, float v_max) + public static bool SliderInt(string label, ref int v, int v_min, int v_max) { byte* native_label; int label_byteCount = 0; @@ -11271,7 +12219,7 @@ public static bool SliderFloat2(string label, ref Vector2 v, float v_min, float else { native_label = null; } byte* native_format; int format_byteCount = 0; - format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + format_byteCount = Encoding.UTF8.GetByteCount("%d"); if (format_byteCount > Util.StackAllocationSizeLimit) { native_format = Util.Allocate(format_byteCount + 1); @@ -11281,12 +12229,12 @@ public static bool SliderFloat2(string label, ref Vector2 v, float v_min, float byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; native_format = native_format_stackBytes; } - int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); + int native_format_offset = Util.GetUtf8("%d", native_format, format_byteCount); native_format[native_format_offset] = 0; - float power = 1.0f; - fixed (Vector2* native_v = &v) + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (int* native_v = &v) { - byte ret = ImGuiNative.igSliderFloat2(native_label, native_v, v_min, v_max, native_format, power); + byte ret = ImGuiNative.igSliderInt(native_label, native_v, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -11298,7 +12246,7 @@ public static bool SliderFloat2(string label, ref Vector2 v, float v_min, float return ret != 0; } } - public static bool SliderFloat2(string label, ref Vector2 v, float v_min, float v_max, string format) + public static bool SliderInt(string label, ref int v, int v_min, int v_max, string format) { byte* native_label; int label_byteCount = 0; @@ -11336,10 +12284,10 @@ public static bool SliderFloat2(string label, ref Vector2 v, float v_min, float native_format[native_format_offset] = 0; } else { native_format = null; } - float power = 1.0f; - fixed (Vector2* native_v = &v) + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (int* native_v = &v) { - byte ret = ImGuiNative.igSliderFloat2(native_label, native_v, v_min, v_max, native_format, power); + byte ret = ImGuiNative.igSliderInt(native_label, native_v, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -11351,7 +12299,7 @@ public static bool SliderFloat2(string label, ref Vector2 v, float v_min, float 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 SliderInt(string label, ref int v, int v_min, int v_max, string format, ImGuiSliderFlags flags) { byte* native_label; int label_byteCount = 0; @@ -11389,9 +12337,9 @@ public static bool SliderFloat2(string label, ref Vector2 v, float v_min, float native_format[native_format_offset] = 0; } else { native_format = null; } - fixed (Vector2* native_v = &v) + fixed (int* native_v = &v) { - byte ret = ImGuiNative.igSliderFloat2(native_label, native_v, v_min, v_max, native_format, power); + byte ret = ImGuiNative.igSliderInt(native_label, native_v, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -11403,7 +12351,7 @@ public static bool SliderFloat2(string label, ref Vector2 v, float v_min, float return ret != 0; } } - public static bool SliderFloat3(string label, ref Vector3 v, float v_min, float v_max) + public static bool SliderInt2(string label, ref int v, int v_min, int v_max) { byte* native_label; int label_byteCount = 0; @@ -11425,7 +12373,7 @@ public static bool SliderFloat3(string label, ref Vector3 v, float v_min, float else { native_label = null; } byte* native_format; int format_byteCount = 0; - format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + format_byteCount = Encoding.UTF8.GetByteCount("%d"); if (format_byteCount > Util.StackAllocationSizeLimit) { native_format = Util.Allocate(format_byteCount + 1); @@ -11435,12 +12383,12 @@ public static bool SliderFloat3(string label, ref Vector3 v, float v_min, float byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; native_format = native_format_stackBytes; } - int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); + int native_format_offset = Util.GetUtf8("%d", native_format, format_byteCount); native_format[native_format_offset] = 0; - float power = 1.0f; - fixed (Vector3* native_v = &v) + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (int* native_v = &v) { - byte ret = ImGuiNative.igSliderFloat3(native_label, native_v, v_min, v_max, native_format, power); + byte ret = ImGuiNative.igSliderInt2(native_label, native_v, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -11452,7 +12400,7 @@ public static bool SliderFloat3(string label, ref Vector3 v, float v_min, float return ret != 0; } } - public static bool SliderFloat3(string label, ref Vector3 v, float v_min, float v_max, string format) + public static bool SliderInt2(string label, ref int v, int v_min, int v_max, string format) { byte* native_label; int label_byteCount = 0; @@ -11490,10 +12438,10 @@ public static bool SliderFloat3(string label, ref Vector3 v, float v_min, float native_format[native_format_offset] = 0; } else { native_format = null; } - float power = 1.0f; - fixed (Vector3* native_v = &v) + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (int* native_v = &v) { - byte ret = ImGuiNative.igSliderFloat3(native_label, native_v, v_min, v_max, native_format, power); + byte ret = ImGuiNative.igSliderInt2(native_label, native_v, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -11505,7 +12453,7 @@ public static bool SliderFloat3(string label, ref Vector3 v, float v_min, float 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 SliderInt2(string label, ref int v, int v_min, int v_max, string format, ImGuiSliderFlags flags) { byte* native_label; int label_byteCount = 0; @@ -11543,9 +12491,9 @@ public static bool SliderFloat3(string label, ref Vector3 v, float v_min, float native_format[native_format_offset] = 0; } else { native_format = null; } - fixed (Vector3* native_v = &v) + fixed (int* native_v = &v) { - byte ret = ImGuiNative.igSliderFloat3(native_label, native_v, v_min, v_max, native_format, power); + byte ret = ImGuiNative.igSliderInt2(native_label, native_v, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -11557,7 +12505,7 @@ public static bool SliderFloat3(string label, ref Vector3 v, float v_min, float return ret != 0; } } - public static bool SliderFloat4(string label, ref Vector4 v, float v_min, float v_max) + public static bool SliderInt3(string label, ref int v, int v_min, int v_max) { byte* native_label; int label_byteCount = 0; @@ -11579,7 +12527,7 @@ public static bool SliderFloat4(string label, ref Vector4 v, float v_min, float else { native_label = null; } byte* native_format; int format_byteCount = 0; - format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + format_byteCount = Encoding.UTF8.GetByteCount("%d"); if (format_byteCount > Util.StackAllocationSizeLimit) { native_format = Util.Allocate(format_byteCount + 1); @@ -11589,12 +12537,12 @@ public static bool SliderFloat4(string label, ref Vector4 v, float v_min, float byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; native_format = native_format_stackBytes; } - int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); + int native_format_offset = Util.GetUtf8("%d", native_format, format_byteCount); native_format[native_format_offset] = 0; - float power = 1.0f; - fixed (Vector4* native_v = &v) + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (int* native_v = &v) { - byte ret = ImGuiNative.igSliderFloat4(native_label, native_v, v_min, v_max, native_format, power); + byte ret = ImGuiNative.igSliderInt3(native_label, native_v, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -11606,7 +12554,7 @@ public static bool SliderFloat4(string label, ref Vector4 v, float v_min, float return ret != 0; } } - public static bool SliderFloat4(string label, ref Vector4 v, float v_min, float v_max, string format) + public static bool SliderInt3(string label, ref int v, int v_min, int v_max, string format) { byte* native_label; int label_byteCount = 0; @@ -11644,10 +12592,10 @@ public static bool SliderFloat4(string label, ref Vector4 v, float v_min, float native_format[native_format_offset] = 0; } else { native_format = null; } - float power = 1.0f; - fixed (Vector4* native_v = &v) + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (int* native_v = &v) { - byte ret = ImGuiNative.igSliderFloat4(native_label, native_v, v_min, v_max, native_format, power); + byte ret = ImGuiNative.igSliderInt3(native_label, native_v, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -11659,7 +12607,7 @@ public static bool SliderFloat4(string label, ref Vector4 v, float v_min, float 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 SliderInt3(string label, ref int v, int v_min, int v_max, string format, ImGuiSliderFlags flags) { byte* native_label; int label_byteCount = 0; @@ -11697,9 +12645,9 @@ public static bool SliderFloat4(string label, ref Vector4 v, float v_min, float native_format[native_format_offset] = 0; } 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.igSliderInt3(native_label, native_v, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -11711,7 +12659,7 @@ public static bool SliderFloat4(string label, ref Vector4 v, float v_min, float return ret != 0; } } - public static bool SliderInt(string label, ref int v, int v_min, int v_max) + public static bool SliderInt4(string label, ref int v, int v_min, int v_max) { byte* native_label; int label_byteCount = 0; @@ -11745,9 +12693,10 @@ public static bool SliderInt(string label, ref int v, int v_min, int v_max) } int native_format_offset = Util.GetUtf8("%d", native_format, format_byteCount); native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; fixed (int* native_v = &v) { - byte ret = ImGuiNative.igSliderInt(native_label, native_v, v_min, v_max, native_format); + byte ret = ImGuiNative.igSliderInt4(native_label, native_v, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -11759,7 +12708,7 @@ public static bool SliderInt(string label, ref int v, int v_min, int v_max) return ret != 0; } } - public static bool SliderInt(string label, ref int v, int v_min, int v_max, string format) + public static bool SliderInt4(string label, ref int v, int v_min, int v_max, string format) { byte* native_label; int label_byteCount = 0; @@ -11797,9 +12746,10 @@ public static bool SliderInt(string label, ref int v, int v_min, int v_max, stri native_format[native_format_offset] = 0; } else { native_format = null; } + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; fixed (int* native_v = &v) { - byte ret = ImGuiNative.igSliderInt(native_label, native_v, v_min, v_max, native_format); + byte ret = ImGuiNative.igSliderInt4(native_label, native_v, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -11811,7 +12761,7 @@ public static bool SliderInt(string label, ref int v, int v_min, int v_max, stri return ret != 0; } } - public static bool SliderInt2(string label, ref int v, int v_min, int v_max) + public static bool SliderInt4(string label, ref int v, int v_min, int v_max, string format, ImGuiSliderFlags flags) { byte* native_label; int label_byteCount = 0; @@ -11833,7 +12783,9 @@ public static bool SliderInt2(string label, ref int v, int v_min, int v_max) else { native_label = null; } byte* native_format; int format_byteCount = 0; - format_byteCount = Encoding.UTF8.GetByteCount("%d"); + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); if (format_byteCount > Util.StackAllocationSizeLimit) { native_format = Util.Allocate(format_byteCount + 1); @@ -11843,11 +12795,13 @@ public static bool SliderInt2(string label, ref int v, int v_min, int v_max) byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; native_format = native_format_stackBytes; } - int native_format_offset = Util.GetUtf8("%d", native_format, format_byteCount); + int native_format_offset = Util.GetUtf8(format, 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); + byte ret = ImGuiNative.igSliderInt4(native_label, native_v, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -11859,7 +12813,7 @@ public static bool SliderInt2(string label, ref int v, int v_min, int v_max) return ret != 0; } } - public static bool SliderInt2(string label, ref int v, int v_min, int v_max, string format) + public static bool SliderScalar(string label, ImGuiDataType data_type, IntPtr p_data, IntPtr p_min, IntPtr p_max) { byte* native_label; int label_byteCount = 0; @@ -11879,39 +12833,19 @@ public static bool SliderInt2(string label, ref int v, int v_min, int v_max, str native_label[native_label_offset] = 0; } else { native_label = null; } - byte* native_format; - int format_byteCount = 0; - if (format != null) - { - format_byteCount = Encoding.UTF8.GetByteCount(format); - if (format_byteCount > Util.StackAllocationSizeLimit) - { - native_format = Util.Allocate(format_byteCount + 1); - } - else - { - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - } - int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); - native_format[native_format_offset] = 0; - } - else { native_format = null; } - fixed (int* native_v = &v) + void* native_p_data = (void*)p_data.ToPointer(); + void* native_p_min = (void*)p_min.ToPointer(); + void* native_p_max = (void*)p_max.ToPointer(); + byte* native_format = null; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + byte ret = ImGuiNative.igSliderScalar(native_label, data_type, native_p_data, native_p_min, native_p_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) { - byte ret = ImGuiNative.igSliderInt2(native_label, native_v, v_min, v_max, native_format); - if (label_byteCount > Util.StackAllocationSizeLimit) - { - Util.Free(native_label); - } - if (format_byteCount > Util.StackAllocationSizeLimit) - { - Util.Free(native_format); - } - return ret != 0; + Util.Free(native_label); } + return ret != 0; } - public static bool SliderInt3(string label, ref int v, int v_min, int v_max) + public static bool SliderScalar(string label, ImGuiDataType data_type, IntPtr p_data, IntPtr p_min, IntPtr p_max, string format) { byte* native_label; int label_byteCount = 0; @@ -11931,9 +12865,14 @@ public static bool SliderInt3(string label, ref int v, int v_min, int v_max) native_label[native_label_offset] = 0; } else { native_label = null; } + void* native_p_data = (void*)p_data.ToPointer(); + void* native_p_min = (void*)p_min.ToPointer(); + void* native_p_max = (void*)p_max.ToPointer(); byte* native_format; int format_byteCount = 0; - format_byteCount = Encoding.UTF8.GetByteCount("%d"); + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); if (format_byteCount > Util.StackAllocationSizeLimit) { native_format = Util.Allocate(format_byteCount + 1); @@ -11943,23 +12882,23 @@ public static bool SliderInt3(string label, ref int v, int v_min, int v_max) byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; native_format = native_format_stackBytes; } - int native_format_offset = Util.GetUtf8("%d", native_format, format_byteCount); + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); native_format[native_format_offset] = 0; - fixed (int* native_v = &v) + } + else { native_format = null; } + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + byte ret = ImGuiNative.igSliderScalar(native_label, data_type, native_p_data, native_p_min, native_p_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) { - byte ret = ImGuiNative.igSliderInt3(native_label, native_v, v_min, v_max, native_format); - if (label_byteCount > Util.StackAllocationSizeLimit) - { - Util.Free(native_label); - } - if (format_byteCount > Util.StackAllocationSizeLimit) - { - Util.Free(native_format); - } - return ret != 0; + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); } + return ret != 0; } - public static bool SliderInt3(string label, ref int v, int v_min, int v_max, string format) + public static bool SliderScalar(string label, ImGuiDataType data_type, IntPtr p_data, IntPtr p_min, IntPtr p_max, string format, ImGuiSliderFlags flags) { byte* native_label; int label_byteCount = 0; @@ -11979,6 +12918,9 @@ public static bool SliderInt3(string label, ref int v, int v_min, int v_max, str native_label[native_label_offset] = 0; } else { native_label = null; } + void* native_p_data = (void*)p_data.ToPointer(); + void* native_p_min = (void*)p_min.ToPointer(); + void* native_p_max = (void*)p_max.ToPointer(); byte* native_format; int format_byteCount = 0; if (format != null) @@ -11997,21 +12939,50 @@ public static bool SliderInt3(string label, ref int v, int v_min, int v_max, str native_format[native_format_offset] = 0; } else { native_format = null; } - fixed (int* native_v = &v) + byte ret = ImGuiNative.igSliderScalar(native_label, data_type, native_p_data, native_p_min, native_p_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + public static bool SliderScalarN(string label, ImGuiDataType data_type, IntPtr p_data, int components, IntPtr p_min, IntPtr p_max) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) { - byte ret = ImGuiNative.igSliderInt3(native_label, native_v, v_min, v_max, native_format); + label_byteCount = Encoding.UTF8.GetByteCount(label); if (label_byteCount > Util.StackAllocationSizeLimit) { - Util.Free(native_label); + native_label = Util.Allocate(label_byteCount + 1); } - if (format_byteCount > Util.StackAllocationSizeLimit) + else { - Util.Free(native_format); + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; } - return ret != 0; + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + void* native_p_data = (void*)p_data.ToPointer(); + void* native_p_min = (void*)p_min.ToPointer(); + void* native_p_max = (void*)p_max.ToPointer(); + byte* native_format = null; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + byte ret = ImGuiNative.igSliderScalarN(native_label, data_type, native_p_data, components, native_p_min, native_p_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); } + return ret != 0; } - public static bool SliderInt4(string label, ref int v, int v_min, int v_max) + public static bool SliderScalarN(string label, ImGuiDataType data_type, IntPtr p_data, int components, IntPtr p_min, IntPtr p_max, string format) { byte* native_label; int label_byteCount = 0; @@ -12031,9 +13002,14 @@ public static bool SliderInt4(string label, ref int v, int v_min, int v_max) native_label[native_label_offset] = 0; } else { native_label = null; } + void* native_p_data = (void*)p_data.ToPointer(); + void* native_p_min = (void*)p_min.ToPointer(); + void* native_p_max = (void*)p_max.ToPointer(); byte* native_format; int format_byteCount = 0; - format_byteCount = Encoding.UTF8.GetByteCount("%d"); + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); if (format_byteCount > Util.StackAllocationSizeLimit) { native_format = Util.Allocate(format_byteCount + 1); @@ -12043,23 +13019,23 @@ public static bool SliderInt4(string label, ref int v, int v_min, int v_max) byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; native_format = native_format_stackBytes; } - int native_format_offset = Util.GetUtf8("%d", native_format, format_byteCount); + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); native_format[native_format_offset] = 0; - fixed (int* native_v = &v) + } + else { native_format = null; } + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + byte ret = ImGuiNative.igSliderScalarN(native_label, data_type, native_p_data, components, native_p_min, native_p_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) { - byte ret = ImGuiNative.igSliderInt4(native_label, native_v, v_min, v_max, native_format); - if (label_byteCount > Util.StackAllocationSizeLimit) - { - Util.Free(native_label); - } - if (format_byteCount > Util.StackAllocationSizeLimit) - { - Util.Free(native_format); - } - return ret != 0; + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); } + return ret != 0; } - public static bool SliderInt4(string label, ref int v, int v_min, int v_max, string format) + public static bool SliderScalarN(string label, ImGuiDataType data_type, IntPtr p_data, int components, IntPtr p_min, IntPtr p_max, string format, ImGuiSliderFlags flags) { byte* native_label; int label_byteCount = 0; @@ -12079,6 +13055,9 @@ public static bool SliderInt4(string label, ref int v, int v_min, int v_max, str native_label[native_label_offset] = 0; } else { native_label = null; } + void* native_p_data = (void*)p_data.ToPointer(); + void* native_p_min = (void*)p_min.ToPointer(); + void* native_p_max = (void*)p_max.ToPointer(); byte* native_format; int format_byteCount = 0; if (format != null) @@ -12097,21 +13076,79 @@ public static bool SliderInt4(string label, ref int v, int v_min, int v_max, str native_format[native_format_offset] = 0; } else { native_format = null; } - fixed (int* native_v = &v) + byte ret = ImGuiNative.igSliderScalarN(native_label, data_type, native_p_data, components, native_p_min, native_p_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + public static bool SmallButton(string label) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) { - byte ret = ImGuiNative.igSliderInt4(native_label, native_v, v_min, v_max, native_format); + label_byteCount = Encoding.UTF8.GetByteCount(label); if (label_byteCount > Util.StackAllocationSizeLimit) { - Util.Free(native_label); + native_label = Util.Allocate(label_byteCount + 1); } - if (format_byteCount > Util.StackAllocationSizeLimit) + else { - Util.Free(native_format); + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; } - return ret != 0; + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte ret = ImGuiNative.igSmallButton(native_label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); } + return ret != 0; + } + public static void Spacing() + { + ImGuiNative.igSpacing(); + } + 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 StyleColorsDark() + { + ImGuiStyle* dst = null; + ImGuiNative.igStyleColorsDark(dst); + } + public static void StyleColorsDark(ImGuiStylePtr dst) + { + ImGuiStyle* native_dst = dst.NativePtr; + ImGuiNative.igStyleColorsDark(native_dst); } - public static bool SliderScalar(string label, ImGuiDataType data_type, IntPtr p_data, IntPtr p_min, IntPtr p_max) + 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 TabItemButton(string label) { byte* native_label; int label_byteCount = 0; @@ -12131,19 +13168,15 @@ public static bool SliderScalar(string label, ImGuiDataType data_type, IntPtr p_ native_label[native_label_offset] = 0; } else { native_label = null; } - void* native_p_data = (void*)p_data.ToPointer(); - void* native_p_min = (void*)p_min.ToPointer(); - void* native_p_max = (void*)p_max.ToPointer(); - byte* native_format = null; - float power = 1.0f; - byte ret = ImGuiNative.igSliderScalar(native_label, data_type, native_p_data, native_p_min, native_p_max, native_format, power); + ImGuiTabItemFlags flags = (ImGuiTabItemFlags)0; + byte ret = ImGuiNative.igTabItemButton(native_label, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); } return ret != 0; } - public static bool SliderScalar(string label, ImGuiDataType data_type, IntPtr p_data, IntPtr p_min, IntPtr p_max, string format) + public static bool TabItemButton(string label, ImGuiTabItemFlags flags) { byte* native_label; int label_byteCount = 0; @@ -12163,40 +13196,56 @@ public static bool SliderScalar(string label, ImGuiDataType data_type, IntPtr p_ native_label[native_label_offset] = 0; } else { native_label = null; } - void* native_p_data = (void*)p_data.ToPointer(); - void* native_p_min = (void*)p_min.ToPointer(); - void* native_p_max = (void*)p_max.ToPointer(); - byte* native_format; - int format_byteCount = 0; - if (format != null) - { - format_byteCount = Encoding.UTF8.GetByteCount(format); - if (format_byteCount > Util.StackAllocationSizeLimit) - { - native_format = Util.Allocate(format_byteCount + 1); - } - else - { - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - } - int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); - native_format[native_format_offset] = 0; - } - else { native_format = null; } - float power = 1.0f; - byte ret = ImGuiNative.igSliderScalar(native_label, data_type, native_p_data, native_p_min, native_p_max, native_format, power); + byte ret = ImGuiNative.igTabItemButton(native_label, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); } - if (format_byteCount > Util.StackAllocationSizeLimit) - { - Util.Free(native_format); - } return ret != 0; } - public static bool SliderScalar(string label, ImGuiDataType data_type, IntPtr p_data, IntPtr p_min, IntPtr p_max, string format, float power) + public static int TableGetColumnCount() + { + int ret = ImGuiNative.igTableGetColumnCount(); + return ret; + } + public static ImGuiTableColumnFlags TableGetColumnFlags() + { + int column_n = -1; + ImGuiTableColumnFlags ret = ImGuiNative.igTableGetColumnFlags(column_n); + return ret; + } + public static ImGuiTableColumnFlags TableGetColumnFlags(int column_n) + { + ImGuiTableColumnFlags ret = ImGuiNative.igTableGetColumnFlags(column_n); + return ret; + } + public static int TableGetColumnIndex() + { + int ret = ImGuiNative.igTableGetColumnIndex(); + return ret; + } + public static string TableGetColumnName() + { + int column_n = -1; + byte* ret = ImGuiNative.igTableGetColumnName_Int(column_n); + return Util.StringFromPtr(ret); + } + public static string TableGetColumnName(int column_n) + { + byte* ret = ImGuiNative.igTableGetColumnName_Int(column_n); + return Util.StringFromPtr(ret); + } + public static int TableGetRowIndex() + { + int ret = ImGuiNative.igTableGetRowIndex(); + return ret; + } + public static ImGuiTableSortSpecsPtr TableGetSortSpecs() + { + ImGuiTableSortSpecs* ret = ImGuiNative.igTableGetSortSpecs(); + return new ImGuiTableSortSpecsPtr(ret); + } + public static void TableHeader(string label) { byte* native_label; int label_byteCount = 0; @@ -12216,39 +13265,56 @@ public static bool SliderScalar(string label, ImGuiDataType data_type, IntPtr p_ native_label[native_label_offset] = 0; } else { native_label = null; } - void* native_p_data = (void*)p_data.ToPointer(); - void* native_p_min = (void*)p_min.ToPointer(); - void* native_p_max = (void*)p_max.ToPointer(); - byte* native_format; - int format_byteCount = 0; - if (format != null) - { - format_byteCount = Encoding.UTF8.GetByteCount(format); - if (format_byteCount > Util.StackAllocationSizeLimit) - { - native_format = Util.Allocate(format_byteCount + 1); - } - else - { - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - } - int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); - native_format[native_format_offset] = 0; - } - else { native_format = null; } - byte ret = ImGuiNative.igSliderScalar(native_label, data_type, native_p_data, native_p_min, native_p_max, native_format, power); + ImGuiNative.igTableHeader(native_label); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); } - if (format_byteCount > Util.StackAllocationSizeLimit) - { - Util.Free(native_format); - } + } + public static void TableHeadersRow() + { + ImGuiNative.igTableHeadersRow(); + } + public static bool TableNextColumn() + { + byte ret = ImGuiNative.igTableNextColumn(); return ret != 0; } - public static bool SliderScalarN(string label, ImGuiDataType data_type, IntPtr p_data, int components, IntPtr p_min, IntPtr p_max) + public static void TableNextRow() + { + ImGuiTableRowFlags row_flags = (ImGuiTableRowFlags)0; + float min_row_height = 0.0f; + ImGuiNative.igTableNextRow(row_flags, min_row_height); + } + public static void TableNextRow(ImGuiTableRowFlags row_flags) + { + float min_row_height = 0.0f; + ImGuiNative.igTableNextRow(row_flags, min_row_height); + } + public static void TableNextRow(ImGuiTableRowFlags row_flags, float min_row_height) + { + ImGuiNative.igTableNextRow(row_flags, min_row_height); + } + public static void TableSetBgColor(ImGuiTableBgTarget target, uint color) + { + int column_n = -1; + ImGuiNative.igTableSetBgColor(target, color, column_n); + } + public static void TableSetBgColor(ImGuiTableBgTarget target, uint color, int column_n) + { + ImGuiNative.igTableSetBgColor(target, color, column_n); + } + public static void TableSetColumnEnabled(int column_n, bool v) + { + byte native_v = v ? (byte)1 : (byte)0; + ImGuiNative.igTableSetColumnEnabled(column_n, native_v); + } + public static bool TableSetColumnIndex(int column_n) + { + byte ret = ImGuiNative.igTableSetColumnIndex(column_n); + return ret != 0; + } + public static void TableSetupColumn(string label) { byte* native_label; int label_byteCount = 0; @@ -12268,19 +13334,16 @@ public static bool SliderScalarN(string label, ImGuiDataType data_type, IntPtr p native_label[native_label_offset] = 0; } else { native_label = null; } - void* native_p_data = (void*)p_data.ToPointer(); - void* native_p_min = (void*)p_min.ToPointer(); - void* native_p_max = (void*)p_max.ToPointer(); - byte* native_format = null; - float power = 1.0f; - byte ret = ImGuiNative.igSliderScalarN(native_label, data_type, native_p_data, components, native_p_min, native_p_max, native_format, power); + ImGuiTableColumnFlags flags = (ImGuiTableColumnFlags)0; + float init_width_or_weight = 0.0f; + uint user_id = 0; + ImGuiNative.igTableSetupColumn(native_label, flags, init_width_or_weight, user_id); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); } - return ret != 0; } - public static bool SliderScalarN(string label, ImGuiDataType data_type, IntPtr p_data, int components, IntPtr p_min, IntPtr p_max, string format) + public static void TableSetupColumn(string label, ImGuiTableColumnFlags flags) { byte* native_label; int label_byteCount = 0; @@ -12300,40 +13363,15 @@ public static bool SliderScalarN(string label, ImGuiDataType data_type, IntPtr p native_label[native_label_offset] = 0; } else { native_label = null; } - void* native_p_data = (void*)p_data.ToPointer(); - void* native_p_min = (void*)p_min.ToPointer(); - void* native_p_max = (void*)p_max.ToPointer(); - byte* native_format; - int format_byteCount = 0; - if (format != null) - { - format_byteCount = Encoding.UTF8.GetByteCount(format); - if (format_byteCount > Util.StackAllocationSizeLimit) - { - native_format = Util.Allocate(format_byteCount + 1); - } - else - { - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - } - int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); - native_format[native_format_offset] = 0; - } - else { native_format = null; } - float power = 1.0f; - byte ret = ImGuiNative.igSliderScalarN(native_label, data_type, native_p_data, components, native_p_min, native_p_max, native_format, power); + float init_width_or_weight = 0.0f; + uint user_id = 0; + ImGuiNative.igTableSetupColumn(native_label, flags, init_width_or_weight, user_id); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); } - if (format_byteCount > Util.StackAllocationSizeLimit) - { - Util.Free(native_format); - } - return ret != 0; } - public static bool SliderScalarN(string label, ImGuiDataType data_type, IntPtr p_data, int components, IntPtr p_min, IntPtr p_max, string format, float power) + public static void TableSetupColumn(string label, ImGuiTableColumnFlags flags, float init_width_or_weight) { byte* native_label; int label_byteCount = 0; @@ -12353,39 +13391,14 @@ public static bool SliderScalarN(string label, ImGuiDataType data_type, IntPtr p native_label[native_label_offset] = 0; } else { native_label = null; } - void* native_p_data = (void*)p_data.ToPointer(); - void* native_p_min = (void*)p_min.ToPointer(); - void* native_p_max = (void*)p_max.ToPointer(); - byte* native_format; - int format_byteCount = 0; - if (format != null) - { - format_byteCount = Encoding.UTF8.GetByteCount(format); - if (format_byteCount > Util.StackAllocationSizeLimit) - { - native_format = Util.Allocate(format_byteCount + 1); - } - else - { - byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; - native_format = native_format_stackBytes; - } - int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); - native_format[native_format_offset] = 0; - } - else { native_format = null; } - byte ret = ImGuiNative.igSliderScalarN(native_label, data_type, native_p_data, components, native_p_min, native_p_max, native_format, power); + uint user_id = 0; + ImGuiNative.igTableSetupColumn(native_label, flags, init_width_or_weight, user_id); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); } - if (format_byteCount > Util.StackAllocationSizeLimit) - { - Util.Free(native_format); - } - return ret != 0; } - public static bool SmallButton(string label) + public static void TableSetupColumn(string label, ImGuiTableColumnFlags flags, float init_width_or_weight, uint user_id) { byte* native_label; int label_byteCount = 0; @@ -12405,46 +13418,15 @@ public static bool SmallButton(string label) native_label[native_label_offset] = 0; } else { native_label = null; } - byte ret = ImGuiNative.igSmallButton(native_label); + ImGuiNative.igTableSetupColumn(native_label, flags, init_width_or_weight, user_id); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); } - return ret != 0; - } - public static void Spacing() - { - ImGuiNative.igSpacing(); - } - 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 StyleColorsDark() - { - ImGuiStyle* dst = null; - ImGuiNative.igStyleColorsDark(dst); - } - public static void StyleColorsDark(ImGuiStylePtr dst) - { - ImGuiStyle* native_dst = dst.NativePtr; - ImGuiNative.igStyleColorsDark(native_dst); - } - public static void StyleColorsLight() - { - ImGuiStyle* dst = null; - ImGuiNative.igStyleColorsLight(dst); } - public static void StyleColorsLight(ImGuiStylePtr dst) + public static void TableSetupScrollFreeze(int cols, int rows) { - ImGuiStyle* native_dst = dst.NativePtr; - ImGuiNative.igStyleColorsLight(native_dst); + ImGuiNative.igTableSetupScrollFreeze(cols, rows); } public static void Text(string fmt) { @@ -12597,7 +13579,7 @@ public static bool TreeNode(string label) native_label[native_label_offset] = 0; } else { native_label = null; } - byte ret = ImGuiNative.igTreeNodeStr(native_label); + byte ret = ImGuiNative.igTreeNode_Str(native_label); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -12642,7 +13624,7 @@ public static bool TreeNode(string str_id, string fmt) native_fmt[native_fmt_offset] = 0; } else { native_fmt = null; } - byte ret = ImGuiNative.igTreeNodeStrStr(native_str_id, native_fmt); + byte ret = ImGuiNative.igTreeNode_StrStr(native_str_id, native_fmt); if (str_id_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_str_id); @@ -12674,7 +13656,7 @@ public static bool TreeNode(IntPtr ptr_id, string fmt) native_fmt[native_fmt_offset] = 0; } else { native_fmt = null; } - byte ret = ImGuiNative.igTreeNodePtr(native_ptr_id, native_fmt); + byte ret = ImGuiNative.igTreeNode_Ptr(native_ptr_id, native_fmt); if (fmt_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_fmt); @@ -12702,7 +13684,7 @@ public static bool TreeNodeEx(string label) } else { native_label = null; } ImGuiTreeNodeFlags flags = (ImGuiTreeNodeFlags)0; - byte ret = ImGuiNative.igTreeNodeExStr(native_label, flags); + byte ret = ImGuiNative.igTreeNodeEx_Str(native_label, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -12729,7 +13711,7 @@ public static bool TreeNodeEx(string label, ImGuiTreeNodeFlags flags) native_label[native_label_offset] = 0; } else { native_label = null; } - byte ret = ImGuiNative.igTreeNodeExStr(native_label, flags); + byte ret = ImGuiNative.igTreeNodeEx_Str(native_label, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -12774,7 +13756,7 @@ public static bool TreeNodeEx(string str_id, ImGuiTreeNodeFlags flags, string fm native_fmt[native_fmt_offset] = 0; } else { native_fmt = null; } - byte ret = ImGuiNative.igTreeNodeExStrStr(native_str_id, flags, native_fmt); + byte ret = ImGuiNative.igTreeNodeEx_StrStr(native_str_id, flags, native_fmt); if (str_id_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_str_id); @@ -12806,7 +13788,7 @@ public static bool TreeNodeEx(IntPtr ptr_id, ImGuiTreeNodeFlags flags, string fm native_fmt[native_fmt_offset] = 0; } else { native_fmt = null; } - byte ret = ImGuiNative.igTreeNodeExPtr(native_ptr_id, flags, native_fmt); + byte ret = ImGuiNative.igTreeNodeEx_Ptr(native_ptr_id, flags, native_fmt); if (fmt_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_fmt); @@ -12837,7 +13819,7 @@ public static void TreePush(string str_id) native_str_id[native_str_id_offset] = 0; } else { native_str_id = null; } - ImGuiNative.igTreePushStr(native_str_id); + ImGuiNative.igTreePush_Str(native_str_id); if (str_id_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_str_id); @@ -12846,12 +13828,12 @@ public static void TreePush(string str_id) public static void TreePush() { void* ptr_id = null; - ImGuiNative.igTreePushPtr(ptr_id); + ImGuiNative.igTreePush_Ptr(ptr_id); } public static void TreePush(IntPtr ptr_id) { void* native_ptr_id = (void*)ptr_id.ToPointer(); - ImGuiNative.igTreePushPtr(native_ptr_id); + ImGuiNative.igTreePush_Ptr(native_ptr_id); } public static void Unindent() { @@ -12862,6 +13844,10 @@ public static void Unindent(float indent_w) { ImGuiNative.igUnindent(indent_w); } + public static void UpdatePlatformWindows() + { + ImGuiNative.igUpdatePlatformWindows(); + } public static void Value(string prefix, bool b) { byte* native_prefix; @@ -12883,7 +13869,7 @@ public static void Value(string prefix, bool b) } else { native_prefix = null; } byte native_b = b ? (byte)1 : (byte)0; - ImGuiNative.igValueBool(native_prefix, native_b); + ImGuiNative.igValue_Bool(native_prefix, native_b); if (prefix_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_prefix); @@ -12909,7 +13895,7 @@ public static void Value(string prefix, int v) native_prefix[native_prefix_offset] = 0; } else { native_prefix = null; } - ImGuiNative.igValueInt(native_prefix, v); + ImGuiNative.igValue_Int(native_prefix, v); if (prefix_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_prefix); @@ -12935,7 +13921,7 @@ public static void Value(string prefix, uint v) native_prefix[native_prefix_offset] = 0; } else { native_prefix = null; } - ImGuiNative.igValueUint(native_prefix, v); + ImGuiNative.igValue_Uint(native_prefix, v); if (prefix_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_prefix); @@ -12962,7 +13948,7 @@ public static void Value(string prefix, float v) } else { native_prefix = null; } byte* native_float_format = null; - ImGuiNative.igValueFloat(native_prefix, v, native_float_format); + ImGuiNative.igValue_Float(native_prefix, v, native_float_format); if (prefix_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_prefix); @@ -13006,7 +13992,7 @@ public static void Value(string prefix, float v, string float_format) native_float_format[native_float_format_offset] = 0; } else { native_float_format = null; } - ImGuiNative.igValueFloat(native_prefix, v, native_float_format); + ImGuiNative.igValue_Float(native_prefix, v, native_float_format); if (prefix_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_prefix); @@ -13050,10 +14036,10 @@ public static bool VSliderFloat(string label, Vector2 size, ref float v, float v } int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); native_format[native_format_offset] = 0; - float power = 1.0f; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; fixed (float* native_v = &v) { - byte ret = ImGuiNative.igVSliderFloat(native_label, size, native_v, v_min, v_max, native_format, power); + byte ret = ImGuiNative.igVSliderFloat(native_label, size, native_v, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -13103,10 +14089,10 @@ public static bool VSliderFloat(string label, Vector2 size, ref float v, float v native_format[native_format_offset] = 0; } else { native_format = null; } - float power = 1.0f; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; fixed (float* native_v = &v) { - byte ret = ImGuiNative.igVSliderFloat(native_label, size, native_v, v_min, v_max, native_format, power); + byte ret = ImGuiNative.igVSliderFloat(native_label, size, native_v, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -13118,7 +14104,7 @@ public static bool VSliderFloat(string label, Vector2 size, ref float v, float v return ret != 0; } } - public static bool VSliderFloat(string label, Vector2 size, ref float v, float v_min, float v_max, string format, float power) + public static bool VSliderFloat(string label, Vector2 size, ref float v, float v_min, float v_max, string format, ImGuiSliderFlags flags) { byte* native_label; int label_byteCount = 0; @@ -13158,7 +14144,7 @@ public static bool VSliderFloat(string label, Vector2 size, ref float v, float v else { native_format = null; } fixed (float* native_v = &v) { - byte ret = ImGuiNative.igVSliderFloat(native_label, size, native_v, v_min, v_max, native_format, power); + byte ret = ImGuiNative.igVSliderFloat(native_label, size, native_v, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -13204,9 +14190,10 @@ public static bool VSliderInt(string label, Vector2 size, ref int v, int v_min, } int native_format_offset = Util.GetUtf8("%d", native_format, format_byteCount); native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; fixed (int* native_v = &v) { - byte ret = ImGuiNative.igVSliderInt(native_label, size, native_v, v_min, v_max, native_format); + byte ret = ImGuiNative.igVSliderInt(native_label, size, native_v, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -13219,6 +14206,59 @@ public static bool VSliderInt(string label, Vector2 size, ref int v, int v_min, } } public static bool VSliderInt(string label, Vector2 size, ref int v, int v_min, int v_max, string format) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igVSliderInt(native_label, size, native_v, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool VSliderInt(string label, Vector2 size, ref int v, int v_min, int v_max, string format, ImGuiSliderFlags flags) { byte* native_label; int label_byteCount = 0; @@ -13258,7 +14298,7 @@ public static bool VSliderInt(string label, Vector2 size, ref int v, int v_min, 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.igVSliderInt(native_label, size, native_v, v_min, v_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -13294,8 +14334,8 @@ public static bool VSliderScalar(string label, Vector2 size, ImGuiDataType data_ void* native_p_min = (void*)p_min.ToPointer(); void* native_p_max = (void*)p_max.ToPointer(); byte* native_format = null; - float power = 1.0f; - byte ret = ImGuiNative.igVSliderScalar(native_label, size, data_type, native_p_data, native_p_min, native_p_max, native_format, power); + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + byte ret = ImGuiNative.igVSliderScalar(native_label, size, data_type, native_p_data, native_p_min, native_p_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -13343,8 +14383,8 @@ public static bool VSliderScalar(string label, Vector2 size, ImGuiDataType data_ native_format[native_format_offset] = 0; } else { native_format = null; } - float power = 1.0f; - byte ret = ImGuiNative.igVSliderScalar(native_label, size, data_type, native_p_data, native_p_min, native_p_max, native_format, power); + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + byte ret = ImGuiNative.igVSliderScalar(native_label, size, data_type, native_p_data, native_p_min, native_p_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -13355,7 +14395,7 @@ public static bool VSliderScalar(string label, Vector2 size, ImGuiDataType data_ } return ret != 0; } - public static bool VSliderScalar(string label, Vector2 size, ImGuiDataType data_type, IntPtr p_data, IntPtr p_min, IntPtr p_max, string format, float power) + public static bool VSliderScalar(string label, Vector2 size, ImGuiDataType data_type, IntPtr p_data, IntPtr p_min, IntPtr p_max, string format, ImGuiSliderFlags flags) { byte* native_label; int label_byteCount = 0; @@ -13396,7 +14436,7 @@ public static bool VSliderScalar(string label, Vector2 size, ImGuiDataType data_ native_format[native_format_offset] = 0; } else { native_format = null; } - byte ret = ImGuiNative.igVSliderScalar(native_label, size, data_type, native_p_data, native_p_min, native_p_max, native_format, power); + byte ret = ImGuiNative.igVSliderScalar(native_label, size, data_type, native_p_data, native_p_min, native_p_max, native_format, flags); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); diff --git a/ImGuiNET/Wrapper/Generated/ImGuiBackendFlags.gen.cs b/ImGuiNET/Wrapper/Generated/ImGuiBackendFlags.gen.cs index de7ba77..704dec4 100644 --- a/ImGuiNET/Wrapper/Generated/ImGuiBackendFlags.gen.cs +++ b/ImGuiNET/Wrapper/Generated/ImGuiBackendFlags.gen.cs @@ -4,9 +4,12 @@ namespace ImGuiNET public enum ImGuiBackendFlags { None = 0, - HasGamepad = 1 << 0, - HasMouseCursors = 1 << 1, - HasSetMousePos = 1 << 2, - RendererHasVtxOffset = 1 << 3, + HasGamepad = 1, + HasMouseCursors = 2, + HasSetMousePos = 4, + RendererHasVtxOffset = 8, + PlatformHasViewports = 1024, + HasMouseHoveredViewport = 2048, + RendererHasViewports = 4096, } } diff --git a/ImGuiNET/Wrapper/Generated/ImGuiButtonFlags.gen.cs b/ImGuiNET/Wrapper/Generated/ImGuiButtonFlags.gen.cs new file mode 100644 index 0000000..7964d5e --- /dev/null +++ b/ImGuiNET/Wrapper/Generated/ImGuiButtonFlags.gen.cs @@ -0,0 +1,13 @@ +namespace ImGuiNET +{ + [System.Flags] + public enum ImGuiButtonFlags + { + None = 0, + MouseButtonLeft = 1, + MouseButtonRight = 2, + MouseButtonMiddle = 4, + MouseButtonMask = 7, + MouseButtonDefault = 1, + } +} diff --git a/ImGuiNET/Wrapper/Generated/ImGuiButtonFlags.gen.cs.meta b/ImGuiNET/Wrapper/Generated/ImGuiButtonFlags.gen.cs.meta new file mode 100644 index 0000000..fc45165 --- /dev/null +++ b/ImGuiNET/Wrapper/Generated/ImGuiButtonFlags.gen.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d314032ca2c755f49a687fecde23c697 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/ImGuiNET/Wrapper/Generated/ImGuiCol.gen.cs b/ImGuiNET/Wrapper/Generated/ImGuiCol.gen.cs index 49a92d8..38401f1 100644 --- a/ImGuiNET/Wrapper/Generated/ImGuiCol.gen.cs +++ b/ImGuiNET/Wrapper/Generated/ImGuiCol.gen.cs @@ -40,16 +40,23 @@ public enum ImGuiCol TabActive = 35, TabUnfocused = 36, TabUnfocusedActive = 37, - PlotLines = 38, - PlotLinesHovered = 39, - PlotHistogram = 40, - PlotHistogramHovered = 41, - TextSelectedBg = 42, - DragDropTarget = 43, - NavHighlight = 44, - NavWindowingHighlight = 45, - NavWindowingDimBg = 46, - ModalWindowDimBg = 47, - COUNT = 48, + DockingPreview = 38, + DockingEmptyBg = 39, + PlotLines = 40, + PlotLinesHovered = 41, + PlotHistogram = 42, + PlotHistogramHovered = 43, + TableHeaderBg = 44, + TableBorderStrong = 45, + TableBorderLight = 46, + TableRowBg = 47, + TableRowBgAlt = 48, + TextSelectedBg = 49, + DragDropTarget = 50, + NavHighlight = 51, + NavWindowingHighlight = 52, + NavWindowingDimBg = 53, + ModalWindowDimBg = 54, + COUNT = 55, } } diff --git a/ImGuiNET/Wrapper/Generated/ImGuiColorEditFlags.gen.cs b/ImGuiNET/Wrapper/Generated/ImGuiColorEditFlags.gen.cs index a12d955..ede1457 100644 --- a/ImGuiNET/Wrapper/Generated/ImGuiColorEditFlags.gen.cs +++ b/ImGuiNET/Wrapper/Generated/ImGuiColorEditFlags.gen.cs @@ -4,32 +4,33 @@ namespace ImGuiNET public enum ImGuiColorEditFlags { None = 0, - NoAlpha = 1 << 1, - NoPicker = 1 << 2, - NoOptions = 1 << 3, - NoSmallPreview = 1 << 4, - NoInputs = 1 << 5, - NoTooltip = 1 << 6, - NoLabel = 1 << 7, - NoSidePreview = 1 << 8, - NoDragDrop = 1 << 9, - AlphaBar = 1 << 16, - AlphaPreview = 1 << 17, - AlphaPreviewHalf = 1 << 18, - HDR = 1 << 19, - DisplayRGB = 1 << 20, - DisplayHSV = 1 << 21, - DisplayHex = 1 << 22, - Uint8 = 1 << 23, - Float = 1 << 24, - PickerHueBar = 1 << 25, - PickerHueWheel = 1 << 26, - InputRGB = 1 << 27, - InputHSV = 1 << 28, - _OptionsDefault = Uint8|DisplayRGB|InputRGB|PickerHueBar, - _DisplayMask = DisplayRGB|DisplayHSV|DisplayHex, - _DataTypeMask = Uint8|Float, - _PickerMask = PickerHueWheel|PickerHueBar, - _InputMask = InputRGB|InputHSV, + NoAlpha = 2, + NoPicker = 4, + NoOptions = 8, + NoSmallPreview = 16, + NoInputs = 32, + NoTooltip = 64, + NoLabel = 128, + NoSidePreview = 256, + NoDragDrop = 512, + NoBorder = 1024, + AlphaBar = 65536, + AlphaPreview = 131072, + AlphaPreviewHalf = 262144, + HDR = 524288, + DisplayRGB = 1048576, + DisplayHSV = 2097152, + DisplayHex = 4194304, + Uint8 = 8388608, + Float = 16777216, + PickerHueBar = 33554432, + PickerHueWheel = 67108864, + InputRGB = 134217728, + InputHSV = 268435456, + DefaultOptions = 177209344, + DisplayMask = 7340032, + DataTypeMask = 25165824, + PickerMask = 100663296, + InputMask = 402653184, } } diff --git a/ImGuiNET/Wrapper/Generated/ImGuiComboFlags.gen.cs b/ImGuiNET/Wrapper/Generated/ImGuiComboFlags.gen.cs index 0022750..68efc53 100644 --- a/ImGuiNET/Wrapper/Generated/ImGuiComboFlags.gen.cs +++ b/ImGuiNET/Wrapper/Generated/ImGuiComboFlags.gen.cs @@ -4,13 +4,13 @@ namespace ImGuiNET public enum ImGuiComboFlags { None = 0, - PopupAlignLeft = 1 << 0, - HeightSmall = 1 << 1, - HeightRegular = 1 << 2, - HeightLarge = 1 << 3, - HeightLargest = 1 << 4, - NoArrowButton = 1 << 5, - NoPreview = 1 << 6, - HeightMask = HeightSmall | HeightRegular | HeightLarge | HeightLargest, + PopupAlignLeft = 1, + HeightSmall = 2, + HeightRegular = 4, + HeightLarge = 8, + HeightLargest = 16, + NoArrowButton = 32, + NoPreview = 64, + HeightMask = 30, } } diff --git a/ImGuiNET/Wrapper/Generated/ImGuiCond.gen.cs b/ImGuiNET/Wrapper/Generated/ImGuiCond.gen.cs index 917c044..23a4cbb 100644 --- a/ImGuiNET/Wrapper/Generated/ImGuiCond.gen.cs +++ b/ImGuiNET/Wrapper/Generated/ImGuiCond.gen.cs @@ -2,9 +2,10 @@ namespace ImGuiNET { public enum ImGuiCond { - Always = 1 << 0, - Once = 1 << 1, - FirstUseEver = 1 << 2, - Appearing = 1 << 3, + None = 0, + Always = 1, + Once = 2, + FirstUseEver = 4, + Appearing = 8, } } diff --git a/ImGuiNET/Wrapper/Generated/ImGuiConfigFlags.gen.cs b/ImGuiNET/Wrapper/Generated/ImGuiConfigFlags.gen.cs index 4d0b6d2..c64b184 100644 --- a/ImGuiNET/Wrapper/Generated/ImGuiConfigFlags.gen.cs +++ b/ImGuiNET/Wrapper/Generated/ImGuiConfigFlags.gen.cs @@ -4,13 +4,17 @@ namespace ImGuiNET public enum ImGuiConfigFlags { None = 0, - NavEnableKeyboard = 1 << 0, - NavEnableGamepad = 1 << 1, - NavEnableSetMousePos = 1 << 2, - NavNoCaptureKeyboard = 1 << 3, - NoMouse = 1 << 4, - NoMouseCursorChange = 1 << 5, - IsSRGB = 1 << 20, - IsTouchScreen = 1 << 21, + NavEnableKeyboard = 1, + NavEnableGamepad = 2, + NavEnableSetMousePos = 4, + NavNoCaptureKeyboard = 8, + NoMouse = 16, + NoMouseCursorChange = 32, + DockingEnable = 64, + ViewportsEnable = 1024, + DpiEnableScaleViewports = 16384, + DpiEnableScaleFonts = 32768, + IsSRGB = 1048576, + IsTouchScreen = 2097152, } } diff --git a/ImGuiNET/Wrapper/Generated/ImGuiDockNodeFlags.gen.cs b/ImGuiNET/Wrapper/Generated/ImGuiDockNodeFlags.gen.cs new file mode 100644 index 0000000..f705b1c --- /dev/null +++ b/ImGuiNET/Wrapper/Generated/ImGuiDockNodeFlags.gen.cs @@ -0,0 +1,14 @@ +namespace ImGuiNET +{ + [System.Flags] + public enum ImGuiDockNodeFlags + { + None = 0, + KeepAliveOnly = 1, + NoDockingInCentralNode = 4, + PassthruCentralNode = 8, + NoSplit = 16, + NoResize = 32, + AutoHideTabBar = 64, + } +} diff --git a/ImGuiNET/Wrapper/Generated/ImGuiDockNodeFlags.gen.cs.meta b/ImGuiNET/Wrapper/Generated/ImGuiDockNodeFlags.gen.cs.meta new file mode 100644 index 0000000..b9032d7 --- /dev/null +++ b/ImGuiNET/Wrapper/Generated/ImGuiDockNodeFlags.gen.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f6620affa72c8054cb914ce9e978c257 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/ImGuiNET/Wrapper/Generated/ImGuiDragDropFlags.gen.cs b/ImGuiNET/Wrapper/Generated/ImGuiDragDropFlags.gen.cs index 9e95b50..00fdf8a 100644 --- a/ImGuiNET/Wrapper/Generated/ImGuiDragDropFlags.gen.cs +++ b/ImGuiNET/Wrapper/Generated/ImGuiDragDropFlags.gen.cs @@ -4,15 +4,15 @@ namespace ImGuiNET public enum ImGuiDragDropFlags { None = 0, - SourceNoPreviewTooltip = 1 << 0, - SourceNoDisableHover = 1 << 1, - SourceNoHoldToOpenOthers = 1 << 2, - SourceAllowNullID = 1 << 3, - SourceExtern = 1 << 4, - SourceAutoExpirePayload = 1 << 5, - AcceptBeforeDelivery = 1 << 10, - AcceptNoDrawDefaultRect = 1 << 11, - AcceptNoPreviewTooltip = 1 << 12, - AcceptPeekOnly = AcceptBeforeDelivery | AcceptNoDrawDefaultRect, + SourceNoPreviewTooltip = 1, + SourceNoDisableHover = 2, + SourceNoHoldToOpenOthers = 4, + SourceAllowNullID = 8, + SourceExtern = 16, + SourceAutoExpirePayload = 32, + AcceptBeforeDelivery = 1024, + AcceptNoDrawDefaultRect = 2048, + AcceptNoPreviewTooltip = 4096, + AcceptPeekOnly = 3072, } } diff --git a/ImGuiNET/Wrapper/Generated/ImGuiFocusedFlags.gen.cs b/ImGuiNET/Wrapper/Generated/ImGuiFocusedFlags.gen.cs index e9169c1..249a42f 100644 --- a/ImGuiNET/Wrapper/Generated/ImGuiFocusedFlags.gen.cs +++ b/ImGuiNET/Wrapper/Generated/ImGuiFocusedFlags.gen.cs @@ -4,9 +4,11 @@ namespace ImGuiNET public enum ImGuiFocusedFlags { None = 0, - ChildWindows = 1 << 0, - RootWindow = 1 << 1, - AnyWindow = 1 << 2, - RootAndChildWindows = RootWindow | ChildWindows, + ChildWindows = 1, + RootWindow = 2, + AnyWindow = 4, + NoPopupHierarchy = 8, + DockHierarchy = 16, + RootAndChildWindows = 3, } } diff --git a/ImGuiNET/Wrapper/Generated/ImGuiHoveredFlags.gen.cs b/ImGuiNET/Wrapper/Generated/ImGuiHoveredFlags.gen.cs index 5e5d5c2..60699dc 100644 --- a/ImGuiNET/Wrapper/Generated/ImGuiHoveredFlags.gen.cs +++ b/ImGuiNET/Wrapper/Generated/ImGuiHoveredFlags.gen.cs @@ -4,14 +4,16 @@ namespace ImGuiNET public enum ImGuiHoveredFlags { None = 0, - ChildWindows = 1 << 0, - RootWindow = 1 << 1, - AnyWindow = 1 << 2, - AllowWhenBlockedByPopup = 1 << 3, - AllowWhenBlockedByActiveItem = 1 << 5, - AllowWhenOverlapped = 1 << 6, - AllowWhenDisabled = 1 << 7, - RectOnly = AllowWhenBlockedByPopup | AllowWhenBlockedByActiveItem | AllowWhenOverlapped, - RootAndChildWindows = RootWindow | ChildWindows, + ChildWindows = 1, + RootWindow = 2, + AnyWindow = 4, + NoPopupHierarchy = 8, + DockHierarchy = 16, + AllowWhenBlockedByPopup = 32, + AllowWhenBlockedByActiveItem = 128, + AllowWhenOverlapped = 256, + AllowWhenDisabled = 512, + RectOnly = 416, + RootAndChildWindows = 3, } } diff --git a/ImGuiNET/Wrapper/Generated/ImGuiIO.gen.cs b/ImGuiNET/Wrapper/Generated/ImGuiIO.gen.cs index b265c0b..6016801 100644 --- a/ImGuiNET/Wrapper/Generated/ImGuiIO.gen.cs +++ b/ImGuiNET/Wrapper/Generated/ImGuiIO.gen.cs @@ -1,7 +1,7 @@ using System; -using System.Runtime.CompilerServices; -using System.Text; using UnityEngine; +using Unity.Collections.LowLevel.Unsafe; +using System.Text; namespace ImGuiNET { @@ -17,7 +17,6 @@ public unsafe partial struct ImGuiIO public float MouseDoubleClickTime; public float MouseDoubleClickMaxDist; public float MouseDragThreshold; - public fixed int KeyMap[22]; public float KeyRepeatDelay; public float KeyRepeatRate; public void* UserData; @@ -26,12 +25,22 @@ public unsafe partial struct ImGuiIO public byte FontAllowUserScaling; public ImFont* FontDefault; public Vector2 DisplayFramebufferScale; + public byte ConfigDockingNoSplit; + public byte ConfigDockingWithShift; + public byte ConfigDockingAlwaysTabBar; + public byte ConfigDockingTransparentPayload; + public byte ConfigViewportsNoAutoMerge; + public byte ConfigViewportsNoTaskBarIcon; + public byte ConfigViewportsNoDecoration; + public byte ConfigViewportsNoDefaultParent; public byte MouseDrawCursor; public byte ConfigMacOSXBehaviors; + public byte ConfigInputTrickleEventQueue; public byte ConfigInputTextCursorBlink; + public byte ConfigDragClickToInputText; public byte ConfigWindowsResizeFromEdges; public byte ConfigWindowsMoveFromTitleBarOnly; - public float ConfigWindowsMemoryCompactTimer; + public float ConfigMemoryCompactTimer; public byte* BackendPlatformName; public byte* BackendRendererName; public void* BackendPlatformUserData; @@ -40,19 +49,8 @@ public unsafe partial struct ImGuiIO public IntPtr GetClipboardTextFn; public IntPtr SetClipboardTextFn; public void* ClipboardUserData; - public IntPtr ImeSetInputScreenPosFn; - public void* ImeWindowHandle; - public void* RenderDrawListsFnUnused; - public Vector2 MousePos; - public fixed byte MouseDown[5]; - public float MouseWheel; - public float MouseWheelH; - public byte KeyCtrl; - public byte KeyShift; - public byte KeyAlt; - public byte KeySuper; - public fixed byte KeysDown[512]; - public fixed float NavInputs[21]; + public IntPtr SetPlatformImeDataFn; + public void* _UnusedPadding; public byte WantCaptureMouse; public byte WantCaptureKeyboard; public byte WantTextInput; @@ -67,6 +65,666 @@ public unsafe partial struct ImGuiIO public int MetricsActiveWindows; public int MetricsActiveAllocations; public Vector2 MouseDelta; + public fixed int KeyMap[645]; + public fixed byte KeysDown[512]; + public Vector2 MousePos; + public fixed byte MouseDown[5]; + public float MouseWheel; + public float MouseWheelH; + public uint MouseHoveredViewport; + public byte KeyCtrl; + public byte KeyShift; + public byte KeyAlt; + public byte KeySuper; + public fixed float NavInputs[20]; + public ImGuiKeyModFlags KeyMods; + public ImGuiKeyModFlags KeyModsPrev; + public ImGuiKeyData KeysData_0; + public ImGuiKeyData KeysData_1; + public ImGuiKeyData KeysData_2; + public ImGuiKeyData KeysData_3; + public ImGuiKeyData KeysData_4; + public ImGuiKeyData KeysData_5; + public ImGuiKeyData KeysData_6; + public ImGuiKeyData KeysData_7; + public ImGuiKeyData KeysData_8; + public ImGuiKeyData KeysData_9; + public ImGuiKeyData KeysData_10; + public ImGuiKeyData KeysData_11; + public ImGuiKeyData KeysData_12; + public ImGuiKeyData KeysData_13; + public ImGuiKeyData KeysData_14; + public ImGuiKeyData KeysData_15; + public ImGuiKeyData KeysData_16; + public ImGuiKeyData KeysData_17; + public ImGuiKeyData KeysData_18; + public ImGuiKeyData KeysData_19; + public ImGuiKeyData KeysData_20; + public ImGuiKeyData KeysData_21; + public ImGuiKeyData KeysData_22; + public ImGuiKeyData KeysData_23; + public ImGuiKeyData KeysData_24; + public ImGuiKeyData KeysData_25; + public ImGuiKeyData KeysData_26; + public ImGuiKeyData KeysData_27; + public ImGuiKeyData KeysData_28; + public ImGuiKeyData KeysData_29; + public ImGuiKeyData KeysData_30; + public ImGuiKeyData KeysData_31; + public ImGuiKeyData KeysData_32; + public ImGuiKeyData KeysData_33; + public ImGuiKeyData KeysData_34; + public ImGuiKeyData KeysData_35; + public ImGuiKeyData KeysData_36; + public ImGuiKeyData KeysData_37; + public ImGuiKeyData KeysData_38; + public ImGuiKeyData KeysData_39; + public ImGuiKeyData KeysData_40; + public ImGuiKeyData KeysData_41; + public ImGuiKeyData KeysData_42; + public ImGuiKeyData KeysData_43; + public ImGuiKeyData KeysData_44; + public ImGuiKeyData KeysData_45; + public ImGuiKeyData KeysData_46; + public ImGuiKeyData KeysData_47; + public ImGuiKeyData KeysData_48; + public ImGuiKeyData KeysData_49; + public ImGuiKeyData KeysData_50; + public ImGuiKeyData KeysData_51; + public ImGuiKeyData KeysData_52; + public ImGuiKeyData KeysData_53; + public ImGuiKeyData KeysData_54; + public ImGuiKeyData KeysData_55; + public ImGuiKeyData KeysData_56; + public ImGuiKeyData KeysData_57; + public ImGuiKeyData KeysData_58; + public ImGuiKeyData KeysData_59; + public ImGuiKeyData KeysData_60; + public ImGuiKeyData KeysData_61; + public ImGuiKeyData KeysData_62; + public ImGuiKeyData KeysData_63; + public ImGuiKeyData KeysData_64; + public ImGuiKeyData KeysData_65; + public ImGuiKeyData KeysData_66; + public ImGuiKeyData KeysData_67; + public ImGuiKeyData KeysData_68; + public ImGuiKeyData KeysData_69; + public ImGuiKeyData KeysData_70; + public ImGuiKeyData KeysData_71; + public ImGuiKeyData KeysData_72; + public ImGuiKeyData KeysData_73; + public ImGuiKeyData KeysData_74; + public ImGuiKeyData KeysData_75; + public ImGuiKeyData KeysData_76; + public ImGuiKeyData KeysData_77; + public ImGuiKeyData KeysData_78; + public ImGuiKeyData KeysData_79; + public ImGuiKeyData KeysData_80; + public ImGuiKeyData KeysData_81; + public ImGuiKeyData KeysData_82; + public ImGuiKeyData KeysData_83; + public ImGuiKeyData KeysData_84; + public ImGuiKeyData KeysData_85; + public ImGuiKeyData KeysData_86; + public ImGuiKeyData KeysData_87; + public ImGuiKeyData KeysData_88; + public ImGuiKeyData KeysData_89; + public ImGuiKeyData KeysData_90; + public ImGuiKeyData KeysData_91; + public ImGuiKeyData KeysData_92; + public ImGuiKeyData KeysData_93; + public ImGuiKeyData KeysData_94; + public ImGuiKeyData KeysData_95; + public ImGuiKeyData KeysData_96; + public ImGuiKeyData KeysData_97; + public ImGuiKeyData KeysData_98; + public ImGuiKeyData KeysData_99; + public ImGuiKeyData KeysData_100; + public ImGuiKeyData KeysData_101; + public ImGuiKeyData KeysData_102; + public ImGuiKeyData KeysData_103; + public ImGuiKeyData KeysData_104; + public ImGuiKeyData KeysData_105; + public ImGuiKeyData KeysData_106; + public ImGuiKeyData KeysData_107; + public ImGuiKeyData KeysData_108; + public ImGuiKeyData KeysData_109; + public ImGuiKeyData KeysData_110; + public ImGuiKeyData KeysData_111; + public ImGuiKeyData KeysData_112; + public ImGuiKeyData KeysData_113; + public ImGuiKeyData KeysData_114; + public ImGuiKeyData KeysData_115; + public ImGuiKeyData KeysData_116; + public ImGuiKeyData KeysData_117; + public ImGuiKeyData KeysData_118; + public ImGuiKeyData KeysData_119; + public ImGuiKeyData KeysData_120; + public ImGuiKeyData KeysData_121; + public ImGuiKeyData KeysData_122; + public ImGuiKeyData KeysData_123; + public ImGuiKeyData KeysData_124; + public ImGuiKeyData KeysData_125; + public ImGuiKeyData KeysData_126; + public ImGuiKeyData KeysData_127; + public ImGuiKeyData KeysData_128; + public ImGuiKeyData KeysData_129; + public ImGuiKeyData KeysData_130; + public ImGuiKeyData KeysData_131; + public ImGuiKeyData KeysData_132; + public ImGuiKeyData KeysData_133; + public ImGuiKeyData KeysData_134; + public ImGuiKeyData KeysData_135; + public ImGuiKeyData KeysData_136; + public ImGuiKeyData KeysData_137; + public ImGuiKeyData KeysData_138; + public ImGuiKeyData KeysData_139; + public ImGuiKeyData KeysData_140; + public ImGuiKeyData KeysData_141; + public ImGuiKeyData KeysData_142; + public ImGuiKeyData KeysData_143; + public ImGuiKeyData KeysData_144; + public ImGuiKeyData KeysData_145; + public ImGuiKeyData KeysData_146; + public ImGuiKeyData KeysData_147; + public ImGuiKeyData KeysData_148; + public ImGuiKeyData KeysData_149; + public ImGuiKeyData KeysData_150; + public ImGuiKeyData KeysData_151; + public ImGuiKeyData KeysData_152; + public ImGuiKeyData KeysData_153; + public ImGuiKeyData KeysData_154; + public ImGuiKeyData KeysData_155; + public ImGuiKeyData KeysData_156; + public ImGuiKeyData KeysData_157; + public ImGuiKeyData KeysData_158; + public ImGuiKeyData KeysData_159; + public ImGuiKeyData KeysData_160; + public ImGuiKeyData KeysData_161; + public ImGuiKeyData KeysData_162; + public ImGuiKeyData KeysData_163; + public ImGuiKeyData KeysData_164; + public ImGuiKeyData KeysData_165; + public ImGuiKeyData KeysData_166; + public ImGuiKeyData KeysData_167; + public ImGuiKeyData KeysData_168; + public ImGuiKeyData KeysData_169; + public ImGuiKeyData KeysData_170; + public ImGuiKeyData KeysData_171; + public ImGuiKeyData KeysData_172; + public ImGuiKeyData KeysData_173; + public ImGuiKeyData KeysData_174; + public ImGuiKeyData KeysData_175; + public ImGuiKeyData KeysData_176; + public ImGuiKeyData KeysData_177; + public ImGuiKeyData KeysData_178; + public ImGuiKeyData KeysData_179; + public ImGuiKeyData KeysData_180; + public ImGuiKeyData KeysData_181; + public ImGuiKeyData KeysData_182; + public ImGuiKeyData KeysData_183; + public ImGuiKeyData KeysData_184; + public ImGuiKeyData KeysData_185; + public ImGuiKeyData KeysData_186; + public ImGuiKeyData KeysData_187; + public ImGuiKeyData KeysData_188; + public ImGuiKeyData KeysData_189; + public ImGuiKeyData KeysData_190; + public ImGuiKeyData KeysData_191; + public ImGuiKeyData KeysData_192; + public ImGuiKeyData KeysData_193; + public ImGuiKeyData KeysData_194; + public ImGuiKeyData KeysData_195; + public ImGuiKeyData KeysData_196; + public ImGuiKeyData KeysData_197; + public ImGuiKeyData KeysData_198; + public ImGuiKeyData KeysData_199; + public ImGuiKeyData KeysData_200; + public ImGuiKeyData KeysData_201; + public ImGuiKeyData KeysData_202; + public ImGuiKeyData KeysData_203; + public ImGuiKeyData KeysData_204; + public ImGuiKeyData KeysData_205; + public ImGuiKeyData KeysData_206; + public ImGuiKeyData KeysData_207; + public ImGuiKeyData KeysData_208; + public ImGuiKeyData KeysData_209; + public ImGuiKeyData KeysData_210; + public ImGuiKeyData KeysData_211; + public ImGuiKeyData KeysData_212; + public ImGuiKeyData KeysData_213; + public ImGuiKeyData KeysData_214; + public ImGuiKeyData KeysData_215; + public ImGuiKeyData KeysData_216; + public ImGuiKeyData KeysData_217; + public ImGuiKeyData KeysData_218; + public ImGuiKeyData KeysData_219; + public ImGuiKeyData KeysData_220; + public ImGuiKeyData KeysData_221; + public ImGuiKeyData KeysData_222; + public ImGuiKeyData KeysData_223; + public ImGuiKeyData KeysData_224; + public ImGuiKeyData KeysData_225; + public ImGuiKeyData KeysData_226; + public ImGuiKeyData KeysData_227; + public ImGuiKeyData KeysData_228; + public ImGuiKeyData KeysData_229; + public ImGuiKeyData KeysData_230; + public ImGuiKeyData KeysData_231; + public ImGuiKeyData KeysData_232; + public ImGuiKeyData KeysData_233; + public ImGuiKeyData KeysData_234; + public ImGuiKeyData KeysData_235; + public ImGuiKeyData KeysData_236; + public ImGuiKeyData KeysData_237; + public ImGuiKeyData KeysData_238; + public ImGuiKeyData KeysData_239; + public ImGuiKeyData KeysData_240; + public ImGuiKeyData KeysData_241; + public ImGuiKeyData KeysData_242; + public ImGuiKeyData KeysData_243; + public ImGuiKeyData KeysData_244; + public ImGuiKeyData KeysData_245; + public ImGuiKeyData KeysData_246; + public ImGuiKeyData KeysData_247; + public ImGuiKeyData KeysData_248; + public ImGuiKeyData KeysData_249; + public ImGuiKeyData KeysData_250; + public ImGuiKeyData KeysData_251; + public ImGuiKeyData KeysData_252; + public ImGuiKeyData KeysData_253; + public ImGuiKeyData KeysData_254; + public ImGuiKeyData KeysData_255; + public ImGuiKeyData KeysData_256; + public ImGuiKeyData KeysData_257; + public ImGuiKeyData KeysData_258; + public ImGuiKeyData KeysData_259; + public ImGuiKeyData KeysData_260; + public ImGuiKeyData KeysData_261; + public ImGuiKeyData KeysData_262; + public ImGuiKeyData KeysData_263; + public ImGuiKeyData KeysData_264; + public ImGuiKeyData KeysData_265; + public ImGuiKeyData KeysData_266; + public ImGuiKeyData KeysData_267; + public ImGuiKeyData KeysData_268; + public ImGuiKeyData KeysData_269; + public ImGuiKeyData KeysData_270; + public ImGuiKeyData KeysData_271; + public ImGuiKeyData KeysData_272; + public ImGuiKeyData KeysData_273; + public ImGuiKeyData KeysData_274; + public ImGuiKeyData KeysData_275; + public ImGuiKeyData KeysData_276; + public ImGuiKeyData KeysData_277; + public ImGuiKeyData KeysData_278; + public ImGuiKeyData KeysData_279; + public ImGuiKeyData KeysData_280; + public ImGuiKeyData KeysData_281; + public ImGuiKeyData KeysData_282; + public ImGuiKeyData KeysData_283; + public ImGuiKeyData KeysData_284; + public ImGuiKeyData KeysData_285; + public ImGuiKeyData KeysData_286; + public ImGuiKeyData KeysData_287; + public ImGuiKeyData KeysData_288; + public ImGuiKeyData KeysData_289; + public ImGuiKeyData KeysData_290; + public ImGuiKeyData KeysData_291; + public ImGuiKeyData KeysData_292; + public ImGuiKeyData KeysData_293; + public ImGuiKeyData KeysData_294; + public ImGuiKeyData KeysData_295; + public ImGuiKeyData KeysData_296; + public ImGuiKeyData KeysData_297; + public ImGuiKeyData KeysData_298; + public ImGuiKeyData KeysData_299; + public ImGuiKeyData KeysData_300; + public ImGuiKeyData KeysData_301; + public ImGuiKeyData KeysData_302; + public ImGuiKeyData KeysData_303; + public ImGuiKeyData KeysData_304; + public ImGuiKeyData KeysData_305; + public ImGuiKeyData KeysData_306; + public ImGuiKeyData KeysData_307; + public ImGuiKeyData KeysData_308; + public ImGuiKeyData KeysData_309; + public ImGuiKeyData KeysData_310; + public ImGuiKeyData KeysData_311; + public ImGuiKeyData KeysData_312; + public ImGuiKeyData KeysData_313; + public ImGuiKeyData KeysData_314; + public ImGuiKeyData KeysData_315; + public ImGuiKeyData KeysData_316; + public ImGuiKeyData KeysData_317; + public ImGuiKeyData KeysData_318; + public ImGuiKeyData KeysData_319; + public ImGuiKeyData KeysData_320; + public ImGuiKeyData KeysData_321; + public ImGuiKeyData KeysData_322; + public ImGuiKeyData KeysData_323; + public ImGuiKeyData KeysData_324; + public ImGuiKeyData KeysData_325; + public ImGuiKeyData KeysData_326; + public ImGuiKeyData KeysData_327; + public ImGuiKeyData KeysData_328; + public ImGuiKeyData KeysData_329; + public ImGuiKeyData KeysData_330; + public ImGuiKeyData KeysData_331; + public ImGuiKeyData KeysData_332; + public ImGuiKeyData KeysData_333; + public ImGuiKeyData KeysData_334; + public ImGuiKeyData KeysData_335; + public ImGuiKeyData KeysData_336; + public ImGuiKeyData KeysData_337; + public ImGuiKeyData KeysData_338; + public ImGuiKeyData KeysData_339; + public ImGuiKeyData KeysData_340; + public ImGuiKeyData KeysData_341; + public ImGuiKeyData KeysData_342; + public ImGuiKeyData KeysData_343; + public ImGuiKeyData KeysData_344; + public ImGuiKeyData KeysData_345; + public ImGuiKeyData KeysData_346; + public ImGuiKeyData KeysData_347; + public ImGuiKeyData KeysData_348; + public ImGuiKeyData KeysData_349; + public ImGuiKeyData KeysData_350; + public ImGuiKeyData KeysData_351; + public ImGuiKeyData KeysData_352; + public ImGuiKeyData KeysData_353; + public ImGuiKeyData KeysData_354; + public ImGuiKeyData KeysData_355; + public ImGuiKeyData KeysData_356; + public ImGuiKeyData KeysData_357; + public ImGuiKeyData KeysData_358; + public ImGuiKeyData KeysData_359; + public ImGuiKeyData KeysData_360; + public ImGuiKeyData KeysData_361; + public ImGuiKeyData KeysData_362; + public ImGuiKeyData KeysData_363; + public ImGuiKeyData KeysData_364; + public ImGuiKeyData KeysData_365; + public ImGuiKeyData KeysData_366; + public ImGuiKeyData KeysData_367; + public ImGuiKeyData KeysData_368; + public ImGuiKeyData KeysData_369; + public ImGuiKeyData KeysData_370; + public ImGuiKeyData KeysData_371; + public ImGuiKeyData KeysData_372; + public ImGuiKeyData KeysData_373; + public ImGuiKeyData KeysData_374; + public ImGuiKeyData KeysData_375; + public ImGuiKeyData KeysData_376; + public ImGuiKeyData KeysData_377; + public ImGuiKeyData KeysData_378; + public ImGuiKeyData KeysData_379; + public ImGuiKeyData KeysData_380; + public ImGuiKeyData KeysData_381; + public ImGuiKeyData KeysData_382; + public ImGuiKeyData KeysData_383; + public ImGuiKeyData KeysData_384; + public ImGuiKeyData KeysData_385; + public ImGuiKeyData KeysData_386; + public ImGuiKeyData KeysData_387; + public ImGuiKeyData KeysData_388; + public ImGuiKeyData KeysData_389; + public ImGuiKeyData KeysData_390; + public ImGuiKeyData KeysData_391; + public ImGuiKeyData KeysData_392; + public ImGuiKeyData KeysData_393; + public ImGuiKeyData KeysData_394; + public ImGuiKeyData KeysData_395; + public ImGuiKeyData KeysData_396; + public ImGuiKeyData KeysData_397; + public ImGuiKeyData KeysData_398; + public ImGuiKeyData KeysData_399; + public ImGuiKeyData KeysData_400; + public ImGuiKeyData KeysData_401; + public ImGuiKeyData KeysData_402; + public ImGuiKeyData KeysData_403; + public ImGuiKeyData KeysData_404; + public ImGuiKeyData KeysData_405; + public ImGuiKeyData KeysData_406; + public ImGuiKeyData KeysData_407; + public ImGuiKeyData KeysData_408; + public ImGuiKeyData KeysData_409; + public ImGuiKeyData KeysData_410; + public ImGuiKeyData KeysData_411; + public ImGuiKeyData KeysData_412; + public ImGuiKeyData KeysData_413; + public ImGuiKeyData KeysData_414; + public ImGuiKeyData KeysData_415; + public ImGuiKeyData KeysData_416; + public ImGuiKeyData KeysData_417; + public ImGuiKeyData KeysData_418; + public ImGuiKeyData KeysData_419; + public ImGuiKeyData KeysData_420; + public ImGuiKeyData KeysData_421; + public ImGuiKeyData KeysData_422; + public ImGuiKeyData KeysData_423; + public ImGuiKeyData KeysData_424; + public ImGuiKeyData KeysData_425; + public ImGuiKeyData KeysData_426; + public ImGuiKeyData KeysData_427; + public ImGuiKeyData KeysData_428; + public ImGuiKeyData KeysData_429; + public ImGuiKeyData KeysData_430; + public ImGuiKeyData KeysData_431; + public ImGuiKeyData KeysData_432; + public ImGuiKeyData KeysData_433; + public ImGuiKeyData KeysData_434; + public ImGuiKeyData KeysData_435; + public ImGuiKeyData KeysData_436; + public ImGuiKeyData KeysData_437; + public ImGuiKeyData KeysData_438; + public ImGuiKeyData KeysData_439; + public ImGuiKeyData KeysData_440; + public ImGuiKeyData KeysData_441; + public ImGuiKeyData KeysData_442; + public ImGuiKeyData KeysData_443; + public ImGuiKeyData KeysData_444; + public ImGuiKeyData KeysData_445; + public ImGuiKeyData KeysData_446; + public ImGuiKeyData KeysData_447; + public ImGuiKeyData KeysData_448; + public ImGuiKeyData KeysData_449; + public ImGuiKeyData KeysData_450; + public ImGuiKeyData KeysData_451; + public ImGuiKeyData KeysData_452; + public ImGuiKeyData KeysData_453; + public ImGuiKeyData KeysData_454; + public ImGuiKeyData KeysData_455; + public ImGuiKeyData KeysData_456; + public ImGuiKeyData KeysData_457; + public ImGuiKeyData KeysData_458; + public ImGuiKeyData KeysData_459; + public ImGuiKeyData KeysData_460; + public ImGuiKeyData KeysData_461; + public ImGuiKeyData KeysData_462; + public ImGuiKeyData KeysData_463; + public ImGuiKeyData KeysData_464; + public ImGuiKeyData KeysData_465; + public ImGuiKeyData KeysData_466; + public ImGuiKeyData KeysData_467; + public ImGuiKeyData KeysData_468; + public ImGuiKeyData KeysData_469; + public ImGuiKeyData KeysData_470; + public ImGuiKeyData KeysData_471; + public ImGuiKeyData KeysData_472; + public ImGuiKeyData KeysData_473; + public ImGuiKeyData KeysData_474; + public ImGuiKeyData KeysData_475; + public ImGuiKeyData KeysData_476; + public ImGuiKeyData KeysData_477; + public ImGuiKeyData KeysData_478; + public ImGuiKeyData KeysData_479; + public ImGuiKeyData KeysData_480; + public ImGuiKeyData KeysData_481; + public ImGuiKeyData KeysData_482; + public ImGuiKeyData KeysData_483; + public ImGuiKeyData KeysData_484; + public ImGuiKeyData KeysData_485; + public ImGuiKeyData KeysData_486; + public ImGuiKeyData KeysData_487; + public ImGuiKeyData KeysData_488; + public ImGuiKeyData KeysData_489; + public ImGuiKeyData KeysData_490; + public ImGuiKeyData KeysData_491; + public ImGuiKeyData KeysData_492; + public ImGuiKeyData KeysData_493; + public ImGuiKeyData KeysData_494; + public ImGuiKeyData KeysData_495; + public ImGuiKeyData KeysData_496; + public ImGuiKeyData KeysData_497; + public ImGuiKeyData KeysData_498; + public ImGuiKeyData KeysData_499; + public ImGuiKeyData KeysData_500; + public ImGuiKeyData KeysData_501; + public ImGuiKeyData KeysData_502; + public ImGuiKeyData KeysData_503; + public ImGuiKeyData KeysData_504; + public ImGuiKeyData KeysData_505; + public ImGuiKeyData KeysData_506; + public ImGuiKeyData KeysData_507; + public ImGuiKeyData KeysData_508; + public ImGuiKeyData KeysData_509; + public ImGuiKeyData KeysData_510; + public ImGuiKeyData KeysData_511; + public ImGuiKeyData KeysData_512; + public ImGuiKeyData KeysData_513; + public ImGuiKeyData KeysData_514; + public ImGuiKeyData KeysData_515; + public ImGuiKeyData KeysData_516; + public ImGuiKeyData KeysData_517; + public ImGuiKeyData KeysData_518; + public ImGuiKeyData KeysData_519; + public ImGuiKeyData KeysData_520; + public ImGuiKeyData KeysData_521; + public ImGuiKeyData KeysData_522; + public ImGuiKeyData KeysData_523; + public ImGuiKeyData KeysData_524; + public ImGuiKeyData KeysData_525; + public ImGuiKeyData KeysData_526; + public ImGuiKeyData KeysData_527; + public ImGuiKeyData KeysData_528; + public ImGuiKeyData KeysData_529; + public ImGuiKeyData KeysData_530; + public ImGuiKeyData KeysData_531; + public ImGuiKeyData KeysData_532; + public ImGuiKeyData KeysData_533; + public ImGuiKeyData KeysData_534; + public ImGuiKeyData KeysData_535; + public ImGuiKeyData KeysData_536; + public ImGuiKeyData KeysData_537; + public ImGuiKeyData KeysData_538; + public ImGuiKeyData KeysData_539; + public ImGuiKeyData KeysData_540; + public ImGuiKeyData KeysData_541; + public ImGuiKeyData KeysData_542; + public ImGuiKeyData KeysData_543; + public ImGuiKeyData KeysData_544; + public ImGuiKeyData KeysData_545; + public ImGuiKeyData KeysData_546; + public ImGuiKeyData KeysData_547; + public ImGuiKeyData KeysData_548; + public ImGuiKeyData KeysData_549; + public ImGuiKeyData KeysData_550; + public ImGuiKeyData KeysData_551; + public ImGuiKeyData KeysData_552; + public ImGuiKeyData KeysData_553; + public ImGuiKeyData KeysData_554; + public ImGuiKeyData KeysData_555; + public ImGuiKeyData KeysData_556; + public ImGuiKeyData KeysData_557; + public ImGuiKeyData KeysData_558; + public ImGuiKeyData KeysData_559; + public ImGuiKeyData KeysData_560; + public ImGuiKeyData KeysData_561; + public ImGuiKeyData KeysData_562; + public ImGuiKeyData KeysData_563; + public ImGuiKeyData KeysData_564; + public ImGuiKeyData KeysData_565; + public ImGuiKeyData KeysData_566; + public ImGuiKeyData KeysData_567; + public ImGuiKeyData KeysData_568; + public ImGuiKeyData KeysData_569; + public ImGuiKeyData KeysData_570; + public ImGuiKeyData KeysData_571; + public ImGuiKeyData KeysData_572; + public ImGuiKeyData KeysData_573; + public ImGuiKeyData KeysData_574; + public ImGuiKeyData KeysData_575; + public ImGuiKeyData KeysData_576; + public ImGuiKeyData KeysData_577; + public ImGuiKeyData KeysData_578; + public ImGuiKeyData KeysData_579; + public ImGuiKeyData KeysData_580; + public ImGuiKeyData KeysData_581; + public ImGuiKeyData KeysData_582; + public ImGuiKeyData KeysData_583; + public ImGuiKeyData KeysData_584; + public ImGuiKeyData KeysData_585; + public ImGuiKeyData KeysData_586; + public ImGuiKeyData KeysData_587; + public ImGuiKeyData KeysData_588; + public ImGuiKeyData KeysData_589; + public ImGuiKeyData KeysData_590; + public ImGuiKeyData KeysData_591; + public ImGuiKeyData KeysData_592; + public ImGuiKeyData KeysData_593; + public ImGuiKeyData KeysData_594; + public ImGuiKeyData KeysData_595; + public ImGuiKeyData KeysData_596; + public ImGuiKeyData KeysData_597; + public ImGuiKeyData KeysData_598; + public ImGuiKeyData KeysData_599; + public ImGuiKeyData KeysData_600; + public ImGuiKeyData KeysData_601; + public ImGuiKeyData KeysData_602; + public ImGuiKeyData KeysData_603; + public ImGuiKeyData KeysData_604; + public ImGuiKeyData KeysData_605; + public ImGuiKeyData KeysData_606; + public ImGuiKeyData KeysData_607; + public ImGuiKeyData KeysData_608; + public ImGuiKeyData KeysData_609; + public ImGuiKeyData KeysData_610; + public ImGuiKeyData KeysData_611; + public ImGuiKeyData KeysData_612; + public ImGuiKeyData KeysData_613; + public ImGuiKeyData KeysData_614; + public ImGuiKeyData KeysData_615; + public ImGuiKeyData KeysData_616; + public ImGuiKeyData KeysData_617; + public ImGuiKeyData KeysData_618; + public ImGuiKeyData KeysData_619; + public ImGuiKeyData KeysData_620; + public ImGuiKeyData KeysData_621; + public ImGuiKeyData KeysData_622; + public ImGuiKeyData KeysData_623; + public ImGuiKeyData KeysData_624; + public ImGuiKeyData KeysData_625; + public ImGuiKeyData KeysData_626; + public ImGuiKeyData KeysData_627; + public ImGuiKeyData KeysData_628; + public ImGuiKeyData KeysData_629; + public ImGuiKeyData KeysData_630; + public ImGuiKeyData KeysData_631; + public ImGuiKeyData KeysData_632; + public ImGuiKeyData KeysData_633; + public ImGuiKeyData KeysData_634; + public ImGuiKeyData KeysData_635; + public ImGuiKeyData KeysData_636; + public ImGuiKeyData KeysData_637; + public ImGuiKeyData KeysData_638; + public ImGuiKeyData KeysData_639; + public ImGuiKeyData KeysData_640; + public ImGuiKeyData KeysData_641; + public ImGuiKeyData KeysData_642; + public ImGuiKeyData KeysData_643; + public ImGuiKeyData KeysData_644; + public byte WantCaptureMouseUnlessPopupClose; public Vector2 MousePosPrev; public Vector2 MouseClickedPos_0; public Vector2 MouseClickedPos_1; @@ -76,9 +734,11 @@ public unsafe partial struct ImGuiIO public fixed double MouseClickedTime[5]; public fixed byte MouseClicked[5]; public fixed byte MouseDoubleClicked[5]; + public fixed ushort MouseClickedCount[5]; + public fixed ushort MouseClickedLastCount[5]; public fixed byte MouseReleased[5]; public fixed byte MouseDownOwned[5]; - public fixed byte MouseDownWasDoubleClick[5]; + public fixed byte MouseDownOwnedUnlessPopupClose[5]; public fixed float MouseDownDuration[5]; public fixed float MouseDownDurationPrev[5]; public Vector2 MouseDragMaxDistanceAbs_0; @@ -87,10 +747,13 @@ public unsafe partial struct ImGuiIO public Vector2 MouseDragMaxDistanceAbs_3; public Vector2 MouseDragMaxDistanceAbs_4; public fixed float MouseDragMaxDistanceSqr[5]; - public fixed float KeysDownDuration[512]; - public fixed float KeysDownDurationPrev[512]; - public fixed float NavInputsDownDuration[21]; - public fixed float NavInputsDownDurationPrev[21]; + public fixed float NavInputsDownDuration[20]; + public fixed float NavInputsDownDurationPrev[20]; + public float PenPressure; + public byte AppFocusLost; + public sbyte BackendUsingLegacyKeyArrays; + public byte BackendUsingLegacyNavInputArray; + public ushort InputQueueSurrogate; public ImVector InputQueueCharacters; } public unsafe partial struct ImGuiIOPtr @@ -101,86 +764,110 @@ public unsafe partial struct ImGuiIOPtr public static implicit operator ImGuiIOPtr(ImGuiIO* nativePtr) => new ImGuiIOPtr(nativePtr); public static implicit operator ImGuiIO* (ImGuiIOPtr wrappedPtr) => wrappedPtr.NativePtr; public static implicit operator ImGuiIOPtr(IntPtr nativePtr) => new ImGuiIOPtr(nativePtr); - public ref ImGuiConfigFlags ConfigFlags => ref Unsafe.AsRef(&NativePtr->ConfigFlags); - public ref ImGuiBackendFlags BackendFlags => ref Unsafe.AsRef(&NativePtr->BackendFlags); - public ref Vector2 DisplaySize => ref Unsafe.AsRef(&NativePtr->DisplaySize); - public ref float DeltaTime => ref Unsafe.AsRef(&NativePtr->DeltaTime); - public ref float IniSavingRate => ref Unsafe.AsRef(&NativePtr->IniSavingRate); + public ref ImGuiConfigFlags ConfigFlags => ref UnsafeUtility.AsRef(&NativePtr->ConfigFlags); + public ref ImGuiBackendFlags BackendFlags => ref UnsafeUtility.AsRef(&NativePtr->BackendFlags); + public ref Vector2 DisplaySize => ref UnsafeUtility.AsRef(&NativePtr->DisplaySize); + public ref float DeltaTime => ref UnsafeUtility.AsRef(&NativePtr->DeltaTime); + public ref float IniSavingRate => ref UnsafeUtility.AsRef(&NativePtr->IniSavingRate); public NullTerminatedString IniFilename => new NullTerminatedString(NativePtr->IniFilename); public NullTerminatedString LogFilename => new NullTerminatedString(NativePtr->LogFilename); - public ref float MouseDoubleClickTime => ref Unsafe.AsRef(&NativePtr->MouseDoubleClickTime); - public ref float MouseDoubleClickMaxDist => ref Unsafe.AsRef(&NativePtr->MouseDoubleClickMaxDist); - public ref float MouseDragThreshold => ref Unsafe.AsRef(&NativePtr->MouseDragThreshold); - public RangeAccessor KeyMap => new RangeAccessor(NativePtr->KeyMap, 22); - public ref float KeyRepeatDelay => ref Unsafe.AsRef(&NativePtr->KeyRepeatDelay); - public ref float KeyRepeatRate => ref Unsafe.AsRef(&NativePtr->KeyRepeatRate); + public ref float MouseDoubleClickTime => ref UnsafeUtility.AsRef(&NativePtr->MouseDoubleClickTime); + public ref float MouseDoubleClickMaxDist => ref UnsafeUtility.AsRef(&NativePtr->MouseDoubleClickMaxDist); + public ref float MouseDragThreshold => ref UnsafeUtility.AsRef(&NativePtr->MouseDragThreshold); + public ref float KeyRepeatDelay => ref UnsafeUtility.AsRef(&NativePtr->KeyRepeatDelay); + public ref float KeyRepeatRate => ref UnsafeUtility.AsRef(&NativePtr->KeyRepeatRate); public IntPtr UserData { get => (IntPtr)NativePtr->UserData; set => NativePtr->UserData = (void*)value; } public ImFontAtlasPtr Fonts => new ImFontAtlasPtr(NativePtr->Fonts); - public ref float FontGlobalScale => ref Unsafe.AsRef(&NativePtr->FontGlobalScale); - public ref bool FontAllowUserScaling => ref Unsafe.AsRef(&NativePtr->FontAllowUserScaling); + public ref float FontGlobalScale => ref UnsafeUtility.AsRef(&NativePtr->FontGlobalScale); + public ref bool FontAllowUserScaling => ref UnsafeUtility.AsRef(&NativePtr->FontAllowUserScaling); public ImFontPtr FontDefault => new ImFontPtr(NativePtr->FontDefault); - public ref Vector2 DisplayFramebufferScale => ref Unsafe.AsRef(&NativePtr->DisplayFramebufferScale); - public ref bool MouseDrawCursor => ref Unsafe.AsRef(&NativePtr->MouseDrawCursor); - public ref bool ConfigMacOSXBehaviors => ref Unsafe.AsRef(&NativePtr->ConfigMacOSXBehaviors); - public ref bool ConfigInputTextCursorBlink => ref Unsafe.AsRef(&NativePtr->ConfigInputTextCursorBlink); - public ref bool ConfigWindowsResizeFromEdges => ref Unsafe.AsRef(&NativePtr->ConfigWindowsResizeFromEdges); - public ref bool ConfigWindowsMoveFromTitleBarOnly => ref Unsafe.AsRef(&NativePtr->ConfigWindowsMoveFromTitleBarOnly); - public ref float ConfigWindowsMemoryCompactTimer => ref Unsafe.AsRef(&NativePtr->ConfigWindowsMemoryCompactTimer); + public ref Vector2 DisplayFramebufferScale => ref UnsafeUtility.AsRef(&NativePtr->DisplayFramebufferScale); + public ref bool ConfigDockingNoSplit => ref UnsafeUtility.AsRef(&NativePtr->ConfigDockingNoSplit); + public ref bool ConfigDockingWithShift => ref UnsafeUtility.AsRef(&NativePtr->ConfigDockingWithShift); + public ref bool ConfigDockingAlwaysTabBar => ref UnsafeUtility.AsRef(&NativePtr->ConfigDockingAlwaysTabBar); + public ref bool ConfigDockingTransparentPayload => ref UnsafeUtility.AsRef(&NativePtr->ConfigDockingTransparentPayload); + public ref bool ConfigViewportsNoAutoMerge => ref UnsafeUtility.AsRef(&NativePtr->ConfigViewportsNoAutoMerge); + public ref bool ConfigViewportsNoTaskBarIcon => ref UnsafeUtility.AsRef(&NativePtr->ConfigViewportsNoTaskBarIcon); + public ref bool ConfigViewportsNoDecoration => ref UnsafeUtility.AsRef(&NativePtr->ConfigViewportsNoDecoration); + public ref bool ConfigViewportsNoDefaultParent => ref UnsafeUtility.AsRef(&NativePtr->ConfigViewportsNoDefaultParent); + public ref bool MouseDrawCursor => ref UnsafeUtility.AsRef(&NativePtr->MouseDrawCursor); + public ref bool ConfigMacOSXBehaviors => ref UnsafeUtility.AsRef(&NativePtr->ConfigMacOSXBehaviors); + public ref bool ConfigInputTrickleEventQueue => ref UnsafeUtility.AsRef(&NativePtr->ConfigInputTrickleEventQueue); + public ref bool ConfigInputTextCursorBlink => ref UnsafeUtility.AsRef(&NativePtr->ConfigInputTextCursorBlink); + public ref bool ConfigDragClickToInputText => ref UnsafeUtility.AsRef(&NativePtr->ConfigDragClickToInputText); + public ref bool ConfigWindowsResizeFromEdges => ref UnsafeUtility.AsRef(&NativePtr->ConfigWindowsResizeFromEdges); + public ref bool ConfigWindowsMoveFromTitleBarOnly => ref UnsafeUtility.AsRef(&NativePtr->ConfigWindowsMoveFromTitleBarOnly); + public ref float ConfigMemoryCompactTimer => ref UnsafeUtility.AsRef(&NativePtr->ConfigMemoryCompactTimer); public NullTerminatedString BackendPlatformName => new NullTerminatedString(NativePtr->BackendPlatformName); public NullTerminatedString BackendRendererName => new NullTerminatedString(NativePtr->BackendRendererName); public IntPtr BackendPlatformUserData { get => (IntPtr)NativePtr->BackendPlatformUserData; set => NativePtr->BackendPlatformUserData = (void*)value; } public IntPtr BackendRendererUserData { get => (IntPtr)NativePtr->BackendRendererUserData; set => NativePtr->BackendRendererUserData = (void*)value; } public IntPtr BackendLanguageUserData { get => (IntPtr)NativePtr->BackendLanguageUserData; set => NativePtr->BackendLanguageUserData = (void*)value; } - public ref IntPtr GetClipboardTextFn => ref Unsafe.AsRef(&NativePtr->GetClipboardTextFn); - public ref IntPtr SetClipboardTextFn => ref Unsafe.AsRef(&NativePtr->SetClipboardTextFn); + public ref IntPtr GetClipboardTextFn => ref UnsafeUtility.AsRef(&NativePtr->GetClipboardTextFn); + public ref IntPtr SetClipboardTextFn => ref UnsafeUtility.AsRef(&NativePtr->SetClipboardTextFn); public IntPtr ClipboardUserData { get => (IntPtr)NativePtr->ClipboardUserData; set => NativePtr->ClipboardUserData = (void*)value; } - public ref IntPtr ImeSetInputScreenPosFn => ref Unsafe.AsRef(&NativePtr->ImeSetInputScreenPosFn); - public IntPtr ImeWindowHandle { get => (IntPtr)NativePtr->ImeWindowHandle; set => NativePtr->ImeWindowHandle = (void*)value; } - public IntPtr RenderDrawListsFnUnused { get => (IntPtr)NativePtr->RenderDrawListsFnUnused; set => NativePtr->RenderDrawListsFnUnused = (void*)value; } - public ref Vector2 MousePos => ref Unsafe.AsRef(&NativePtr->MousePos); - public RangeAccessor MouseDown => new RangeAccessor(NativePtr->MouseDown, 5); - public ref float MouseWheel => ref Unsafe.AsRef(&NativePtr->MouseWheel); - public ref float MouseWheelH => ref Unsafe.AsRef(&NativePtr->MouseWheelH); - public ref bool KeyCtrl => ref Unsafe.AsRef(&NativePtr->KeyCtrl); - public ref bool KeyShift => ref Unsafe.AsRef(&NativePtr->KeyShift); - public ref bool KeyAlt => ref Unsafe.AsRef(&NativePtr->KeyAlt); - public ref bool KeySuper => ref Unsafe.AsRef(&NativePtr->KeySuper); + public ref IntPtr SetPlatformImeDataFn => ref UnsafeUtility.AsRef(&NativePtr->SetPlatformImeDataFn); + public IntPtr _UnusedPadding { get => (IntPtr)NativePtr->_UnusedPadding; set => NativePtr->_UnusedPadding = (void*)value; } + public ref bool WantCaptureMouse => ref UnsafeUtility.AsRef(&NativePtr->WantCaptureMouse); + public ref bool WantCaptureKeyboard => ref UnsafeUtility.AsRef(&NativePtr->WantCaptureKeyboard); + public ref bool WantTextInput => ref UnsafeUtility.AsRef(&NativePtr->WantTextInput); + public ref bool WantSetMousePos => ref UnsafeUtility.AsRef(&NativePtr->WantSetMousePos); + public ref bool WantSaveIniSettings => ref UnsafeUtility.AsRef(&NativePtr->WantSaveIniSettings); + public ref bool NavActive => ref UnsafeUtility.AsRef(&NativePtr->NavActive); + public ref bool NavVisible => ref UnsafeUtility.AsRef(&NativePtr->NavVisible); + public ref float Framerate => ref UnsafeUtility.AsRef(&NativePtr->Framerate); + public ref int MetricsRenderVertices => ref UnsafeUtility.AsRef(&NativePtr->MetricsRenderVertices); + public ref int MetricsRenderIndices => ref UnsafeUtility.AsRef(&NativePtr->MetricsRenderIndices); + public ref int MetricsRenderWindows => ref UnsafeUtility.AsRef(&NativePtr->MetricsRenderWindows); + public ref int MetricsActiveWindows => ref UnsafeUtility.AsRef(&NativePtr->MetricsActiveWindows); + public ref int MetricsActiveAllocations => ref UnsafeUtility.AsRef(&NativePtr->MetricsActiveAllocations); + public ref Vector2 MouseDelta => ref UnsafeUtility.AsRef(&NativePtr->MouseDelta); + public RangeAccessor KeyMap => new RangeAccessor(NativePtr->KeyMap, 645); public RangeAccessor KeysDown => new RangeAccessor(NativePtr->KeysDown, 512); - public RangeAccessor NavInputs => new RangeAccessor(NativePtr->NavInputs, 21); - public ref bool WantCaptureMouse => ref Unsafe.AsRef(&NativePtr->WantCaptureMouse); - public ref bool WantCaptureKeyboard => ref Unsafe.AsRef(&NativePtr->WantCaptureKeyboard); - public ref bool WantTextInput => ref Unsafe.AsRef(&NativePtr->WantTextInput); - public ref bool WantSetMousePos => ref Unsafe.AsRef(&NativePtr->WantSetMousePos); - public ref bool WantSaveIniSettings => ref Unsafe.AsRef(&NativePtr->WantSaveIniSettings); - public ref bool NavActive => ref Unsafe.AsRef(&NativePtr->NavActive); - public ref bool NavVisible => ref Unsafe.AsRef(&NativePtr->NavVisible); - public ref float Framerate => ref Unsafe.AsRef(&NativePtr->Framerate); - public ref int MetricsRenderVertices => ref Unsafe.AsRef(&NativePtr->MetricsRenderVertices); - public ref int MetricsRenderIndices => ref Unsafe.AsRef(&NativePtr->MetricsRenderIndices); - public ref int MetricsRenderWindows => ref Unsafe.AsRef(&NativePtr->MetricsRenderWindows); - public ref int MetricsActiveWindows => ref Unsafe.AsRef(&NativePtr->MetricsActiveWindows); - public ref int MetricsActiveAllocations => ref Unsafe.AsRef(&NativePtr->MetricsActiveAllocations); - public ref Vector2 MouseDelta => ref Unsafe.AsRef(&NativePtr->MouseDelta); - public ref Vector2 MousePosPrev => ref Unsafe.AsRef(&NativePtr->MousePosPrev); + public ref Vector2 MousePos => ref UnsafeUtility.AsRef(&NativePtr->MousePos); + public RangeAccessor MouseDown => new RangeAccessor(NativePtr->MouseDown, 5); + public ref float MouseWheel => ref UnsafeUtility.AsRef(&NativePtr->MouseWheel); + public ref float MouseWheelH => ref UnsafeUtility.AsRef(&NativePtr->MouseWheelH); + public ref uint MouseHoveredViewport => ref UnsafeUtility.AsRef(&NativePtr->MouseHoveredViewport); + public ref bool KeyCtrl => ref UnsafeUtility.AsRef(&NativePtr->KeyCtrl); + public ref bool KeyShift => ref UnsafeUtility.AsRef(&NativePtr->KeyShift); + public ref bool KeyAlt => ref UnsafeUtility.AsRef(&NativePtr->KeyAlt); + public ref bool KeySuper => ref UnsafeUtility.AsRef(&NativePtr->KeySuper); + public RangeAccessor NavInputs => new RangeAccessor(NativePtr->NavInputs, 20); + public ref ImGuiKeyModFlags KeyMods => ref UnsafeUtility.AsRef(&NativePtr->KeyMods); + public ref ImGuiKeyModFlags KeyModsPrev => ref UnsafeUtility.AsRef(&NativePtr->KeyModsPrev); + public RangeAccessor KeysData => new RangeAccessor(&NativePtr->KeysData_0, 645); + public ref bool WantCaptureMouseUnlessPopupClose => ref UnsafeUtility.AsRef(&NativePtr->WantCaptureMouseUnlessPopupClose); + public ref Vector2 MousePosPrev => ref UnsafeUtility.AsRef(&NativePtr->MousePosPrev); public RangeAccessor MouseClickedPos => new RangeAccessor(&NativePtr->MouseClickedPos_0, 5); public RangeAccessor MouseClickedTime => new RangeAccessor(NativePtr->MouseClickedTime, 5); public RangeAccessor MouseClicked => new RangeAccessor(NativePtr->MouseClicked, 5); public RangeAccessor MouseDoubleClicked => new RangeAccessor(NativePtr->MouseDoubleClicked, 5); + public RangeAccessor MouseClickedCount => new RangeAccessor(NativePtr->MouseClickedCount, 5); + public RangeAccessor MouseClickedLastCount => new RangeAccessor(NativePtr->MouseClickedLastCount, 5); public RangeAccessor MouseReleased => new RangeAccessor(NativePtr->MouseReleased, 5); public RangeAccessor MouseDownOwned => new RangeAccessor(NativePtr->MouseDownOwned, 5); - public RangeAccessor MouseDownWasDoubleClick => new RangeAccessor(NativePtr->MouseDownWasDoubleClick, 5); + public RangeAccessor MouseDownOwnedUnlessPopupClose => new RangeAccessor(NativePtr->MouseDownOwnedUnlessPopupClose, 5); public RangeAccessor MouseDownDuration => new RangeAccessor(NativePtr->MouseDownDuration, 5); public RangeAccessor MouseDownDurationPrev => new RangeAccessor(NativePtr->MouseDownDurationPrev, 5); public RangeAccessor MouseDragMaxDistanceAbs => new RangeAccessor(&NativePtr->MouseDragMaxDistanceAbs_0, 5); public RangeAccessor MouseDragMaxDistanceSqr => new RangeAccessor(NativePtr->MouseDragMaxDistanceSqr, 5); - public RangeAccessor KeysDownDuration => new RangeAccessor(NativePtr->KeysDownDuration, 512); - 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 RangeAccessor NavInputsDownDuration => new RangeAccessor(NativePtr->NavInputsDownDuration, 20); + public RangeAccessor NavInputsDownDurationPrev => new RangeAccessor(NativePtr->NavInputsDownDurationPrev, 20); + public ref float PenPressure => ref UnsafeUtility.AsRef(&NativePtr->PenPressure); + public ref bool AppFocusLost => ref UnsafeUtility.AsRef(&NativePtr->AppFocusLost); + public ref sbyte BackendUsingLegacyKeyArrays => ref UnsafeUtility.AsRef(&NativePtr->BackendUsingLegacyKeyArrays); + public ref bool BackendUsingLegacyNavInputArray => ref UnsafeUtility.AsRef(&NativePtr->BackendUsingLegacyNavInputArray); + public ref ushort InputQueueSurrogate => ref UnsafeUtility.AsRef(&NativePtr->InputQueueSurrogate); public ImVector InputQueueCharacters => new ImVector(NativePtr->InputQueueCharacters); + public void AddFocusEvent(bool focused) + { + byte native_focused = focused ? (byte)1 : (byte)0; + ImGuiNative.ImGuiIO_AddFocusEvent((ImGuiIO*)(NativePtr), native_focused); + } public void AddInputCharacter(uint c) { - ImGuiNative.ImGuiIO_AddInputCharacter(NativePtr, c); + ImGuiNative.ImGuiIO_AddInputCharacter((ImGuiIO*)(NativePtr), c); } public void AddInputCharactersUTF8(string str) { @@ -202,19 +889,63 @@ public void AddInputCharactersUTF8(string str) native_str[native_str_offset] = 0; } else { native_str = null; } - ImGuiNative.ImGuiIO_AddInputCharactersUTF8(NativePtr, native_str); + ImGuiNative.ImGuiIO_AddInputCharactersUTF8((ImGuiIO*)(NativePtr), native_str); if (str_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_str); } } + public void AddInputCharacterUTF16(ushort c) + { + ImGuiNative.ImGuiIO_AddInputCharacterUTF16((ImGuiIO*)(NativePtr), c); + } + public void AddKeyAnalogEvent(ImGuiKey key, bool down, float v) + { + byte native_down = down ? (byte)1 : (byte)0; + ImGuiNative.ImGuiIO_AddKeyAnalogEvent((ImGuiIO*)(NativePtr), key, native_down, v); + } + public void AddKeyEvent(ImGuiKey key, bool down) + { + byte native_down = down ? (byte)1 : (byte)0; + ImGuiNative.ImGuiIO_AddKeyEvent((ImGuiIO*)(NativePtr), key, native_down); + } + public void AddMouseButtonEvent(int button, bool down) + { + byte native_down = down ? (byte)1 : (byte)0; + ImGuiNative.ImGuiIO_AddMouseButtonEvent((ImGuiIO*)(NativePtr), button, native_down); + } + public void AddMousePosEvent(float x, float y) + { + ImGuiNative.ImGuiIO_AddMousePosEvent((ImGuiIO*)(NativePtr), x, y); + } + public void AddMouseViewportEvent(uint id) + { + ImGuiNative.ImGuiIO_AddMouseViewportEvent((ImGuiIO*)(NativePtr), id); + } + public void AddMouseWheelEvent(float wh_x, float wh_y) + { + ImGuiNative.ImGuiIO_AddMouseWheelEvent((ImGuiIO*)(NativePtr), wh_x, wh_y); + } public void ClearInputCharacters() { - ImGuiNative.ImGuiIO_ClearInputCharacters(NativePtr); + ImGuiNative.ImGuiIO_ClearInputCharacters((ImGuiIO*)(NativePtr)); + } + public void ClearInputKeys() + { + ImGuiNative.ImGuiIO_ClearInputKeys((ImGuiIO*)(NativePtr)); } public void Destroy() { - ImGuiNative.ImGuiIO_destroy(NativePtr); + ImGuiNative.ImGuiIO_destroy((ImGuiIO*)(NativePtr)); + } + public void SetKeyEventNativeData(ImGuiKey key, int native_keycode, int native_scancode) + { + int native_legacy_index = -1; + ImGuiNative.ImGuiIO_SetKeyEventNativeData((ImGuiIO*)(NativePtr), key, native_keycode, native_scancode, native_legacy_index); + } + public void SetKeyEventNativeData(ImGuiKey key, int native_keycode, int native_scancode, int native_legacy_index) + { + ImGuiNative.ImGuiIO_SetKeyEventNativeData((ImGuiIO*)(NativePtr), key, native_keycode, native_scancode, native_legacy_index); } } } diff --git a/ImGuiNET/Wrapper/Generated/ImGuiInputTextCallbackData.gen.cs b/ImGuiNET/Wrapper/Generated/ImGuiInputTextCallbackData.gen.cs index 23b7eee..e9f2da5 100644 --- a/ImGuiNET/Wrapper/Generated/ImGuiInputTextCallbackData.gen.cs +++ b/ImGuiNET/Wrapper/Generated/ImGuiInputTextCallbackData.gen.cs @@ -1,7 +1,7 @@ using System; -using System.Runtime.CompilerServices; -using System.Text; using UnityEngine; +using Unity.Collections.LowLevel.Unsafe; +using System.Text; namespace ImGuiNET { @@ -28,29 +28,33 @@ public unsafe partial struct ImGuiInputTextCallbackDataPtr public static implicit operator ImGuiInputTextCallbackDataPtr(ImGuiInputTextCallbackData* nativePtr) => new ImGuiInputTextCallbackDataPtr(nativePtr); public static implicit operator ImGuiInputTextCallbackData* (ImGuiInputTextCallbackDataPtr wrappedPtr) => wrappedPtr.NativePtr; public static implicit operator ImGuiInputTextCallbackDataPtr(IntPtr nativePtr) => new ImGuiInputTextCallbackDataPtr(nativePtr); - public ref ImGuiInputTextFlags EventFlag => ref Unsafe.AsRef(&NativePtr->EventFlag); - public ref ImGuiInputTextFlags Flags => ref Unsafe.AsRef(&NativePtr->Flags); + public ref ImGuiInputTextFlags EventFlag => ref UnsafeUtility.AsRef(&NativePtr->EventFlag); + public ref ImGuiInputTextFlags Flags => ref UnsafeUtility.AsRef(&NativePtr->Flags); public IntPtr UserData { get => (IntPtr)NativePtr->UserData; set => NativePtr->UserData = (void*)value; } - public ref ushort EventChar => ref Unsafe.AsRef(&NativePtr->EventChar); - public ref ImGuiKey EventKey => ref Unsafe.AsRef(&NativePtr->EventKey); + public ref ushort EventChar => ref UnsafeUtility.AsRef(&NativePtr->EventChar); + public ref ImGuiKey EventKey => ref UnsafeUtility.AsRef(&NativePtr->EventKey); public IntPtr Buf { get => (IntPtr)NativePtr->Buf; set => NativePtr->Buf = (byte*)value; } - public ref int BufTextLen => ref Unsafe.AsRef(&NativePtr->BufTextLen); - public ref int BufSize => ref Unsafe.AsRef(&NativePtr->BufSize); - public ref bool BufDirty => ref Unsafe.AsRef(&NativePtr->BufDirty); - public ref int CursorPos => ref Unsafe.AsRef(&NativePtr->CursorPos); - public ref int SelectionStart => ref Unsafe.AsRef(&NativePtr->SelectionStart); - public ref int SelectionEnd => ref Unsafe.AsRef(&NativePtr->SelectionEnd); + public ref int BufTextLen => ref UnsafeUtility.AsRef(&NativePtr->BufTextLen); + public ref int BufSize => ref UnsafeUtility.AsRef(&NativePtr->BufSize); + public ref bool BufDirty => ref UnsafeUtility.AsRef(&NativePtr->BufDirty); + public ref int CursorPos => ref UnsafeUtility.AsRef(&NativePtr->CursorPos); + public ref int SelectionStart => ref UnsafeUtility.AsRef(&NativePtr->SelectionStart); + public ref int SelectionEnd => ref UnsafeUtility.AsRef(&NativePtr->SelectionEnd); + public void ClearSelection() + { + ImGuiNative.ImGuiInputTextCallbackData_ClearSelection((ImGuiInputTextCallbackData*)(NativePtr)); + } public void DeleteChars(int pos, int bytes_count) { - ImGuiNative.ImGuiInputTextCallbackData_DeleteChars(NativePtr, pos, bytes_count); + ImGuiNative.ImGuiInputTextCallbackData_DeleteChars((ImGuiInputTextCallbackData*)(NativePtr), pos, bytes_count); } public void Destroy() { - ImGuiNative.ImGuiInputTextCallbackData_destroy(NativePtr); + ImGuiNative.ImGuiInputTextCallbackData_destroy((ImGuiInputTextCallbackData*)(NativePtr)); } public bool HasSelection() { - byte ret = ImGuiNative.ImGuiInputTextCallbackData_HasSelection(NativePtr); + byte ret = ImGuiNative.ImGuiInputTextCallbackData_HasSelection((ImGuiInputTextCallbackData*)(NativePtr)); return ret != 0; } public void InsertChars(int pos, string text) @@ -74,11 +78,15 @@ public void InsertChars(int pos, string text) } else { native_text = null; } byte* native_text_end = null; - ImGuiNative.ImGuiInputTextCallbackData_InsertChars(NativePtr, pos, native_text, native_text_end); + ImGuiNative.ImGuiInputTextCallbackData_InsertChars((ImGuiInputTextCallbackData*)(NativePtr), pos, native_text, native_text_end); if (text_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_text); } } + public void SelectAll() + { + ImGuiNative.ImGuiInputTextCallbackData_SelectAll((ImGuiInputTextCallbackData*)(NativePtr)); + } } } diff --git a/ImGuiNET/Wrapper/Generated/ImGuiInputTextFlags.gen.cs b/ImGuiNET/Wrapper/Generated/ImGuiInputTextFlags.gen.cs index 3abb2dd..1b457b7 100644 --- a/ImGuiNET/Wrapper/Generated/ImGuiInputTextFlags.gen.cs +++ b/ImGuiNET/Wrapper/Generated/ImGuiInputTextFlags.gen.cs @@ -4,26 +4,25 @@ namespace ImGuiNET public enum ImGuiInputTextFlags { None = 0, - CharsDecimal = 1 << 0, - CharsHexadecimal = 1 << 1, - CharsUppercase = 1 << 2, - CharsNoBlank = 1 << 3, - AutoSelectAll = 1 << 4, - EnterReturnsTrue = 1 << 5, - CallbackCompletion = 1 << 6, - CallbackHistory = 1 << 7, - CallbackAlways = 1 << 8, - CallbackCharFilter = 1 << 9, - AllowTabInput = 1 << 10, - CtrlEnterForNewLine = 1 << 11, - NoHorizontalScroll = 1 << 12, - AlwaysInsertMode = 1 << 13, - ReadOnly = 1 << 14, - Password = 1 << 15, - NoUndoRedo = 1 << 16, - CharsScientific = 1 << 17, - CallbackResize = 1 << 18, - Multiline = 1 << 20, - NoMarkEdited = 1 << 21, + CharsDecimal = 1, + CharsHexadecimal = 2, + CharsUppercase = 4, + CharsNoBlank = 8, + AutoSelectAll = 16, + EnterReturnsTrue = 32, + CallbackCompletion = 64, + CallbackHistory = 128, + CallbackAlways = 256, + CallbackCharFilter = 512, + AllowTabInput = 1024, + CtrlEnterForNewLine = 2048, + NoHorizontalScroll = 4096, + AlwaysOverwrite = 8192, + ReadOnly = 16384, + Password = 32768, + NoUndoRedo = 65536, + CharsScientific = 131072, + CallbackResize = 262144, + CallbackEdit = 524288, } } diff --git a/ImGuiNET/Wrapper/Generated/ImGuiKey.gen.cs b/ImGuiNET/Wrapper/Generated/ImGuiKey.gen.cs index 91664c4..cbe2e94 100644 --- a/ImGuiNET/Wrapper/Generated/ImGuiKey.gen.cs +++ b/ImGuiNET/Wrapper/Generated/ImGuiKey.gen.cs @@ -2,28 +2,145 @@ namespace ImGuiNET { public enum ImGuiKey { - Tab = 0, - LeftArrow = 1, - RightArrow = 2, - UpArrow = 3, - DownArrow = 4, - PageUp = 5, - PageDown = 6, - Home = 7, - End = 8, - Insert = 9, - Delete = 10, - Backspace = 11, - Space = 12, - Enter = 13, - Escape = 14, - KeyPadEnter = 15, - A = 16, - C = 17, - V = 18, - X = 19, - Y = 20, - Z = 21, - COUNT = 22, + None = 0, + Tab = 512, + LeftArrow = 513, + RightArrow = 514, + UpArrow = 515, + DownArrow = 516, + PageUp = 517, + PageDown = 518, + Home = 519, + End = 520, + Insert = 521, + Delete = 522, + Backspace = 523, + Space = 524, + Enter = 525, + Escape = 526, + LeftCtrl = 527, + LeftShift = 528, + LeftAlt = 529, + LeftSuper = 530, + RightCtrl = 531, + RightShift = 532, + RightAlt = 533, + RightSuper = 534, + Menu = 535, + _0 = 536, + _1 = 537, + _2 = 538, + _3 = 539, + _4 = 540, + _5 = 541, + _6 = 542, + _7 = 543, + _8 = 544, + _9 = 545, + A = 546, + B = 547, + C = 548, + D = 549, + E = 550, + F = 551, + G = 552, + H = 553, + I = 554, + J = 555, + K = 556, + L = 557, + M = 558, + N = 559, + O = 560, + P = 561, + Q = 562, + R = 563, + S = 564, + T = 565, + U = 566, + V = 567, + W = 568, + X = 569, + Y = 570, + Z = 571, + F1 = 572, + F2 = 573, + F3 = 574, + F4 = 575, + F5 = 576, + F6 = 577, + F7 = 578, + F8 = 579, + F9 = 580, + F10 = 581, + F11 = 582, + F12 = 583, + Apostrophe = 584, + Comma = 585, + Minus = 586, + Period = 587, + Slash = 588, + Semicolon = 589, + Equal = 590, + LeftBracket = 591, + Backslash = 592, + RightBracket = 593, + GraveAccent = 594, + CapsLock = 595, + ScrollLock = 596, + NumLock = 597, + PrintScreen = 598, + Pause = 599, + Keypad0 = 600, + Keypad1 = 601, + Keypad2 = 602, + Keypad3 = 603, + Keypad4 = 604, + Keypad5 = 605, + Keypad6 = 606, + Keypad7 = 607, + Keypad8 = 608, + Keypad9 = 609, + KeypadDecimal = 610, + KeypadDivide = 611, + KeypadMultiply = 612, + KeypadSubtract = 613, + KeypadAdd = 614, + KeypadEnter = 615, + KeypadEqual = 616, + GamepadStart = 617, + GamepadBack = 618, + GamepadFaceUp = 619, + GamepadFaceDown = 620, + GamepadFaceLeft = 621, + GamepadFaceRight = 622, + GamepadDpadUp = 623, + GamepadDpadDown = 624, + GamepadDpadLeft = 625, + GamepadDpadRight = 626, + GamepadL1 = 627, + GamepadR1 = 628, + GamepadL2 = 629, + GamepadR2 = 630, + GamepadL3 = 631, + GamepadR3 = 632, + GamepadLStickUp = 633, + GamepadLStickDown = 634, + GamepadLStickLeft = 635, + GamepadLStickRight = 636, + GamepadRStickUp = 637, + GamepadRStickDown = 638, + GamepadRStickLeft = 639, + GamepadRStickRight = 640, + ModCtrl = 641, + ModShift = 642, + ModAlt = 643, + ModSuper = 644, + COUNT = 645, + NamedKey_BEGIN = 512, + NamedKey_END = 645, + NamedKey_COUNT = 133, + KeysData_SIZE = 645, + KeysData_OFFSET = 0, } } diff --git a/ImGuiNET/Wrapper/Generated/ImGuiKeyData.gen.cs b/ImGuiNET/Wrapper/Generated/ImGuiKeyData.gen.cs new file mode 100644 index 0000000..7ef46c0 --- /dev/null +++ b/ImGuiNET/Wrapper/Generated/ImGuiKeyData.gen.cs @@ -0,0 +1,28 @@ +using System; +using UnityEngine; +using Unity.Collections.LowLevel.Unsafe; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct ImGuiKeyData + { + public byte Down; + public float DownDuration; + public float DownDurationPrev; + public float AnalogValue; + } + public unsafe partial struct ImGuiKeyDataPtr + { + public ImGuiKeyData* NativePtr { get; } + public ImGuiKeyDataPtr(ImGuiKeyData* nativePtr) => NativePtr = nativePtr; + public ImGuiKeyDataPtr(IntPtr nativePtr) => NativePtr = (ImGuiKeyData*)nativePtr; + public static implicit operator ImGuiKeyDataPtr(ImGuiKeyData* nativePtr) => new ImGuiKeyDataPtr(nativePtr); + public static implicit operator ImGuiKeyData* (ImGuiKeyDataPtr wrappedPtr) => wrappedPtr.NativePtr; + public static implicit operator ImGuiKeyDataPtr(IntPtr nativePtr) => new ImGuiKeyDataPtr(nativePtr); + public ref bool Down => ref UnsafeUtility.AsRef(&NativePtr->Down); + public ref float DownDuration => ref UnsafeUtility.AsRef(&NativePtr->DownDuration); + public ref float DownDurationPrev => ref UnsafeUtility.AsRef(&NativePtr->DownDurationPrev); + public ref float AnalogValue => ref UnsafeUtility.AsRef(&NativePtr->AnalogValue); + } +} diff --git a/ImGuiNET/Wrapper/Generated/ImGuiKeyData.gen.cs.meta b/ImGuiNET/Wrapper/Generated/ImGuiKeyData.gen.cs.meta new file mode 100644 index 0000000..3041a0d --- /dev/null +++ b/ImGuiNET/Wrapper/Generated/ImGuiKeyData.gen.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c6fc4361ebe77fc4bad65fd0dc5af44b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/ImGuiNET/Wrapper/Generated/ImGuiKeyModFlags.gen.cs b/ImGuiNET/Wrapper/Generated/ImGuiKeyModFlags.gen.cs new file mode 100644 index 0000000..35fc28e --- /dev/null +++ b/ImGuiNET/Wrapper/Generated/ImGuiKeyModFlags.gen.cs @@ -0,0 +1,12 @@ +namespace ImGuiNET +{ + [System.Flags] + public enum ImGuiKeyModFlags + { + None = 0, + Ctrl = 1, + Shift = 2, + Alt = 4, + Super = 8, + } +} diff --git a/ImGuiNET/Wrapper/Generated/ImGuiKeyModFlags.gen.cs.meta b/ImGuiNET/Wrapper/Generated/ImGuiKeyModFlags.gen.cs.meta new file mode 100644 index 0000000..c261f00 --- /dev/null +++ b/ImGuiNET/Wrapper/Generated/ImGuiKeyModFlags.gen.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6e1509777633e734787b07c0f990949d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/ImGuiNET/Wrapper/Generated/ImGuiListClipper.gen.cs b/ImGuiNET/Wrapper/Generated/ImGuiListClipper.gen.cs index 943fcf0..9db3308 100644 --- a/ImGuiNET/Wrapper/Generated/ImGuiListClipper.gen.cs +++ b/ImGuiNET/Wrapper/Generated/ImGuiListClipper.gen.cs @@ -1,7 +1,7 @@ using System; -using System.Runtime.CompilerServices; -using System.Text; using UnityEngine; +using Unity.Collections.LowLevel.Unsafe; +using System.Text; namespace ImGuiNET { @@ -10,9 +10,9 @@ public unsafe partial struct ImGuiListClipper public int DisplayStart; public int DisplayEnd; public int ItemsCount; - public int StepNo; public float ItemsHeight; public float StartPosY; + public void* TempData; } public unsafe partial struct ImGuiListClipperPtr { @@ -22,32 +22,36 @@ public unsafe partial struct ImGuiListClipperPtr public static implicit operator ImGuiListClipperPtr(ImGuiListClipper* nativePtr) => new ImGuiListClipperPtr(nativePtr); public static implicit operator ImGuiListClipper* (ImGuiListClipperPtr wrappedPtr) => wrappedPtr.NativePtr; public static implicit operator ImGuiListClipperPtr(IntPtr nativePtr) => new ImGuiListClipperPtr(nativePtr); - public ref int DisplayStart => ref Unsafe.AsRef(&NativePtr->DisplayStart); - public ref int DisplayEnd => ref Unsafe.AsRef(&NativePtr->DisplayEnd); - public ref int ItemsCount => ref Unsafe.AsRef(&NativePtr->ItemsCount); - public ref int StepNo => ref Unsafe.AsRef(&NativePtr->StepNo); - public ref float ItemsHeight => ref Unsafe.AsRef(&NativePtr->ItemsHeight); - public ref float StartPosY => ref Unsafe.AsRef(&NativePtr->StartPosY); + public ref int DisplayStart => ref UnsafeUtility.AsRef(&NativePtr->DisplayStart); + public ref int DisplayEnd => ref UnsafeUtility.AsRef(&NativePtr->DisplayEnd); + public ref int ItemsCount => ref UnsafeUtility.AsRef(&NativePtr->ItemsCount); + public ref float ItemsHeight => ref UnsafeUtility.AsRef(&NativePtr->ItemsHeight); + public ref float StartPosY => ref UnsafeUtility.AsRef(&NativePtr->StartPosY); + public IntPtr TempData { get => (IntPtr)NativePtr->TempData; set => NativePtr->TempData = (void*)value; } public void Begin(int items_count) { float items_height = -1.0f; - ImGuiNative.ImGuiListClipper_Begin(NativePtr, items_count, items_height); + ImGuiNative.ImGuiListClipper_Begin((ImGuiListClipper*)(NativePtr), items_count, items_height); } public void Begin(int items_count, float items_height) { - ImGuiNative.ImGuiListClipper_Begin(NativePtr, items_count, items_height); + ImGuiNative.ImGuiListClipper_Begin((ImGuiListClipper*)(NativePtr), items_count, items_height); } public void Destroy() { - ImGuiNative.ImGuiListClipper_destroy(NativePtr); + ImGuiNative.ImGuiListClipper_destroy((ImGuiListClipper*)(NativePtr)); } public void End() { - ImGuiNative.ImGuiListClipper_End(NativePtr); + ImGuiNative.ImGuiListClipper_End((ImGuiListClipper*)(NativePtr)); + } + public void ForceDisplayRangeByIndices(int item_min, int item_max) + { + ImGuiNative.ImGuiListClipper_ForceDisplayRangeByIndices((ImGuiListClipper*)(NativePtr), item_min, item_max); } public bool Step() { - byte ret = ImGuiNative.ImGuiListClipper_Step(NativePtr); + byte ret = ImGuiNative.ImGuiListClipper_Step((ImGuiListClipper*)(NativePtr)); return ret != 0; } } diff --git a/ImGuiNET/Wrapper/Generated/ImGuiNative.gen.cs b/ImGuiNET/Wrapper/Generated/ImGuiNative.gen.cs index d4c5588..55e8d7c 100644 --- a/ImGuiNET/Wrapper/Generated/ImGuiNative.gen.cs +++ b/ImGuiNET/Wrapper/Generated/ImGuiNative.gen.cs @@ -1,6 +1,6 @@ using System; -using System.Runtime.InteropServices; using UnityEngine; +using System.Runtime.InteropServices; namespace ImGuiNET { @@ -15,20 +15,24 @@ public static unsafe partial class ImGuiNative [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern byte igBegin(byte* name, byte* p_open, ImGuiWindowFlags flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igBeginChild(byte* str_id, Vector2 size, byte border, ImGuiWindowFlags flags); + public static extern byte igBeginChild_Str(byte* str_id, Vector2 size, byte border, ImGuiWindowFlags flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igBeginChildID(uint id, Vector2 size, byte border, ImGuiWindowFlags flags); + public static extern byte igBeginChild_ID(uint id, Vector2 size, byte border, ImGuiWindowFlags flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern byte igBeginChildFrame(uint id, Vector2 size, ImGuiWindowFlags flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern byte igBeginCombo(byte* label, byte* preview_value, ImGuiComboFlags flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igBeginDisabled(byte disabled); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern byte igBeginDragDropSource(ImGuiDragDropFlags flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern byte igBeginDragDropTarget(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void igBeginGroup(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igBeginListBox(byte* label, Vector2 size); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern byte igBeginMainMenuBar(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern byte igBeginMenu(byte* label, byte enabled); @@ -37,11 +41,11 @@ public static unsafe partial class ImGuiNative [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern byte igBeginPopup(byte* str_id, ImGuiWindowFlags flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igBeginPopupContextItem(byte* str_id, ImGuiMouseButton mouse_button); + public static extern byte igBeginPopupContextItem(byte* str_id, ImGuiPopupFlags popup_flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igBeginPopupContextVoid(byte* str_id, ImGuiMouseButton mouse_button); + public static extern byte igBeginPopupContextVoid(byte* str_id, ImGuiPopupFlags popup_flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igBeginPopupContextWindow(byte* str_id, ImGuiMouseButton mouse_button, byte also_over_items); + public static extern byte igBeginPopupContextWindow(byte* str_id, ImGuiPopupFlags popup_flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern byte igBeginPopupModal(byte* name, byte* p_open, ImGuiWindowFlags flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] @@ -49,6 +53,8 @@ public static unsafe partial class ImGuiNative [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern byte igBeginTabItem(byte* label, byte* p_open, ImGuiTabItemFlags flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igBeginTable(byte* str_id, int column, ImGuiTableFlags flags, Vector2 outer_size, float inner_width); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void igBeginTooltip(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void igBullet(); @@ -59,9 +65,7 @@ public static unsafe partial class ImGuiNative [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern float igCalcItemWidth(); [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); - [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); + public static extern void igCalcTextSize(Vector2* pOut, byte* text, byte* text_end, byte hide_text_after_double_hash, float wrap_width); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void igCaptureKeyboardFromApp(byte want_capture_keyboard_value); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] @@ -69,13 +73,15 @@ public static unsafe partial class ImGuiNative [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern byte igCheckbox(byte* label, byte* v); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igCheckboxFlags(byte* label, uint* flags, uint flags_value); + public static extern byte igCheckboxFlags_IntPtr(byte* label, int* flags, int flags_value); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igCheckboxFlags_UintPtr(byte* label, uint* flags, uint flags_value); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void igCloseCurrentPopup(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igCollapsingHeader(byte* label, ImGuiTreeNodeFlags flags); + public static extern byte igCollapsingHeader_TreeNodeFlags(byte* label, ImGuiTreeNodeFlags flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igCollapsingHeaderBoolPtr(byte* label, byte* p_open, ImGuiTreeNodeFlags flags); + public static extern byte igCollapsingHeader_BoolPtr(byte* label, byte* p_visible, ImGuiTreeNodeFlags flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern byte igColorButton(byte* desc_id, Vector4 col, ImGuiColorEditFlags flags, Vector2 size); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] @@ -84,8 +90,8 @@ public static unsafe partial class ImGuiNative 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 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 void igColorConvertU32ToFloat4(Vector4* pOut, uint @in); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern byte igColorEdit3(byte* label, Vector3* col, ImGuiColorEditFlags flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] @@ -97,9 +103,9 @@ public static unsafe partial class ImGuiNative [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 igCombo(byte* label, int* current_item, byte** items, int items_count, int popup_max_height_in_items); + public static extern byte igCombo_Str_arr(byte* label, int* current_item, byte** items, int items_count, int popup_max_height_in_items); [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 byte igCombo_Str(byte* label, int* current_item, byte* items_separated_by_zeros, int popup_max_height_in_items); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern IntPtr igCreateContext(ImFontAtlas* shared_font_atlas); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] @@ -107,29 +113,35 @@ public static unsafe partial class ImGuiNative [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void igDestroyContext(IntPtr ctx); [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 igDestroyPlatformWindows(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern uint igDockSpace(uint id, Vector2 size, ImGuiDockNodeFlags flags, ImGuiWindowClass* window_class); [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 uint igDockSpaceOverViewport(ImGuiViewport* viewport, ImGuiDockNodeFlags flags, ImGuiWindowClass* window_class); [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 byte igDragFloat(byte* label, float* v, float v_speed, float v_min, float v_max, byte* format, ImGuiSliderFlags flags); [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 byte igDragFloat2(byte* label, Vector2* v, float v_speed, float v_min, float v_max, byte* format, ImGuiSliderFlags flags); [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 byte igDragFloat3(byte* label, Vector3* v, float v_speed, float v_min, float v_max, byte* format, ImGuiSliderFlags flags); [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 byte igDragFloat4(byte* label, Vector4* v, float v_speed, float v_min, float v_max, byte* format, ImGuiSliderFlags flags); [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 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, ImGuiSliderFlags flags); [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 byte igDragInt(byte* label, int* v, float v_speed, int v_min, int v_max, byte* format, ImGuiSliderFlags flags); [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 byte igDragInt2(byte* label, int* v, float v_speed, int v_min, int v_max, byte* format, ImGuiSliderFlags flags); [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 byte igDragInt3(byte* label, int* v, float v_speed, int v_min, int v_max, byte* format, ImGuiSliderFlags flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igDragScalar(byte* label, ImGuiDataType data_type, void* p_data, float v_speed, void* p_min, void* p_max, byte* format, float power); + public static extern byte igDragInt4(byte* label, int* v, float v_speed, int v_min, int v_max, byte* format, ImGuiSliderFlags flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igDragScalarN(byte* label, ImGuiDataType data_type, void* p_data, int components, float v_speed, void* p_min, void* p_max, byte* format, float power); + 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, ImGuiSliderFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igDragScalar(byte* label, ImGuiDataType data_type, void* p_data, float v_speed, void* p_min, void* p_max, byte* format, ImGuiSliderFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igDragScalarN(byte* label, ImGuiDataType data_type, void* p_data, int components, float v_speed, void* p_min, void* p_max, byte* format, ImGuiSliderFlags flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void igDummy(Vector2 size); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] @@ -141,6 +153,8 @@ public static unsafe partial class ImGuiNative [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void igEndCombo(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igEndDisabled(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void igEndDragDropSource(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void igEndDragDropTarget(); @@ -149,6 +163,8 @@ public static unsafe partial class ImGuiNative [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void igEndGroup(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igEndListBox(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void igEndMainMenuBar(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void igEndMenu(); @@ -161,17 +177,27 @@ public static unsafe partial class ImGuiNative [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void igEndTabItem(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igEndTable(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void igEndTooltip(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern ImDrawList* igGetBackgroundDrawList(); + public static extern ImGuiViewport* igFindViewportByID(uint id); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImGuiViewport* igFindViewportByPlatformHandle(void* platform_handle); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igGetAllocatorFunctions(IntPtr* p_alloc_func, IntPtr* p_free_func, void** p_user_data); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImDrawList* igGetBackgroundDrawList_Nil(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImDrawList* igGetBackgroundDrawList_ViewportPtr(ImGuiViewport* viewport); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern byte* igGetClipboardText(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern uint igGetColorU32(ImGuiCol idx, float alpha_mul); + public static extern uint igGetColorU32_Col(ImGuiCol idx, float alpha_mul); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern uint igGetColorU32Vec4(Vector4 col); + public static extern uint igGetColorU32_Vec4(Vector4 col); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern uint igGetColorU32U32(uint col); + public static extern uint igGetColorU32_U32(uint col); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern int igGetColumnIndex(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] @@ -180,22 +206,22 @@ public static unsafe partial class ImGuiNative public static extern int igGetColumnsCount(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] 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, EntryPoint = "igGetContentRegionMax_nonUDT2")] - public static extern Vector2 igGetContentRegionMax(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igGetContentRegionAvail(Vector2* pOut); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igGetContentRegionMax(Vector2* pOut); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] 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 igGetCursorPos(Vector2* pOut); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern float igGetCursorPosX(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] 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 igGetCursorScreenPos(Vector2* pOut); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igGetCursorStartPos(Vector2* pOut); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern ImGuiPayload* igGetDragDropPayload(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] @@ -206,10 +232,12 @@ public static unsafe partial class ImGuiNative public static extern ImFont* igGetFont(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] 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 ImDrawList* igGetForegroundDrawList(); + public static extern void igGetFontTexUvWhitePixel(Vector2* pOut); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImDrawList* igGetForegroundDrawList_Nil(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImDrawList* igGetForegroundDrawList_ViewportPtr(ImGuiViewport* viewport); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern int igGetFrameCount(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] @@ -217,31 +245,39 @@ public static unsafe partial class ImGuiNative [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern float igGetFrameHeightWithSpacing(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern uint igGetIDStr(byte* str_id); + public static extern uint igGetID_Str(byte* str_id); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern uint igGetIDRange(byte* str_id_begin, byte* str_id_end); + public static extern uint igGetID_StrStr(byte* str_id_begin, byte* str_id_end); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern uint igGetIDPtr(void* ptr_id); + public static extern uint igGetID_Ptr(void* ptr_id); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] 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 igGetKeyIndex(ImGuiKey imgui_key); + public static extern void igGetItemRectMax(Vector2* pOut); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igGetItemRectMin(Vector2* pOut); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igGetItemRectSize(Vector2* pOut); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern int igGetKeyIndex(ImGuiKey key); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte* igGetKeyName(ImGuiKey key); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern int igGetKeyPressedAmount(ImGuiKey key, float repeat_delay, float rate); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImGuiViewport* igGetMainViewport(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern int igGetKeyPressedAmount(int key_index, float repeat_delay, float rate); + public static extern int igGetMouseClickedCount(ImGuiMouseButton button); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern ImGuiMouseCursor igGetMouseCursor(); - [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetMouseDragDelta_nonUDT2")] - public static extern Vector2 igGetMouseDragDelta(ImGuiMouseButton 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 void igGetMouseDragDelta(Vector2* pOut, ImGuiMouseButton button, float lock_threshold); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igGetMousePos(Vector2* pOut); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igGetMousePosOnOpeningCurrentPopup(Vector2* pOut); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImGuiPlatformIO* igGetPlatformIO(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern float igGetScrollMaxX(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] @@ -268,20 +304,24 @@ public static unsafe partial class ImGuiNative public static extern float igGetTreeNodeToLabelSpacing(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] 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 float igGetWindowContentRegionWidth(); + public static extern void igGetWindowContentRegionMax(Vector2* pOut); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igGetWindowContentRegionMin(Vector2* pOut); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern uint igGetWindowDockID(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern float igGetWindowDpiScale(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern ImDrawList* igGetWindowDrawList(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] 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 void igGetWindowPos(Vector2* pOut); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igGetWindowSize(Vector2* pOut); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImGuiViewport* igGetWindowViewport(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern float igGetWindowWidth(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] @@ -319,7 +359,7 @@ public static unsafe partial class ImGuiNative [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern byte igInputTextWithHint(byte* label, byte* hint, byte* buf, uint buf_size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* user_data); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igInvisibleButton(byte* str_id, Vector2 size); + public static extern byte igInvisibleButton(byte* str_id, Vector2 size, ImGuiButtonFlags flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern byte igIsAnyItemActive(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] @@ -349,11 +389,11 @@ public static unsafe partial class ImGuiNative [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern byte igIsItemVisible(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igIsKeyDown(int user_key_index); + public static extern byte igIsKeyDown(ImGuiKey key); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igIsKeyPressed(int user_key_index, byte repeat); + public static extern byte igIsKeyPressed(ImGuiKey key, byte repeat); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igIsKeyReleased(int user_key_index); + public static extern byte igIsKeyReleased(ImGuiKey key); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern byte igIsMouseClicked(ImGuiMouseButton button, byte repeat); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] @@ -369,29 +409,25 @@ public static unsafe partial class ImGuiNative [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern byte igIsMouseReleased(ImGuiMouseButton button); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igIsPopupOpen(byte* str_id); + public static extern byte igIsPopupOpen_Str(byte* str_id, ImGuiPopupFlags flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igIsRectVisible(Vector2 size); + public static extern byte igIsRectVisible_Nil(Vector2 size); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igIsRectVisibleVec2(Vector2 rect_min, Vector2 rect_max); + public static extern byte igIsRectVisible_Vec2(Vector2 rect_min, Vector2 rect_max); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern byte igIsWindowAppearing(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern byte igIsWindowCollapsed(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igIsWindowDocked(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern byte igIsWindowFocused(ImGuiFocusedFlags flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern byte igIsWindowHovered(ImGuiHoveredFlags flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void igLabelText(byte* label, byte* fmt); [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)] - 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); + public static extern byte igListBox_Str_arr(byte* label, int* current_item, byte** items, int items_count, int height_in_items); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void igLoadIniSettingsFromDisk(byte* ini_filename); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] @@ -413,9 +449,9 @@ public static unsafe partial class ImGuiNative [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void igMemFree(void* ptr); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igMenuItemBool(byte* label, byte* shortcut, byte selected, byte enabled); + public static extern byte igMenuItem_Bool(byte* label, byte* shortcut, byte selected, byte enabled); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igMenuItemBoolPtr(byte* label, byte* shortcut, byte* p_selected, byte enabled); + public static extern byte igMenuItem_BoolPtr(byte* label, byte* shortcut, byte* p_selected, byte enabled); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void igNewFrame(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] @@ -423,13 +459,15 @@ public static unsafe partial class ImGuiNative [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void igNextColumn(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igOpenPopup(byte* str_id); + public static extern void igOpenPopup_Str(byte* str_id, ImGuiPopupFlags popup_flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igOpenPopup_ID(uint id, ImGuiPopupFlags popup_flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igOpenPopupOnItemClick(byte* str_id, ImGuiMouseButton mouse_button); + public static extern void igOpenPopupOnItemClick(byte* str_id, ImGuiPopupFlags popup_flags); [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 void igPlotHistogram_FloatPtr(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 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 void igPlotLines_FloatPtr(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 igPopAllowKeyboardFocus(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] @@ -459,32 +497,34 @@ public static unsafe partial class ImGuiNative [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void igPushFont(ImFont* font); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igPushIDStr(byte* str_id); + public static extern void igPushID_Str(byte* str_id); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igPushIDRange(byte* str_id_begin, byte* str_id_end); + public static extern void igPushID_StrStr(byte* str_id_begin, byte* str_id_end); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igPushIDPtr(void* ptr_id); + public static extern void igPushID_Ptr(void* ptr_id); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igPushIDInt(int int_id); + public static extern void igPushID_Int(int int_id); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void igPushItemWidth(float item_width); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igPushStyleColorU32(ImGuiCol idx, uint col); + public static extern void igPushStyleColor_U32(ImGuiCol idx, uint col); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igPushStyleColor(ImGuiCol idx, Vector4 col); + public static extern void igPushStyleColor_Vec4(ImGuiCol idx, Vector4 col); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igPushStyleVarFloat(ImGuiStyleVar idx, float val); + public static extern void igPushStyleVar_Float(ImGuiStyleVar idx, float val); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igPushStyleVarVec2(ImGuiStyleVar idx, Vector2 val); + public static extern void igPushStyleVar_Vec2(ImGuiStyleVar idx, Vector2 val); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void igPushTextWrapPos(float wrap_local_pos_x); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igRadioButtonBool(byte* label, byte active); + public static extern byte igRadioButton_Bool(byte* label, byte active); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igRadioButtonIntPtr(byte* label, int* v, int v_button); + public static extern byte igRadioButton_IntPtr(byte* label, int* v, int v_button); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void igRender(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igRenderPlatformWindowsDefault(void* platform_render_arg, void* renderer_render_arg); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void igResetMouseDragDelta(ImGuiMouseButton button); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void igSameLine(float offset_from_start_x, float spacing); @@ -493,12 +533,14 @@ public static unsafe partial class ImGuiNative [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern byte* igSaveIniSettingsToMemory(uint* out_ini_size); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igSelectable(byte* label, byte selected, ImGuiSelectableFlags flags, Vector2 size); + public static extern byte igSelectable_Bool(byte* label, byte selected, ImGuiSelectableFlags flags, Vector2 size); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igSelectableBoolPtr(byte* label, byte* p_selected, ImGuiSelectableFlags flags, Vector2 size); + public static extern byte igSelectable_BoolPtr(byte* label, byte* p_selected, ImGuiSelectableFlags flags, Vector2 size); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void igSeparator(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igSetAllocatorFunctions(IntPtr alloc_func, IntPtr free_func, void* user_data); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void igSetClipboardText(byte* text); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void igSetColorEditOptions(ImGuiColorEditFlags flags); @@ -533,10 +575,14 @@ public static unsafe partial class ImGuiNative [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void igSetNextWindowBgAlpha(float alpha); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igSetNextWindowClass(ImGuiWindowClass* window_class); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void igSetNextWindowCollapsed(byte collapsed, ImGuiCond cond); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void igSetNextWindowContentSize(Vector2 size); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igSetNextWindowDockID(uint dock_id, ImGuiCond cond); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void igSetNextWindowFocus(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void igSetNextWindowPos(Vector2 pos, ImGuiCond cond, Vector2 pivot); @@ -545,17 +591,19 @@ public static unsafe partial class ImGuiNative [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] 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 igSetScrollFromPosX(float local_x, float center_x_ratio); + public static extern void igSetNextWindowViewport(uint viewport_id); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetScrollFromPosY(float local_y, float center_y_ratio); + public static extern void igSetScrollFromPosX_Float(float local_x, float center_x_ratio); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igSetScrollFromPosY_Float(float local_y, float center_y_ratio); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void igSetScrollHereX(float center_x_ratio); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void igSetScrollHereY(float center_y_ratio); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetScrollX(float scroll_x); + public static extern void igSetScrollX_Float(float scroll_x); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetScrollY(float scroll_y); + public static extern void igSetScrollY_Float(float scroll_y); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void igSetStateStorage(ImGuiStorage* storage); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] @@ -563,23 +611,23 @@ public static unsafe partial class ImGuiNative [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void igSetTooltip(byte* fmt); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetWindowCollapsedBool(byte collapsed, ImGuiCond cond); + public static extern void igSetWindowCollapsed_Bool(byte collapsed, ImGuiCond cond); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetWindowCollapsedStr(byte* name, byte collapsed, ImGuiCond cond); + public static extern void igSetWindowCollapsed_Str(byte* name, byte collapsed, ImGuiCond cond); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetWindowFocus(); + public static extern void igSetWindowFocus_Nil(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetWindowFocusStr(byte* name); + public static extern void igSetWindowFocus_Str(byte* name); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void igSetWindowFontScale(float scale); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetWindowPosVec2(Vector2 pos, ImGuiCond cond); + public static extern void igSetWindowPos_Vec2(Vector2 pos, ImGuiCond cond); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetWindowPosStr(byte* name, Vector2 pos, ImGuiCond cond); + public static extern void igSetWindowPos_Str(byte* name, Vector2 pos, ImGuiCond cond); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetWindowSizeVec2(Vector2 size, ImGuiCond cond); + public static extern void igSetWindowSize_Vec2(Vector2 size, ImGuiCond cond); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetWindowSizeStr(byte* name, Vector2 size, ImGuiCond cond); + public static extern void igSetWindowSize_Str(byte* name, Vector2 size, ImGuiCond cond); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void igShowAboutWindow(byte* p_open); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] @@ -589,33 +637,35 @@ public static unsafe partial class ImGuiNative [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void igShowMetricsWindow(byte* p_open); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igShowStackToolWindow(byte* p_open); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void igShowStyleEditor(ImGuiStyle* @ref); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern byte igShowStyleSelector(byte* label); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void igShowUserGuide(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igSliderAngle(byte* label, float* v_rad, float v_degrees_min, float v_degrees_max, byte* format); + public static extern byte igSliderAngle(byte* label, float* v_rad, float v_degrees_min, float v_degrees_max, byte* format, ImGuiSliderFlags flags); [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 byte igSliderFloat(byte* label, float* v, float v_min, float v_max, byte* format, ImGuiSliderFlags flags); [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 byte igSliderFloat2(byte* label, Vector2* v, float v_min, float v_max, byte* format, ImGuiSliderFlags flags); [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 byte igSliderFloat3(byte* label, Vector3* v, float v_min, float v_max, byte* format, ImGuiSliderFlags flags); [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 igSliderFloat4(byte* label, Vector4* v, float v_min, float v_max, byte* format, ImGuiSliderFlags flags); [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 byte igSliderInt(byte* label, int* v, int v_min, int v_max, byte* format, ImGuiSliderFlags flags); [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 byte igSliderInt2(byte* label, int* v, int v_min, int v_max, byte* format, ImGuiSliderFlags flags); [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 byte igSliderInt3(byte* label, int* v, int v_min, int v_max, byte* format, ImGuiSliderFlags flags); [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 byte igSliderInt4(byte* label, int* v, int v_min, int v_max, byte* format, ImGuiSliderFlags flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igSliderScalar(byte* label, ImGuiDataType data_type, void* p_data, void* p_min, void* p_max, byte* format, float power); + public static extern byte igSliderScalar(byte* label, ImGuiDataType data_type, void* p_data, void* p_min, void* p_max, byte* format, ImGuiSliderFlags flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igSliderScalarN(byte* label, ImGuiDataType data_type, void* p_data, int components, void* p_min, void* p_max, byte* format, float power); + public static extern byte igSliderScalarN(byte* label, ImGuiDataType data_type, void* p_data, int components, void* p_min, void* p_max, byte* format, ImGuiSliderFlags flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern byte igSmallButton(byte* label); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] @@ -627,6 +677,38 @@ public static unsafe partial class ImGuiNative [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void igStyleColorsLight(ImGuiStyle* dst); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igTabItemButton(byte* label, ImGuiTabItemFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern int igTableGetColumnCount(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImGuiTableColumnFlags igTableGetColumnFlags(int column_n); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern int igTableGetColumnIndex(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte* igTableGetColumnName_Int(int column_n); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern int igTableGetRowIndex(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImGuiTableSortSpecs* igTableGetSortSpecs(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igTableHeader(byte* label); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igTableHeadersRow(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igTableNextColumn(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igTableNextRow(ImGuiTableRowFlags row_flags, float min_row_height); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igTableSetBgColor(ImGuiTableBgTarget target, uint color, int column_n); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igTableSetColumnEnabled(int column_n, byte v); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igTableSetColumnIndex(int column_n); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igTableSetupColumn(byte* label, ImGuiTableColumnFlags flags, float init_width_or_weight, uint user_id); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igTableSetupScrollFreeze(int cols, int rows); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void igText(byte* fmt); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void igTextColored(Vector4 col, byte* fmt); @@ -637,58 +719,62 @@ public static unsafe partial class ImGuiNative [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void igTextWrapped(byte* fmt); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igTreeNodeStr(byte* label); + public static extern byte igTreeNode_Str(byte* label); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igTreeNodeStrStr(byte* str_id, byte* fmt); + public static extern byte igTreeNode_StrStr(byte* str_id, byte* fmt); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igTreeNodePtr(void* ptr_id, byte* fmt); + public static extern byte igTreeNode_Ptr(void* ptr_id, byte* fmt); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igTreeNodeExStr(byte* label, ImGuiTreeNodeFlags flags); + public static extern byte igTreeNodeEx_Str(byte* label, ImGuiTreeNodeFlags flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igTreeNodeExStrStr(byte* str_id, ImGuiTreeNodeFlags flags, byte* fmt); + public static extern byte igTreeNodeEx_StrStr(byte* str_id, ImGuiTreeNodeFlags flags, byte* fmt); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igTreeNodeExPtr(void* ptr_id, ImGuiTreeNodeFlags flags, byte* fmt); + public static extern byte igTreeNodeEx_Ptr(void* ptr_id, ImGuiTreeNodeFlags flags, byte* fmt); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void igTreePop(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igTreePushStr(byte* str_id); + public static extern void igTreePush_Str(byte* str_id); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igTreePushPtr(void* ptr_id); + public static extern void igTreePush_Ptr(void* ptr_id); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void igUnindent(float indent_w); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igValueBool(byte* prefix, byte b); + public static extern void igUpdatePlatformWindows(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igValue_Bool(byte* prefix, byte b); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igValueInt(byte* prefix, int v); + public static extern void igValue_Int(byte* prefix, int v); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igValueUint(byte* prefix, uint v); + public static extern void igValue_Uint(byte* prefix, uint v); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void igValueFloat(byte* prefix, float v, byte* float_format); + public static extern void igValue_Float(byte* prefix, float v, byte* float_format); [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); + public static extern byte igVSliderFloat(byte* label, Vector2 size, float* v, float v_min, float v_max, byte* format, ImGuiSliderFlags flags); [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 byte igVSliderInt(byte* label, Vector2 size, int* v, int v_min, int v_max, byte* format, ImGuiSliderFlags flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte igVSliderScalar(byte* label, Vector2 size, ImGuiDataType data_type, void* p_data, void* p_min, void* p_max, byte* format, float power); + public static extern byte igVSliderScalar(byte* label, Vector2 size, ImGuiDataType data_type, void* p_data, void* p_min, void* p_max, byte* format, ImGuiSliderFlags flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImColor_destroy(ImColor* self); - [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 ImColor* ImColor_ImColor(); + public static extern void ImColor_HSV(ImColor* pOut, float h, float s, float v, float a); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern ImColor* ImColor_ImColorInt(int r, int g, int b, int a); + public static extern ImColor* ImColor_ImColor_Nil(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern ImColor* ImColor_ImColorU32(uint rgba); + public static extern ImColor* ImColor_ImColor_Int(int r, int g, int b, int a); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern ImColor* ImColor_ImColorFloat(float r, float g, float b, float a); + public static extern ImColor* ImColor_ImColor_U32(uint rgba); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern ImColor* ImColor_ImColorVec4(Vector4 col); + public static extern ImColor* ImColor_ImColor_Float(float r, float g, float b, float a); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImColor* ImColor_ImColor_Vec4(Vector4 col); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] 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 ImDrawCmd_destroy(ImDrawCmd* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr ImDrawCmd_GetTexID(ImDrawCmd* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern ImDrawCmd* ImDrawCmd_ImDrawCmd(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImDrawData_Clear(ImDrawData* self); @@ -701,7 +787,29 @@ public static unsafe partial class ImGuiNative [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImDrawData_ScaleClipRects(ImDrawData* self, Vector2 fb_scale); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_AddBezierCurve(ImDrawList* self, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, uint col, float thickness, int num_segments); + public static extern int ImDrawList__CalcCircleAutoSegmentCount(ImDrawList* self, float radius); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList__ClearFreeMemory(ImDrawList* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList__OnChangedClipRect(ImDrawList* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList__OnChangedTextureID(ImDrawList* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList__OnChangedVtxOffset(ImDrawList* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList__PathArcToFastEx(ImDrawList* self, Vector2 center, float radius, int a_min_sample, int a_max_sample, int a_step); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList__PathArcToN(ImDrawList* self, Vector2 center, float radius, float a_min, float a_max, int num_segments); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList__PopUnusedDrawCmd(ImDrawList* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList__ResetForNewFrame(ImDrawList* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList__TryMergeDrawCmds(ImDrawList* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList_AddBezierCubic(ImDrawList* self, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, uint col, float thickness, int num_segments); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList_AddBezierQuadratic(ImDrawList* self, Vector2 p1, Vector2 p2, Vector2 p3, uint col, float thickness, int num_segments); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImDrawList_AddCallback(ImDrawList* self, IntPtr callback, void* callback_data); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] @@ -717,7 +825,7 @@ public static unsafe partial class ImGuiNative [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImDrawList_AddImageQuad(ImDrawList* self, IntPtr user_texture_id, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, Vector2 uv1, Vector2 uv2, Vector2 uv3, Vector2 uv4, uint col); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_AddImageRounded(ImDrawList* self, IntPtr user_texture_id, Vector2 p_min, Vector2 p_max, Vector2 uv_min, Vector2 uv_max, uint col, float rounding, ImDrawCornerFlags rounding_corners); + public static extern void ImDrawList_AddImageRounded(ImDrawList* self, IntPtr user_texture_id, Vector2 p_min, Vector2 p_max, Vector2 uv_min, Vector2 uv_max, uint col, float rounding, ImDrawFlags flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImDrawList_AddLine(ImDrawList* self, Vector2 p1, Vector2 p2, uint col, float thickness); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] @@ -725,21 +833,21 @@ public static unsafe partial class ImGuiNative [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImDrawList_AddNgonFilled(ImDrawList* self, Vector2 center, float radius, uint col, int num_segments); [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 ImDrawList_AddPolyline(ImDrawList* self, Vector2* points, int num_points, uint col, ImDrawFlags flags, float thickness); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImDrawList_AddQuad(ImDrawList* self, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, uint col, float thickness); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImDrawList_AddQuadFilled(ImDrawList* self, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, uint col); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_AddRect(ImDrawList* self, Vector2 p_min, Vector2 p_max, uint col, float rounding, ImDrawCornerFlags rounding_corners, float thickness); + public static extern void ImDrawList_AddRect(ImDrawList* self, Vector2 p_min, Vector2 p_max, uint col, float rounding, ImDrawFlags flags, float thickness); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_AddRectFilled(ImDrawList* self, Vector2 p_min, Vector2 p_max, uint col, float rounding, ImDrawCornerFlags rounding_corners); + public static extern void ImDrawList_AddRectFilled(ImDrawList* self, Vector2 p_min, Vector2 p_max, uint col, float rounding, ImDrawFlags flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImDrawList_AddRectFilledMultiColor(ImDrawList* self, Vector2 p_min, Vector2 p_max, uint col_upr_left, uint col_upr_right, uint col_bot_right, uint col_bot_left); [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 ImDrawList_AddText_Vec2(ImDrawList* self, Vector2 pos, uint col, byte* text_begin, byte* text_end); [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 ImDrawList_AddText_FontPtr(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 void ImDrawList_AddTriangle(ImDrawList* self, Vector2 p1, Vector2 p2, Vector2 p3, uint col, float thickness); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] @@ -751,17 +859,13 @@ public static unsafe partial class ImGuiNative [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImDrawList_ChannelsSplit(ImDrawList* self, int count); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_Clear(ImDrawList* self); - [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_ClearFreeMemory(ImDrawList* self); - [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern ImDrawList* ImDrawList_CloneOutput(ImDrawList* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImDrawList_destroy(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 = "ImDrawList_GetClipRectMin_nonUDT2")] - public static extern Vector2 ImDrawList_GetClipRectMin(ImDrawList* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList_GetClipRectMax(Vector2* pOut, ImDrawList* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList_GetClipRectMin(Vector2* pOut, ImDrawList* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern ImDrawList* ImDrawList_ImDrawList(IntPtr shared_data); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] @@ -769,7 +873,9 @@ public static unsafe partial class ImGuiNative [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImDrawList_PathArcToFast(ImDrawList* self, Vector2 center, float radius, int a_min_of_12, int a_max_of_12); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_PathBezierCurveTo(ImDrawList* self, Vector2 p2, Vector2 p3, Vector2 p4, int num_segments); + public static extern void ImDrawList_PathBezierCubicCurveTo(ImDrawList* self, Vector2 p2, Vector2 p3, Vector2 p4, int num_segments); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList_PathBezierQuadraticCurveTo(ImDrawList* self, Vector2 p2, Vector2 p3, int num_segments); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImDrawList_PathClear(ImDrawList* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] @@ -779,9 +885,9 @@ public static unsafe partial class ImGuiNative [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImDrawList_PathLineToMergeDuplicate(ImDrawList* self, Vector2 pos); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_PathRect(ImDrawList* self, Vector2 rect_min, Vector2 rect_max, float rounding, ImDrawCornerFlags rounding_corners); + public static extern void ImDrawList_PathRect(ImDrawList* self, Vector2 rect_min, Vector2 rect_max, float rounding, ImDrawFlags flags); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_PathStroke(ImDrawList* self, uint col, byte closed, float thickness); + public static extern void ImDrawList_PathStroke(ImDrawList* self, uint col, ImDrawFlags flags, float thickness); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImDrawList_PopClipRect(ImDrawList* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] @@ -809,10 +915,6 @@ public static unsafe partial class ImGuiNative [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImDrawList_PushTextureID(ImDrawList* self, IntPtr texture_id); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_UpdateClipRect(ImDrawList* self); - [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_UpdateTextureID(ImDrawList* self); - [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImDrawListSplitter_Clear(ImDrawListSplitter* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImDrawListSplitter_ClearFreeMemory(ImDrawListSplitter* self); @@ -827,13 +929,13 @@ public static unsafe partial class ImGuiNative [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImDrawListSplitter_Split(ImDrawListSplitter* self, ImDrawList* draw_list, int count); [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 void ImFont_AddGlyph(ImFont* self, ImFontConfig* src_cfg, 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 ImFont_AddRemapChar(ImFont* self, ushort dst, ushort src, byte overwrite_dst); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] 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 ImFont_CalcTextSizeA(Vector2* pOut, 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 byte* ImFont_CalcWordWrapPositionA(ImFont* self, float scale, byte* text, byte* text_end, float wrap_width); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] @@ -853,17 +955,19 @@ public static unsafe partial class ImGuiNative [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern ImFont* ImFont_ImFont(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte ImFont_IsGlyphRangeUnused(ImFont* self, uint c_begin, uint c_last); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern byte ImFont_IsLoaded(ImFont* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] 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 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 ImFont_SetFallbackChar(ImFont* self, ushort c); + public static extern void ImFont_SetGlyphVisible(ImFont* self, ushort c, byte visible); [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); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern int ImFontAtlas_AddCustomRectRegular(ImFontAtlas* self, uint id, int width, int height); + public static extern int ImFontAtlas_AddCustomRectRegular(ImFontAtlas* self, int width, int height); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern ImFont* ImFontAtlas_AddFont(ImFontAtlas* self, ImFontConfig* font_cfg); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] @@ -947,11 +1051,13 @@ public static unsafe partial class ImGuiNative [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImFontGlyphRangesBuilder_destroy(ImFontGlyphRangesBuilder* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern byte ImFontGlyphRangesBuilder_GetBit(ImFontGlyphRangesBuilder* self, int n); + public static extern byte ImFontGlyphRangesBuilder_GetBit(ImFontGlyphRangesBuilder* self, uint n); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern ImFontGlyphRangesBuilder* ImFontGlyphRangesBuilder_ImFontGlyphRangesBuilder(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern void ImFontGlyphRangesBuilder_SetBit(ImFontGlyphRangesBuilder* self, int n); + public static extern void ImFontGlyphRangesBuilder_SetBit(ImFontGlyphRangesBuilder* self, uint n); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiInputTextCallbackData_ClearSelection(ImGuiInputTextCallbackData* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImGuiInputTextCallbackData_DeleteChars(ImGuiInputTextCallbackData* self, int pos, int bytes_count); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] @@ -963,23 +1069,47 @@ public static unsafe partial class ImGuiNative [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImGuiInputTextCallbackData_InsertChars(ImGuiInputTextCallbackData* self, int pos, byte* text, byte* text_end); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiInputTextCallbackData_SelectAll(ImGuiInputTextCallbackData* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiIO_AddFocusEvent(ImGuiIO* self, byte focused); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImGuiIO_AddInputCharacter(ImGuiIO* self, uint c); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImGuiIO_AddInputCharactersUTF8(ImGuiIO* self, byte* str); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiIO_AddInputCharacterUTF16(ImGuiIO* self, ushort c); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiIO_AddKeyAnalogEvent(ImGuiIO* self, ImGuiKey key, byte down, float v); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiIO_AddKeyEvent(ImGuiIO* self, ImGuiKey key, byte down); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiIO_AddMouseButtonEvent(ImGuiIO* self, int button, byte down); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiIO_AddMousePosEvent(ImGuiIO* self, float x, float y); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiIO_AddMouseViewportEvent(ImGuiIO* self, uint id); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiIO_AddMouseWheelEvent(ImGuiIO* self, float wh_x, float wh_y); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImGuiIO_ClearInputCharacters(ImGuiIO* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiIO_ClearInputKeys(ImGuiIO* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImGuiIO_destroy(ImGuiIO* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern ImGuiIO* ImGuiIO_ImGuiIO(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiIO_SetKeyEventNativeData(ImGuiIO* self, ImGuiKey key, int native_keycode, int native_scancode, int native_legacy_index); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImGuiListClipper_Begin(ImGuiListClipper* self, int items_count, float items_height); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImGuiListClipper_destroy(ImGuiListClipper* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImGuiListClipper_End(ImGuiListClipper* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern ImGuiListClipper* ImGuiListClipper_ImGuiListClipper(int items_count, float items_height); + public static extern void ImGuiListClipper_ForceDisplayRangeByIndices(ImGuiListClipper* self, int item_min, int item_max); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImGuiListClipper* ImGuiListClipper_ImGuiListClipper(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern byte ImGuiListClipper_Step(ImGuiListClipper* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] @@ -999,6 +1129,18 @@ public static unsafe partial class ImGuiNative [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern byte ImGuiPayload_IsPreview(ImGuiPayload* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiPlatformImeData_destroy(ImGuiPlatformImeData* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImGuiPlatformImeData* ImGuiPlatformImeData_ImGuiPlatformImeData(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiPlatformIO_destroy(ImGuiPlatformIO* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImGuiPlatformIO* ImGuiPlatformIO_ImGuiPlatformIO(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiPlatformMonitor_destroy(ImGuiPlatformMonitor* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImGuiPlatformMonitor* ImGuiPlatformMonitor_ImGuiPlatformMonitor(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImGuiStorage_BuildSortByKey(ImGuiStorage* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImGuiStorage_Clear(ImGuiStorage* self); @@ -1031,11 +1173,11 @@ public static unsafe partial class ImGuiNative [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImGuiStoragePair_destroy(ImGuiStoragePair* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern ImGuiStoragePair* ImGuiStoragePair_ImGuiStoragePairInt(uint _key, int _val_i); + public static extern ImGuiStoragePair* ImGuiStoragePair_ImGuiStoragePair_Int(uint _key, int _val_i); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern ImGuiStoragePair* ImGuiStoragePair_ImGuiStoragePairFloat(uint _key, float _val_f); + public static extern ImGuiStoragePair* ImGuiStoragePair_ImGuiStoragePair_Float(uint _key, float _val_f); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern ImGuiStoragePair* ImGuiStoragePair_ImGuiStoragePairPtr(uint _key, void* _val_p); + public static extern ImGuiStoragePair* ImGuiStoragePair_ImGuiStoragePair_Ptr(uint _key, void* _val_p); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImGuiStyle_destroy(ImGuiStyle* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] @@ -1043,6 +1185,14 @@ public static unsafe partial class ImGuiNative [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImGuiStyle_ScaleAllSizes(ImGuiStyle* self, float scale_factor); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiTableColumnSortSpecs_destroy(ImGuiTableColumnSortSpecs* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImGuiTableColumnSortSpecs* ImGuiTableColumnSortSpecs_ImGuiTableColumnSortSpecs(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiTableSortSpecs_destroy(ImGuiTableSortSpecs* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImGuiTableSortSpecs* ImGuiTableSortSpecs_ImGuiTableSortSpecs(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImGuiTextBuffer_append(ImGuiTextBuffer* self, byte* str, byte* str_end); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImGuiTextBuffer_appendf(ImGuiTextBuffer* self, byte* fmt); @@ -1083,22 +1233,34 @@ public static unsafe partial class ImGuiNative [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern byte ImGuiTextRange_empty(ImGuiTextRange* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern ImGuiTextRange* ImGuiTextRange_ImGuiTextRange(); + public static extern ImGuiTextRange* ImGuiTextRange_ImGuiTextRange_Nil(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern ImGuiTextRange* ImGuiTextRange_ImGuiTextRangeStr(byte* _b, byte* _e); + public static extern ImGuiTextRange* ImGuiTextRange_ImGuiTextRange_Str(byte* _b, byte* _e); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImGuiTextRange_split(ImGuiTextRange* self, byte separator, ImVector* @out); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiViewport_destroy(ImGuiViewport* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiViewport_GetCenter(Vector2* pOut, ImGuiViewport* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiViewport_GetWorkCenter(Vector2* pOut, ImGuiViewport* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImGuiViewport* ImGuiViewport_ImGuiViewport(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiWindowClass_destroy(ImGuiWindowClass* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImGuiWindowClass* ImGuiWindowClass_ImGuiWindowClass(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImVec2_destroy(Vector2* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern Vector2* ImVec2_ImVec2(); + public static extern Vector2* ImVec2_ImVec2_Nil(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern Vector2* ImVec2_ImVec2Float(float _x, float _y); + public static extern Vector2* ImVec2_ImVec2_Float(float _x, float _y); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] public static extern void ImVec4_destroy(Vector4* self); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern Vector4* ImVec4_ImVec4(); + public static extern Vector4* ImVec4_ImVec4_Nil(); [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] - public static extern Vector4* ImVec4_ImVec4Float(float _x, float _y, float _z, float _w); + public static extern Vector4* ImVec4_ImVec4_Float(float _x, float _y, float _z, float _w); } } diff --git a/ImGuiNET/Wrapper/Generated/ImGuiNavInput.gen.cs b/ImGuiNET/Wrapper/Generated/ImGuiNavInput.gen.cs index 0400d81..b52fc61 100644 --- a/ImGuiNET/Wrapper/Generated/ImGuiNavInput.gen.cs +++ b/ImGuiNET/Wrapper/Generated/ImGuiNavInput.gen.cs @@ -18,12 +18,10 @@ public enum ImGuiNavInput FocusNext = 13, TweakSlow = 14, TweakFast = 15, - KeyMenu = 16, - KeyLeft = 17, - KeyRight = 18, - KeyUp = 19, - KeyDown = 20, - COUNT = 21, - InternalStart = KeyMenu, + KeyLeft = 16, + KeyRight = 17, + KeyUp = 18, + KeyDown = 19, + COUNT = 20, } } diff --git a/ImGuiNET/Wrapper/Generated/ImGuiOnceUponAFrame.gen.cs b/ImGuiNET/Wrapper/Generated/ImGuiOnceUponAFrame.gen.cs index 00c2b22..68705e0 100644 --- a/ImGuiNET/Wrapper/Generated/ImGuiOnceUponAFrame.gen.cs +++ b/ImGuiNET/Wrapper/Generated/ImGuiOnceUponAFrame.gen.cs @@ -1,7 +1,7 @@ using System; -using System.Runtime.CompilerServices; -using System.Text; using UnityEngine; +using Unity.Collections.LowLevel.Unsafe; +using System.Text; namespace ImGuiNET { @@ -17,10 +17,10 @@ public unsafe partial struct ImGuiOnceUponAFramePtr public static implicit operator ImGuiOnceUponAFramePtr(ImGuiOnceUponAFrame* nativePtr) => new ImGuiOnceUponAFramePtr(nativePtr); public static implicit operator ImGuiOnceUponAFrame* (ImGuiOnceUponAFramePtr wrappedPtr) => wrappedPtr.NativePtr; public static implicit operator ImGuiOnceUponAFramePtr(IntPtr nativePtr) => new ImGuiOnceUponAFramePtr(nativePtr); - public ref int RefFrame => ref Unsafe.AsRef(&NativePtr->RefFrame); + public ref int RefFrame => ref UnsafeUtility.AsRef(&NativePtr->RefFrame); public void Destroy() { - ImGuiNative.ImGuiOnceUponAFrame_destroy(NativePtr); + ImGuiNative.ImGuiOnceUponAFrame_destroy((ImGuiOnceUponAFrame*)(NativePtr)); } } } diff --git a/ImGuiNET/Wrapper/Generated/ImGuiPayload.gen.cs b/ImGuiNET/Wrapper/Generated/ImGuiPayload.gen.cs index cae9a30..f24bc8f 100644 --- a/ImGuiNET/Wrapper/Generated/ImGuiPayload.gen.cs +++ b/ImGuiNET/Wrapper/Generated/ImGuiPayload.gen.cs @@ -1,7 +1,7 @@ using System; -using System.Runtime.CompilerServices; -using System.Text; using UnityEngine; +using Unity.Collections.LowLevel.Unsafe; +using System.Text; namespace ImGuiNET { @@ -25,20 +25,20 @@ public unsafe partial struct ImGuiPayloadPtr public static implicit operator ImGuiPayload* (ImGuiPayloadPtr wrappedPtr) => wrappedPtr.NativePtr; public static implicit operator ImGuiPayloadPtr(IntPtr nativePtr) => new ImGuiPayloadPtr(nativePtr); public IntPtr Data { get => (IntPtr)NativePtr->Data; set => NativePtr->Data = (void*)value; } - public ref int DataSize => ref Unsafe.AsRef(&NativePtr->DataSize); - public ref uint SourceId => ref Unsafe.AsRef(&NativePtr->SourceId); - public ref uint SourceParentId => ref Unsafe.AsRef(&NativePtr->SourceParentId); - public ref int DataFrameCount => ref Unsafe.AsRef(&NativePtr->DataFrameCount); + public ref int DataSize => ref UnsafeUtility.AsRef(&NativePtr->DataSize); + public ref uint SourceId => ref UnsafeUtility.AsRef(&NativePtr->SourceId); + public ref uint SourceParentId => ref UnsafeUtility.AsRef(&NativePtr->SourceParentId); + public ref int DataFrameCount => ref UnsafeUtility.AsRef(&NativePtr->DataFrameCount); public RangeAccessor DataType => new RangeAccessor(NativePtr->DataType, 33); - public ref bool Preview => ref Unsafe.AsRef(&NativePtr->Preview); - public ref bool Delivery => ref Unsafe.AsRef(&NativePtr->Delivery); + public ref bool Preview => ref UnsafeUtility.AsRef(&NativePtr->Preview); + public ref bool Delivery => ref UnsafeUtility.AsRef(&NativePtr->Delivery); public void Clear() { - ImGuiNative.ImGuiPayload_Clear(NativePtr); + ImGuiNative.ImGuiPayload_Clear((ImGuiPayload*)(NativePtr)); } public void Destroy() { - ImGuiNative.ImGuiPayload_destroy(NativePtr); + ImGuiNative.ImGuiPayload_destroy((ImGuiPayload*)(NativePtr)); } public bool IsDataType(string type) { @@ -60,7 +60,7 @@ public bool IsDataType(string type) native_type[native_type_offset] = 0; } else { native_type = null; } - byte ret = ImGuiNative.ImGuiPayload_IsDataType(NativePtr, native_type); + byte ret = ImGuiNative.ImGuiPayload_IsDataType((ImGuiPayload*)(NativePtr), native_type); if (type_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_type); @@ -69,12 +69,12 @@ public bool IsDataType(string type) } public bool IsDelivery() { - byte ret = ImGuiNative.ImGuiPayload_IsDelivery(NativePtr); + byte ret = ImGuiNative.ImGuiPayload_IsDelivery((ImGuiPayload*)(NativePtr)); return ret != 0; } public bool IsPreview() { - byte ret = ImGuiNative.ImGuiPayload_IsPreview(NativePtr); + byte ret = ImGuiNative.ImGuiPayload_IsPreview((ImGuiPayload*)(NativePtr)); return ret != 0; } } diff --git a/ImGuiNET/Wrapper/Generated/ImGuiPlatformIO.gen.cs b/ImGuiNET/Wrapper/Generated/ImGuiPlatformIO.gen.cs new file mode 100644 index 0000000..e5888ff --- /dev/null +++ b/ImGuiNET/Wrapper/Generated/ImGuiPlatformIO.gen.cs @@ -0,0 +1,74 @@ +using System; +using UnityEngine; +using Unity.Collections.LowLevel.Unsafe; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct ImGuiPlatformIO + { + public IntPtr Platform_CreateWindow; + public IntPtr Platform_DestroyWindow; + public IntPtr Platform_ShowWindow; + public IntPtr Platform_SetWindowPos; + public IntPtr Platform_GetWindowPos; + public IntPtr Platform_SetWindowSize; + public IntPtr Platform_GetWindowSize; + public IntPtr Platform_SetWindowFocus; + public IntPtr Platform_GetWindowFocus; + public IntPtr Platform_GetWindowMinimized; + public IntPtr Platform_SetWindowTitle; + public IntPtr Platform_SetWindowAlpha; + public IntPtr Platform_UpdateWindow; + public IntPtr Platform_RenderWindow; + public IntPtr Platform_SwapBuffers; + public IntPtr Platform_GetWindowDpiScale; + public IntPtr Platform_OnChangedViewport; + public IntPtr Platform_CreateVkSurface; + public IntPtr Renderer_CreateWindow; + public IntPtr Renderer_DestroyWindow; + public IntPtr Renderer_SetWindowSize; + public IntPtr Renderer_RenderWindow; + public IntPtr Renderer_SwapBuffers; + public ImVector Monitors; + public ImVector Viewports; + } + public unsafe partial struct ImGuiPlatformIOPtr + { + public ImGuiPlatformIO* NativePtr { get; } + public ImGuiPlatformIOPtr(ImGuiPlatformIO* nativePtr) => NativePtr = nativePtr; + public ImGuiPlatformIOPtr(IntPtr nativePtr) => NativePtr = (ImGuiPlatformIO*)nativePtr; + public static implicit operator ImGuiPlatformIOPtr(ImGuiPlatformIO* nativePtr) => new ImGuiPlatformIOPtr(nativePtr); + public static implicit operator ImGuiPlatformIO* (ImGuiPlatformIOPtr wrappedPtr) => wrappedPtr.NativePtr; + public static implicit operator ImGuiPlatformIOPtr(IntPtr nativePtr) => new ImGuiPlatformIOPtr(nativePtr); + public ref IntPtr Platform_CreateWindow => ref UnsafeUtility.AsRef(&NativePtr->Platform_CreateWindow); + public ref IntPtr Platform_DestroyWindow => ref UnsafeUtility.AsRef(&NativePtr->Platform_DestroyWindow); + public ref IntPtr Platform_ShowWindow => ref UnsafeUtility.AsRef(&NativePtr->Platform_ShowWindow); + public ref IntPtr Platform_SetWindowPos => ref UnsafeUtility.AsRef(&NativePtr->Platform_SetWindowPos); + public ref IntPtr Platform_GetWindowPos => ref UnsafeUtility.AsRef(&NativePtr->Platform_GetWindowPos); + public ref IntPtr Platform_SetWindowSize => ref UnsafeUtility.AsRef(&NativePtr->Platform_SetWindowSize); + public ref IntPtr Platform_GetWindowSize => ref UnsafeUtility.AsRef(&NativePtr->Platform_GetWindowSize); + public ref IntPtr Platform_SetWindowFocus => ref UnsafeUtility.AsRef(&NativePtr->Platform_SetWindowFocus); + public ref IntPtr Platform_GetWindowFocus => ref UnsafeUtility.AsRef(&NativePtr->Platform_GetWindowFocus); + public ref IntPtr Platform_GetWindowMinimized => ref UnsafeUtility.AsRef(&NativePtr->Platform_GetWindowMinimized); + public ref IntPtr Platform_SetWindowTitle => ref UnsafeUtility.AsRef(&NativePtr->Platform_SetWindowTitle); + public ref IntPtr Platform_SetWindowAlpha => ref UnsafeUtility.AsRef(&NativePtr->Platform_SetWindowAlpha); + public ref IntPtr Platform_UpdateWindow => ref UnsafeUtility.AsRef(&NativePtr->Platform_UpdateWindow); + public ref IntPtr Platform_RenderWindow => ref UnsafeUtility.AsRef(&NativePtr->Platform_RenderWindow); + public ref IntPtr Platform_SwapBuffers => ref UnsafeUtility.AsRef(&NativePtr->Platform_SwapBuffers); + public ref IntPtr Platform_GetWindowDpiScale => ref UnsafeUtility.AsRef(&NativePtr->Platform_GetWindowDpiScale); + public ref IntPtr Platform_OnChangedViewport => ref UnsafeUtility.AsRef(&NativePtr->Platform_OnChangedViewport); + public ref IntPtr Platform_CreateVkSurface => ref UnsafeUtility.AsRef(&NativePtr->Platform_CreateVkSurface); + public ref IntPtr Renderer_CreateWindow => ref UnsafeUtility.AsRef(&NativePtr->Renderer_CreateWindow); + public ref IntPtr Renderer_DestroyWindow => ref UnsafeUtility.AsRef(&NativePtr->Renderer_DestroyWindow); + public ref IntPtr Renderer_SetWindowSize => ref UnsafeUtility.AsRef(&NativePtr->Renderer_SetWindowSize); + public ref IntPtr Renderer_RenderWindow => ref UnsafeUtility.AsRef(&NativePtr->Renderer_RenderWindow); + public ref IntPtr Renderer_SwapBuffers => ref UnsafeUtility.AsRef(&NativePtr->Renderer_SwapBuffers); + public ImPtrVector Monitors => new ImPtrVector(NativePtr->Monitors, UnsafeUtility.SizeOf()); + public ImVector Viewports => new ImVector(NativePtr->Viewports); + public void Destroy() + { + ImGuiNative.ImGuiPlatformIO_destroy((ImGuiPlatformIO*)(NativePtr)); + } + } +} diff --git a/ImGuiNET/Wrapper/Generated/ImGuiPlatformIO.gen.cs.meta b/ImGuiNET/Wrapper/Generated/ImGuiPlatformIO.gen.cs.meta new file mode 100644 index 0000000..5898046 --- /dev/null +++ b/ImGuiNET/Wrapper/Generated/ImGuiPlatformIO.gen.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7cdc75acf7f49a1429d4dc4628df060c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/ImGuiNET/Wrapper/Generated/ImGuiPlatformImeData.gen.cs b/ImGuiNET/Wrapper/Generated/ImGuiPlatformImeData.gen.cs new file mode 100644 index 0000000..2207999 --- /dev/null +++ b/ImGuiNET/Wrapper/Generated/ImGuiPlatformImeData.gen.cs @@ -0,0 +1,30 @@ +using System; +using UnityEngine; +using Unity.Collections.LowLevel.Unsafe; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct ImGuiPlatformImeData + { + public byte WantVisible; + public Vector2 InputPos; + public float InputLineHeight; + } + public unsafe partial struct ImGuiPlatformImeDataPtr + { + public ImGuiPlatformImeData* NativePtr { get; } + public ImGuiPlatformImeDataPtr(ImGuiPlatformImeData* nativePtr) => NativePtr = nativePtr; + public ImGuiPlatformImeDataPtr(IntPtr nativePtr) => NativePtr = (ImGuiPlatformImeData*)nativePtr; + public static implicit operator ImGuiPlatformImeDataPtr(ImGuiPlatformImeData* nativePtr) => new ImGuiPlatformImeDataPtr(nativePtr); + public static implicit operator ImGuiPlatformImeData* (ImGuiPlatformImeDataPtr wrappedPtr) => wrappedPtr.NativePtr; + public static implicit operator ImGuiPlatformImeDataPtr(IntPtr nativePtr) => new ImGuiPlatformImeDataPtr(nativePtr); + public ref bool WantVisible => ref UnsafeUtility.AsRef(&NativePtr->WantVisible); + public ref Vector2 InputPos => ref UnsafeUtility.AsRef(&NativePtr->InputPos); + public ref float InputLineHeight => ref UnsafeUtility.AsRef(&NativePtr->InputLineHeight); + public void Destroy() + { + ImGuiNative.ImGuiPlatformImeData_destroy((ImGuiPlatformImeData*)(NativePtr)); + } + } +} diff --git a/ImGuiNET/Wrapper/Generated/ImGuiPlatformImeData.gen.cs.meta b/ImGuiNET/Wrapper/Generated/ImGuiPlatformImeData.gen.cs.meta new file mode 100644 index 0000000..55d3fd6 --- /dev/null +++ b/ImGuiNET/Wrapper/Generated/ImGuiPlatformImeData.gen.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b146ec0db2ac7f7488fe4bb822216ee2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/ImGuiNET/Wrapper/Generated/ImGuiPlatformMonitor.gen.cs b/ImGuiNET/Wrapper/Generated/ImGuiPlatformMonitor.gen.cs new file mode 100644 index 0000000..717bbe1 --- /dev/null +++ b/ImGuiNET/Wrapper/Generated/ImGuiPlatformMonitor.gen.cs @@ -0,0 +1,34 @@ +using System; +using UnityEngine; +using Unity.Collections.LowLevel.Unsafe; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct ImGuiPlatformMonitor + { + public Vector2 MainPos; + public Vector2 MainSize; + public Vector2 WorkPos; + public Vector2 WorkSize; + public float DpiScale; + } + public unsafe partial struct ImGuiPlatformMonitorPtr + { + public ImGuiPlatformMonitor* NativePtr { get; } + public ImGuiPlatformMonitorPtr(ImGuiPlatformMonitor* nativePtr) => NativePtr = nativePtr; + public ImGuiPlatformMonitorPtr(IntPtr nativePtr) => NativePtr = (ImGuiPlatformMonitor*)nativePtr; + public static implicit operator ImGuiPlatformMonitorPtr(ImGuiPlatformMonitor* nativePtr) => new ImGuiPlatformMonitorPtr(nativePtr); + public static implicit operator ImGuiPlatformMonitor* (ImGuiPlatformMonitorPtr wrappedPtr) => wrappedPtr.NativePtr; + public static implicit operator ImGuiPlatformMonitorPtr(IntPtr nativePtr) => new ImGuiPlatformMonitorPtr(nativePtr); + public ref Vector2 MainPos => ref UnsafeUtility.AsRef(&NativePtr->MainPos); + public ref Vector2 MainSize => ref UnsafeUtility.AsRef(&NativePtr->MainSize); + public ref Vector2 WorkPos => ref UnsafeUtility.AsRef(&NativePtr->WorkPos); + public ref Vector2 WorkSize => ref UnsafeUtility.AsRef(&NativePtr->WorkSize); + public ref float DpiScale => ref UnsafeUtility.AsRef(&NativePtr->DpiScale); + public void Destroy() + { + ImGuiNative.ImGuiPlatformMonitor_destroy((ImGuiPlatformMonitor*)(NativePtr)); + } + } +} diff --git a/ImGuiNET/Wrapper/Generated/ImGuiPlatformMonitor.gen.cs.meta b/ImGuiNET/Wrapper/Generated/ImGuiPlatformMonitor.gen.cs.meta new file mode 100644 index 0000000..6fb3cf2 --- /dev/null +++ b/ImGuiNET/Wrapper/Generated/ImGuiPlatformMonitor.gen.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6a30da925d67e9848bf2243c7a4990db +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/ImGuiNET/Wrapper/Generated/ImGuiPopupFlags.gen.cs b/ImGuiNET/Wrapper/Generated/ImGuiPopupFlags.gen.cs new file mode 100644 index 0000000..5fbe608 --- /dev/null +++ b/ImGuiNET/Wrapper/Generated/ImGuiPopupFlags.gen.cs @@ -0,0 +1,18 @@ +namespace ImGuiNET +{ + [System.Flags] + public enum ImGuiPopupFlags + { + None = 0, + MouseButtonLeft = 0, + MouseButtonRight = 1, + MouseButtonMiddle = 2, + MouseButtonMask = 31, + MouseButtonDefault = 1, + NoOpenOverExistingPopup = 32, + NoOpenOverItems = 64, + AnyPopupId = 128, + AnyPopupLevel = 256, + AnyPopup = 384, + } +} diff --git a/ImGuiNET/Wrapper/Generated/ImGuiPopupFlags.gen.cs.meta b/ImGuiNET/Wrapper/Generated/ImGuiPopupFlags.gen.cs.meta new file mode 100644 index 0000000..79b95b8 --- /dev/null +++ b/ImGuiNET/Wrapper/Generated/ImGuiPopupFlags.gen.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5672ae2542e76a44a88af7f1e4fc2e39 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/ImGuiNET/Wrapper/Generated/ImGuiSelectableFlags.gen.cs b/ImGuiNET/Wrapper/Generated/ImGuiSelectableFlags.gen.cs index a99b470..c0391bf 100644 --- a/ImGuiNET/Wrapper/Generated/ImGuiSelectableFlags.gen.cs +++ b/ImGuiNET/Wrapper/Generated/ImGuiSelectableFlags.gen.cs @@ -4,10 +4,10 @@ namespace ImGuiNET public enum ImGuiSelectableFlags { None = 0, - DontClosePopups = 1 << 0, - SpanAllColumns = 1 << 1, - AllowDoubleClick = 1 << 2, - Disabled = 1 << 3, - AllowItemOverlap = 1 << 4, + DontClosePopups = 1, + SpanAllColumns = 2, + AllowDoubleClick = 4, + Disabled = 8, + AllowItemOverlap = 16, } } diff --git a/ImGuiNET/Wrapper/Generated/ImGuiSizeCallbackData.gen.cs b/ImGuiNET/Wrapper/Generated/ImGuiSizeCallbackData.gen.cs index ed723ab..a45ebb5 100644 --- a/ImGuiNET/Wrapper/Generated/ImGuiSizeCallbackData.gen.cs +++ b/ImGuiNET/Wrapper/Generated/ImGuiSizeCallbackData.gen.cs @@ -1,7 +1,7 @@ using System; -using System.Runtime.CompilerServices; -using System.Text; using UnityEngine; +using Unity.Collections.LowLevel.Unsafe; +using System.Text; namespace ImGuiNET { @@ -21,8 +21,8 @@ public unsafe partial struct ImGuiSizeCallbackDataPtr public static implicit operator ImGuiSizeCallbackData* (ImGuiSizeCallbackDataPtr wrappedPtr) => wrappedPtr.NativePtr; public static implicit operator ImGuiSizeCallbackDataPtr(IntPtr nativePtr) => new ImGuiSizeCallbackDataPtr(nativePtr); public IntPtr UserData { get => (IntPtr)NativePtr->UserData; set => NativePtr->UserData = (void*)value; } - public ref Vector2 Pos => ref Unsafe.AsRef(&NativePtr->Pos); - public ref Vector2 CurrentSize => ref Unsafe.AsRef(&NativePtr->CurrentSize); - public ref Vector2 DesiredSize => ref Unsafe.AsRef(&NativePtr->DesiredSize); + public ref Vector2 Pos => ref UnsafeUtility.AsRef(&NativePtr->Pos); + public ref Vector2 CurrentSize => ref UnsafeUtility.AsRef(&NativePtr->CurrentSize); + public ref Vector2 DesiredSize => ref UnsafeUtility.AsRef(&NativePtr->DesiredSize); } } diff --git a/ImGuiNET/Wrapper/Generated/ImGuiSliderFlags.gen.cs b/ImGuiNET/Wrapper/Generated/ImGuiSliderFlags.gen.cs new file mode 100644 index 0000000..f87859c --- /dev/null +++ b/ImGuiNET/Wrapper/Generated/ImGuiSliderFlags.gen.cs @@ -0,0 +1,13 @@ +namespace ImGuiNET +{ + [System.Flags] + public enum ImGuiSliderFlags + { + None = 0, + AlwaysClamp = 16, + Logarithmic = 32, + NoRoundToFormat = 64, + NoInput = 128, + InvalidMask = 1879048207, + } +} diff --git a/ImGuiNET/Wrapper/Generated/ImGuiSliderFlags.gen.cs.meta b/ImGuiNET/Wrapper/Generated/ImGuiSliderFlags.gen.cs.meta new file mode 100644 index 0000000..a45dda4 --- /dev/null +++ b/ImGuiNET/Wrapper/Generated/ImGuiSliderFlags.gen.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f62a29020033cf5478f0e2e5cab147d7 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/ImGuiNET/Wrapper/Generated/ImGuiSortDirection.gen.cs b/ImGuiNET/Wrapper/Generated/ImGuiSortDirection.gen.cs new file mode 100644 index 0000000..7b4fae9 --- /dev/null +++ b/ImGuiNET/Wrapper/Generated/ImGuiSortDirection.gen.cs @@ -0,0 +1,9 @@ +namespace ImGuiNET +{ + public enum ImGuiSortDirection + { + None = 0, + Ascending = 1, + Descending = 2, + } +} diff --git a/ImGuiNET/Wrapper/Generated/ImGuiSortDirection.gen.cs.meta b/ImGuiNET/Wrapper/Generated/ImGuiSortDirection.gen.cs.meta new file mode 100644 index 0000000..5298a8e --- /dev/null +++ b/ImGuiNET/Wrapper/Generated/ImGuiSortDirection.gen.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: cd7d6f550c8c27043bdc02d07f8aa201 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/ImGuiNET/Wrapper/Generated/ImGuiStorage.gen.cs b/ImGuiNET/Wrapper/Generated/ImGuiStorage.gen.cs index 6b55cbf..c504429 100644 --- a/ImGuiNET/Wrapper/Generated/ImGuiStorage.gen.cs +++ b/ImGuiNET/Wrapper/Generated/ImGuiStorage.gen.cs @@ -1,7 +1,7 @@ using System; -using System.Runtime.CompilerServices; -using System.Text; using UnityEngine; +using Unity.Collections.LowLevel.Unsafe; +using System.Text; namespace ImGuiNET { @@ -17,121 +17,121 @@ public unsafe partial struct ImGuiStoragePtr public static implicit operator ImGuiStoragePtr(ImGuiStorage* nativePtr) => new ImGuiStoragePtr(nativePtr); public static implicit operator ImGuiStorage* (ImGuiStoragePtr wrappedPtr) => wrappedPtr.NativePtr; public static implicit operator ImGuiStoragePtr(IntPtr nativePtr) => new ImGuiStoragePtr(nativePtr); - public ImPtrVector Data => new ImPtrVector(NativePtr->Data, Unsafe.SizeOf()); + public ImPtrVector Data => new ImPtrVector(NativePtr->Data, UnsafeUtility.SizeOf()); public void BuildSortByKey() { - ImGuiNative.ImGuiStorage_BuildSortByKey(NativePtr); + ImGuiNative.ImGuiStorage_BuildSortByKey((ImGuiStorage*)(NativePtr)); } public void Clear() { - ImGuiNative.ImGuiStorage_Clear(NativePtr); + ImGuiNative.ImGuiStorage_Clear((ImGuiStorage*)(NativePtr)); } public bool GetBool(uint key) { byte default_val = 0; - byte ret = ImGuiNative.ImGuiStorage_GetBool(NativePtr, key, default_val); + byte ret = ImGuiNative.ImGuiStorage_GetBool((ImGuiStorage*)(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); + byte ret = ImGuiNative.ImGuiStorage_GetBool((ImGuiStorage*)(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); + byte* ret = ImGuiNative.ImGuiStorage_GetBoolRef((ImGuiStorage*)(NativePtr), key, default_val); return ret; } public byte* GetBoolRef(uint key, bool default_val) { byte native_default_val = default_val ? (byte)1 : (byte)0; - byte* ret = ImGuiNative.ImGuiStorage_GetBoolRef(NativePtr, key, native_default_val); + byte* ret = ImGuiNative.ImGuiStorage_GetBoolRef((ImGuiStorage*)(NativePtr), key, native_default_val); return ret; } public float GetFloat(uint key) { float default_val = 0.0f; - float ret = ImGuiNative.ImGuiStorage_GetFloat(NativePtr, key, default_val); + float ret = ImGuiNative.ImGuiStorage_GetFloat((ImGuiStorage*)(NativePtr), key, default_val); return ret; } public float GetFloat(uint key, float default_val) { - float ret = ImGuiNative.ImGuiStorage_GetFloat(NativePtr, key, default_val); + float ret = ImGuiNative.ImGuiStorage_GetFloat((ImGuiStorage*)(NativePtr), key, default_val); return ret; } public float* GetFloatRef(uint key) { float default_val = 0.0f; - float* ret = ImGuiNative.ImGuiStorage_GetFloatRef(NativePtr, key, default_val); + float* ret = ImGuiNative.ImGuiStorage_GetFloatRef((ImGuiStorage*)(NativePtr), key, default_val); return ret; } public float* GetFloatRef(uint key, float default_val) { - float* ret = ImGuiNative.ImGuiStorage_GetFloatRef(NativePtr, key, default_val); + float* ret = ImGuiNative.ImGuiStorage_GetFloatRef((ImGuiStorage*)(NativePtr), key, default_val); return ret; } public int GetInt(uint key) { int default_val = 0; - int ret = ImGuiNative.ImGuiStorage_GetInt(NativePtr, key, default_val); + int ret = ImGuiNative.ImGuiStorage_GetInt((ImGuiStorage*)(NativePtr), key, default_val); return ret; } public int GetInt(uint key, int default_val) { - int ret = ImGuiNative.ImGuiStorage_GetInt(NativePtr, key, default_val); + int ret = ImGuiNative.ImGuiStorage_GetInt((ImGuiStorage*)(NativePtr), key, default_val); return ret; } public int* GetIntRef(uint key) { int default_val = 0; - int* ret = ImGuiNative.ImGuiStorage_GetIntRef(NativePtr, key, default_val); + int* ret = ImGuiNative.ImGuiStorage_GetIntRef((ImGuiStorage*)(NativePtr), key, default_val); return ret; } public int* GetIntRef(uint key, int default_val) { - int* ret = ImGuiNative.ImGuiStorage_GetIntRef(NativePtr, key, default_val); + int* ret = ImGuiNative.ImGuiStorage_GetIntRef((ImGuiStorage*)(NativePtr), key, default_val); return ret; } public IntPtr GetVoidPtr(uint key) { - void* ret = ImGuiNative.ImGuiStorage_GetVoidPtr(NativePtr, key); + void* ret = ImGuiNative.ImGuiStorage_GetVoidPtr((ImGuiStorage*)(NativePtr), key); return (IntPtr)ret; } public void** GetVoidPtrRef(uint key) { void* default_val = null; - void** ret = ImGuiNative.ImGuiStorage_GetVoidPtrRef(NativePtr, key, default_val); + void** ret = ImGuiNative.ImGuiStorage_GetVoidPtrRef((ImGuiStorage*)(NativePtr), key, default_val); return ret; } public void** GetVoidPtrRef(uint key, IntPtr default_val) { void* native_default_val = (void*)default_val.ToPointer(); - void** ret = ImGuiNative.ImGuiStorage_GetVoidPtrRef(NativePtr, key, native_default_val); + void** ret = ImGuiNative.ImGuiStorage_GetVoidPtrRef((ImGuiStorage*)(NativePtr), key, native_default_val); return ret; } public void SetAllInt(int val) { - ImGuiNative.ImGuiStorage_SetAllInt(NativePtr, val); + ImGuiNative.ImGuiStorage_SetAllInt((ImGuiStorage*)(NativePtr), val); } public void SetBool(uint key, bool val) { byte native_val = val ? (byte)1 : (byte)0; - ImGuiNative.ImGuiStorage_SetBool(NativePtr, key, native_val); + ImGuiNative.ImGuiStorage_SetBool((ImGuiStorage*)(NativePtr), key, native_val); } public void SetFloat(uint key, float val) { - ImGuiNative.ImGuiStorage_SetFloat(NativePtr, key, val); + ImGuiNative.ImGuiStorage_SetFloat((ImGuiStorage*)(NativePtr), key, val); } public void SetInt(uint key, int val) { - ImGuiNative.ImGuiStorage_SetInt(NativePtr, key, val); + ImGuiNative.ImGuiStorage_SetInt((ImGuiStorage*)(NativePtr), key, val); } public void SetVoidPtr(uint key, IntPtr val) { void* native_val = (void*)val.ToPointer(); - ImGuiNative.ImGuiStorage_SetVoidPtr(NativePtr, key, native_val); + ImGuiNative.ImGuiStorage_SetVoidPtr((ImGuiStorage*)(NativePtr), key, native_val); } } } diff --git a/ImGuiNET/Wrapper/Generated/ImGuiStyle.gen.cs b/ImGuiNET/Wrapper/Generated/ImGuiStyle.gen.cs index add1165..343d46d 100644 --- a/ImGuiNET/Wrapper/Generated/ImGuiStyle.gen.cs +++ b/ImGuiNET/Wrapper/Generated/ImGuiStyle.gen.cs @@ -1,13 +1,14 @@ using System; -using System.Runtime.CompilerServices; -using System.Text; using UnityEngine; +using Unity.Collections.LowLevel.Unsafe; +using System.Text; namespace ImGuiNET { public unsafe partial struct ImGuiStyle { public float Alpha; + public float DisabledAlpha; public Vector2 WindowPadding; public float WindowRounding; public float WindowBorderSize; @@ -23,6 +24,7 @@ public unsafe partial struct ImGuiStyle public float FrameBorderSize; public Vector2 ItemSpacing; public Vector2 ItemInnerSpacing; + public Vector2 CellPadding; public Vector2 TouchExtraPadding; public float IndentSpacing; public float ColumnsMinSpacing; @@ -30,8 +32,10 @@ public unsafe partial struct ImGuiStyle public float ScrollbarRounding; public float GrabMinSize; public float GrabRounding; + public float LogSliderDeadzone; public float TabRounding; public float TabBorderSize; + public float TabMinWidthForCloseButton; public ImGuiDir ColorButtonPosition; public Vector2 ButtonTextAlign; public Vector2 SelectableTextAlign; @@ -39,9 +43,10 @@ public unsafe partial struct ImGuiStyle public Vector2 DisplaySafeAreaPadding; public float MouseCursorScale; public byte AntiAliasedLines; + public byte AntiAliasedLinesUseTex; public byte AntiAliasedFill; public float CurveTessellationTol; - public float CircleSegmentMaxError; + public float CircleTessellationMaxError; public Vector4 Colors_0; public Vector4 Colors_1; public Vector4 Colors_2; @@ -90,6 +95,13 @@ public unsafe partial struct ImGuiStyle public Vector4 Colors_45; public Vector4 Colors_46; public Vector4 Colors_47; + public Vector4 Colors_48; + public Vector4 Colors_49; + public Vector4 Colors_50; + public Vector4 Colors_51; + public Vector4 Colors_52; + public Vector4 Colors_53; + public Vector4 Colors_54; } public unsafe partial struct ImGuiStylePtr { @@ -99,49 +111,54 @@ public unsafe partial struct ImGuiStylePtr public static implicit operator ImGuiStylePtr(ImGuiStyle* nativePtr) => new ImGuiStylePtr(nativePtr); public static implicit operator ImGuiStyle* (ImGuiStylePtr wrappedPtr) => wrappedPtr.NativePtr; public static implicit operator ImGuiStylePtr(IntPtr nativePtr) => new ImGuiStylePtr(nativePtr); - public ref float Alpha => ref Unsafe.AsRef(&NativePtr->Alpha); - public ref Vector2 WindowPadding => ref Unsafe.AsRef(&NativePtr->WindowPadding); - public ref float WindowRounding => ref Unsafe.AsRef(&NativePtr->WindowRounding); - public ref float WindowBorderSize => ref Unsafe.AsRef(&NativePtr->WindowBorderSize); - public ref Vector2 WindowMinSize => ref Unsafe.AsRef(&NativePtr->WindowMinSize); - public ref Vector2 WindowTitleAlign => ref Unsafe.AsRef(&NativePtr->WindowTitleAlign); - public ref ImGuiDir WindowMenuButtonPosition => ref Unsafe.AsRef(&NativePtr->WindowMenuButtonPosition); - public ref float ChildRounding => ref Unsafe.AsRef(&NativePtr->ChildRounding); - public ref float ChildBorderSize => ref Unsafe.AsRef(&NativePtr->ChildBorderSize); - public ref float PopupRounding => ref Unsafe.AsRef(&NativePtr->PopupRounding); - public ref float PopupBorderSize => ref Unsafe.AsRef(&NativePtr->PopupBorderSize); - public ref Vector2 FramePadding => ref Unsafe.AsRef(&NativePtr->FramePadding); - public ref float FrameRounding => ref Unsafe.AsRef(&NativePtr->FrameRounding); - public ref float FrameBorderSize => ref Unsafe.AsRef(&NativePtr->FrameBorderSize); - public ref Vector2 ItemSpacing => ref Unsafe.AsRef(&NativePtr->ItemSpacing); - public ref Vector2 ItemInnerSpacing => ref Unsafe.AsRef(&NativePtr->ItemInnerSpacing); - public ref Vector2 TouchExtraPadding => ref Unsafe.AsRef(&NativePtr->TouchExtraPadding); - public ref float IndentSpacing => ref Unsafe.AsRef(&NativePtr->IndentSpacing); - public ref float ColumnsMinSpacing => ref Unsafe.AsRef(&NativePtr->ColumnsMinSpacing); - public ref float ScrollbarSize => ref Unsafe.AsRef(&NativePtr->ScrollbarSize); - public ref float ScrollbarRounding => ref Unsafe.AsRef(&NativePtr->ScrollbarRounding); - public ref float GrabMinSize => ref Unsafe.AsRef(&NativePtr->GrabMinSize); - public ref float GrabRounding => ref Unsafe.AsRef(&NativePtr->GrabRounding); - public ref float TabRounding => ref Unsafe.AsRef(&NativePtr->TabRounding); - public ref float TabBorderSize => ref Unsafe.AsRef(&NativePtr->TabBorderSize); - public ref ImGuiDir ColorButtonPosition => ref Unsafe.AsRef(&NativePtr->ColorButtonPosition); - public ref Vector2 ButtonTextAlign => ref Unsafe.AsRef(&NativePtr->ButtonTextAlign); - public ref Vector2 SelectableTextAlign => ref Unsafe.AsRef(&NativePtr->SelectableTextAlign); - public ref Vector2 DisplayWindowPadding => ref Unsafe.AsRef(&NativePtr->DisplayWindowPadding); - public ref Vector2 DisplaySafeAreaPadding => ref Unsafe.AsRef(&NativePtr->DisplaySafeAreaPadding); - public ref float MouseCursorScale => ref Unsafe.AsRef(&NativePtr->MouseCursorScale); - public ref bool AntiAliasedLines => ref Unsafe.AsRef(&NativePtr->AntiAliasedLines); - public ref bool AntiAliasedFill => ref Unsafe.AsRef(&NativePtr->AntiAliasedFill); - public ref float CurveTessellationTol => ref Unsafe.AsRef(&NativePtr->CurveTessellationTol); - public ref float CircleSegmentMaxError => ref Unsafe.AsRef(&NativePtr->CircleSegmentMaxError); - public RangeAccessor Colors => new RangeAccessor(&NativePtr->Colors_0, 48); + public ref float Alpha => ref UnsafeUtility.AsRef(&NativePtr->Alpha); + public ref float DisabledAlpha => ref UnsafeUtility.AsRef(&NativePtr->DisabledAlpha); + public ref Vector2 WindowPadding => ref UnsafeUtility.AsRef(&NativePtr->WindowPadding); + public ref float WindowRounding => ref UnsafeUtility.AsRef(&NativePtr->WindowRounding); + public ref float WindowBorderSize => ref UnsafeUtility.AsRef(&NativePtr->WindowBorderSize); + public ref Vector2 WindowMinSize => ref UnsafeUtility.AsRef(&NativePtr->WindowMinSize); + public ref Vector2 WindowTitleAlign => ref UnsafeUtility.AsRef(&NativePtr->WindowTitleAlign); + public ref ImGuiDir WindowMenuButtonPosition => ref UnsafeUtility.AsRef(&NativePtr->WindowMenuButtonPosition); + public ref float ChildRounding => ref UnsafeUtility.AsRef(&NativePtr->ChildRounding); + public ref float ChildBorderSize => ref UnsafeUtility.AsRef(&NativePtr->ChildBorderSize); + public ref float PopupRounding => ref UnsafeUtility.AsRef(&NativePtr->PopupRounding); + public ref float PopupBorderSize => ref UnsafeUtility.AsRef(&NativePtr->PopupBorderSize); + public ref Vector2 FramePadding => ref UnsafeUtility.AsRef(&NativePtr->FramePadding); + public ref float FrameRounding => ref UnsafeUtility.AsRef(&NativePtr->FrameRounding); + public ref float FrameBorderSize => ref UnsafeUtility.AsRef(&NativePtr->FrameBorderSize); + public ref Vector2 ItemSpacing => ref UnsafeUtility.AsRef(&NativePtr->ItemSpacing); + public ref Vector2 ItemInnerSpacing => ref UnsafeUtility.AsRef(&NativePtr->ItemInnerSpacing); + public ref Vector2 CellPadding => ref UnsafeUtility.AsRef(&NativePtr->CellPadding); + public ref Vector2 TouchExtraPadding => ref UnsafeUtility.AsRef(&NativePtr->TouchExtraPadding); + public ref float IndentSpacing => ref UnsafeUtility.AsRef(&NativePtr->IndentSpacing); + public ref float ColumnsMinSpacing => ref UnsafeUtility.AsRef(&NativePtr->ColumnsMinSpacing); + public ref float ScrollbarSize => ref UnsafeUtility.AsRef(&NativePtr->ScrollbarSize); + public ref float ScrollbarRounding => ref UnsafeUtility.AsRef(&NativePtr->ScrollbarRounding); + public ref float GrabMinSize => ref UnsafeUtility.AsRef(&NativePtr->GrabMinSize); + public ref float GrabRounding => ref UnsafeUtility.AsRef(&NativePtr->GrabRounding); + public ref float LogSliderDeadzone => ref UnsafeUtility.AsRef(&NativePtr->LogSliderDeadzone); + public ref float TabRounding => ref UnsafeUtility.AsRef(&NativePtr->TabRounding); + public ref float TabBorderSize => ref UnsafeUtility.AsRef(&NativePtr->TabBorderSize); + public ref float TabMinWidthForCloseButton => ref UnsafeUtility.AsRef(&NativePtr->TabMinWidthForCloseButton); + public ref ImGuiDir ColorButtonPosition => ref UnsafeUtility.AsRef(&NativePtr->ColorButtonPosition); + public ref Vector2 ButtonTextAlign => ref UnsafeUtility.AsRef(&NativePtr->ButtonTextAlign); + public ref Vector2 SelectableTextAlign => ref UnsafeUtility.AsRef(&NativePtr->SelectableTextAlign); + public ref Vector2 DisplayWindowPadding => ref UnsafeUtility.AsRef(&NativePtr->DisplayWindowPadding); + public ref Vector2 DisplaySafeAreaPadding => ref UnsafeUtility.AsRef(&NativePtr->DisplaySafeAreaPadding); + public ref float MouseCursorScale => ref UnsafeUtility.AsRef(&NativePtr->MouseCursorScale); + public ref bool AntiAliasedLines => ref UnsafeUtility.AsRef(&NativePtr->AntiAliasedLines); + public ref bool AntiAliasedLinesUseTex => ref UnsafeUtility.AsRef(&NativePtr->AntiAliasedLinesUseTex); + public ref bool AntiAliasedFill => ref UnsafeUtility.AsRef(&NativePtr->AntiAliasedFill); + public ref float CurveTessellationTol => ref UnsafeUtility.AsRef(&NativePtr->CurveTessellationTol); + public ref float CircleTessellationMaxError => ref UnsafeUtility.AsRef(&NativePtr->CircleTessellationMaxError); + public RangeAccessor Colors => new RangeAccessor(&NativePtr->Colors_0, 55); public void Destroy() { - ImGuiNative.ImGuiStyle_destroy(NativePtr); + ImGuiNative.ImGuiStyle_destroy((ImGuiStyle*)(NativePtr)); } public void ScaleAllSizes(float scale_factor) { - ImGuiNative.ImGuiStyle_ScaleAllSizes(NativePtr, scale_factor); + ImGuiNative.ImGuiStyle_ScaleAllSizes((ImGuiStyle*)(NativePtr), scale_factor); } } } diff --git a/ImGuiNET/Wrapper/Generated/ImGuiStyleVar.gen.cs b/ImGuiNET/Wrapper/Generated/ImGuiStyleVar.gen.cs index 660a2b8..ffa53e5 100644 --- a/ImGuiNET/Wrapper/Generated/ImGuiStyleVar.gen.cs +++ b/ImGuiNET/Wrapper/Generated/ImGuiStyleVar.gen.cs @@ -3,28 +3,30 @@ namespace ImGuiNET public enum ImGuiStyleVar { Alpha = 0, - WindowPadding = 1, - WindowRounding = 2, - WindowBorderSize = 3, - WindowMinSize = 4, - WindowTitleAlign = 5, - ChildRounding = 6, - ChildBorderSize = 7, - PopupRounding = 8, - PopupBorderSize = 9, - FramePadding = 10, - FrameRounding = 11, - FrameBorderSize = 12, - ItemSpacing = 13, - ItemInnerSpacing = 14, - IndentSpacing = 15, - ScrollbarSize = 16, - ScrollbarRounding = 17, - GrabMinSize = 18, - GrabRounding = 19, - TabRounding = 20, - ButtonTextAlign = 21, - SelectableTextAlign = 22, - COUNT = 23, + DisabledAlpha = 1, + WindowPadding = 2, + WindowRounding = 3, + WindowBorderSize = 4, + WindowMinSize = 5, + WindowTitleAlign = 6, + ChildRounding = 7, + ChildBorderSize = 8, + PopupRounding = 9, + PopupBorderSize = 10, + FramePadding = 11, + FrameRounding = 12, + FrameBorderSize = 13, + ItemSpacing = 14, + ItemInnerSpacing = 15, + IndentSpacing = 16, + CellPadding = 17, + ScrollbarSize = 18, + ScrollbarRounding = 19, + GrabMinSize = 20, + GrabRounding = 21, + TabRounding = 22, + ButtonTextAlign = 23, + SelectableTextAlign = 24, + COUNT = 25, } } diff --git a/ImGuiNET/Wrapper/Generated/ImGuiTabBarFlags.gen.cs b/ImGuiNET/Wrapper/Generated/ImGuiTabBarFlags.gen.cs index fcdf6a6..c5b82bf 100644 --- a/ImGuiNET/Wrapper/Generated/ImGuiTabBarFlags.gen.cs +++ b/ImGuiNET/Wrapper/Generated/ImGuiTabBarFlags.gen.cs @@ -4,15 +4,15 @@ namespace ImGuiNET public enum ImGuiTabBarFlags { None = 0, - Reorderable = 1 << 0, - AutoSelectNewTabs = 1 << 1, - TabListPopupButton = 1 << 2, - NoCloseWithMiddleMouseButton = 1 << 3, - NoTabListScrollingButtons = 1 << 4, - NoTooltip = 1 << 5, - FittingPolicyResizeDown = 1 << 6, - FittingPolicyScroll = 1 << 7, - FittingPolicyMask = FittingPolicyResizeDown | FittingPolicyScroll, - FittingPolicyDefault = FittingPolicyResizeDown, + Reorderable = 1, + AutoSelectNewTabs = 2, + TabListPopupButton = 4, + NoCloseWithMiddleMouseButton = 8, + NoTabListScrollingButtons = 16, + NoTooltip = 32, + FittingPolicyResizeDown = 64, + FittingPolicyScroll = 128, + FittingPolicyMask = 192, + FittingPolicyDefault = 64, } } diff --git a/ImGuiNET/Wrapper/Generated/ImGuiTabItemFlags.gen.cs b/ImGuiNET/Wrapper/Generated/ImGuiTabItemFlags.gen.cs index 963b4cd..18e2c01 100644 --- a/ImGuiNET/Wrapper/Generated/ImGuiTabItemFlags.gen.cs +++ b/ImGuiNET/Wrapper/Generated/ImGuiTabItemFlags.gen.cs @@ -4,9 +4,13 @@ namespace ImGuiNET public enum ImGuiTabItemFlags { None = 0, - UnsavedDocument = 1 << 0, - SetSelected = 1 << 1, - NoCloseWithMiddleMouseButton = 1 << 2, - NoPushId = 1 << 3, + UnsavedDocument = 1, + SetSelected = 2, + NoCloseWithMiddleMouseButton = 4, + NoPushId = 8, + NoTooltip = 16, + NoReorder = 32, + Leading = 64, + Trailing = 128, } } diff --git a/ImGuiNET/Wrapper/Generated/ImGuiTableBgTarget.gen.cs b/ImGuiNET/Wrapper/Generated/ImGuiTableBgTarget.gen.cs new file mode 100644 index 0000000..83a1102 --- /dev/null +++ b/ImGuiNET/Wrapper/Generated/ImGuiTableBgTarget.gen.cs @@ -0,0 +1,10 @@ +namespace ImGuiNET +{ + public enum ImGuiTableBgTarget + { + None = 0, + RowBg0 = 1, + RowBg1 = 2, + CellBg = 3, + } +} diff --git a/ImGuiNET/Wrapper/Generated/ImGuiTableBgTarget.gen.cs.meta b/ImGuiNET/Wrapper/Generated/ImGuiTableBgTarget.gen.cs.meta new file mode 100644 index 0000000..1088f2d --- /dev/null +++ b/ImGuiNET/Wrapper/Generated/ImGuiTableBgTarget.gen.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e76deca1cfe88ac448461485b7856eaf +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/ImGuiNET/Wrapper/Generated/ImGuiTableColumnFlags.gen.cs b/ImGuiNET/Wrapper/Generated/ImGuiTableColumnFlags.gen.cs new file mode 100644 index 0000000..e377cdc --- /dev/null +++ b/ImGuiNET/Wrapper/Generated/ImGuiTableColumnFlags.gen.cs @@ -0,0 +1,34 @@ +namespace ImGuiNET +{ + [System.Flags] + public enum ImGuiTableColumnFlags + { + None = 0, + Disabled = 1, + DefaultHide = 2, + DefaultSort = 4, + WidthStretch = 8, + WidthFixed = 16, + NoResize = 32, + NoReorder = 64, + NoHide = 128, + NoClip = 256, + NoSort = 512, + NoSortAscending = 1024, + NoSortDescending = 2048, + NoHeaderLabel = 4096, + NoHeaderWidth = 8192, + PreferSortAscending = 16384, + PreferSortDescending = 32768, + IndentEnable = 65536, + IndentDisable = 131072, + IsEnabled = 16777216, + IsVisible = 33554432, + IsSorted = 67108864, + IsHovered = 134217728, + WidthMask = 24, + IndentMask = 196608, + StatusMask = 251658240, + NoDirectResize = 1073741824, + } +} diff --git a/ImGuiNET/Wrapper/Generated/ImGuiTableColumnFlags.gen.cs.meta b/ImGuiNET/Wrapper/Generated/ImGuiTableColumnFlags.gen.cs.meta new file mode 100644 index 0000000..5c43ca2 --- /dev/null +++ b/ImGuiNET/Wrapper/Generated/ImGuiTableColumnFlags.gen.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b8dfd4f6b04e7ed48b77d8a834def218 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/ImGuiNET/Wrapper/Generated/ImGuiTableColumnSortSpecs.gen.cs b/ImGuiNET/Wrapper/Generated/ImGuiTableColumnSortSpecs.gen.cs new file mode 100644 index 0000000..eaa4212 --- /dev/null +++ b/ImGuiNET/Wrapper/Generated/ImGuiTableColumnSortSpecs.gen.cs @@ -0,0 +1,32 @@ +using System; +using UnityEngine; +using Unity.Collections.LowLevel.Unsafe; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct ImGuiTableColumnSortSpecs + { + public uint ColumnUserID; + public short ColumnIndex; + public short SortOrder; + public ImGuiSortDirection SortDirection; + } + public unsafe partial struct ImGuiTableColumnSortSpecsPtr + { + public ImGuiTableColumnSortSpecs* NativePtr { get; } + public ImGuiTableColumnSortSpecsPtr(ImGuiTableColumnSortSpecs* nativePtr) => NativePtr = nativePtr; + public ImGuiTableColumnSortSpecsPtr(IntPtr nativePtr) => NativePtr = (ImGuiTableColumnSortSpecs*)nativePtr; + public static implicit operator ImGuiTableColumnSortSpecsPtr(ImGuiTableColumnSortSpecs* nativePtr) => new ImGuiTableColumnSortSpecsPtr(nativePtr); + public static implicit operator ImGuiTableColumnSortSpecs* (ImGuiTableColumnSortSpecsPtr wrappedPtr) => wrappedPtr.NativePtr; + public static implicit operator ImGuiTableColumnSortSpecsPtr(IntPtr nativePtr) => new ImGuiTableColumnSortSpecsPtr(nativePtr); + public ref uint ColumnUserID => ref UnsafeUtility.AsRef(&NativePtr->ColumnUserID); + public ref short ColumnIndex => ref UnsafeUtility.AsRef(&NativePtr->ColumnIndex); + public ref short SortOrder => ref UnsafeUtility.AsRef(&NativePtr->SortOrder); + public ref ImGuiSortDirection SortDirection => ref UnsafeUtility.AsRef(&NativePtr->SortDirection); + public void Destroy() + { + ImGuiNative.ImGuiTableColumnSortSpecs_destroy((ImGuiTableColumnSortSpecs*)(NativePtr)); + } + } +} diff --git a/ImGuiNET/Wrapper/Generated/ImGuiTableColumnSortSpecs.gen.cs.meta b/ImGuiNET/Wrapper/Generated/ImGuiTableColumnSortSpecs.gen.cs.meta new file mode 100644 index 0000000..4b45a19 --- /dev/null +++ b/ImGuiNET/Wrapper/Generated/ImGuiTableColumnSortSpecs.gen.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 0231cb811c978ae4e81b2a54e92d5539 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/ImGuiNET/Wrapper/Generated/ImGuiTableFlags.gen.cs b/ImGuiNET/Wrapper/Generated/ImGuiTableFlags.gen.cs new file mode 100644 index 0000000..c7f0a5f --- /dev/null +++ b/ImGuiNET/Wrapper/Generated/ImGuiTableFlags.gen.cs @@ -0,0 +1,43 @@ +namespace ImGuiNET +{ + [System.Flags] + public enum ImGuiTableFlags + { + None = 0, + Resizable = 1, + Reorderable = 2, + Hideable = 4, + Sortable = 8, + NoSavedSettings = 16, + ContextMenuInBody = 32, + RowBg = 64, + BordersInnerH = 128, + BordersOuterH = 256, + BordersInnerV = 512, + BordersOuterV = 1024, + BordersH = 384, + BordersV = 1536, + BordersInner = 640, + BordersOuter = 1280, + Borders = 1920, + NoBordersInBody = 2048, + NoBordersInBodyUntilResize = 4096, + SizingFixedFit = 8192, + SizingFixedSame = 16384, + SizingStretchProp = 24576, + SizingStretchSame = 32768, + NoHostExtendX = 65536, + NoHostExtendY = 131072, + NoKeepColumnsVisible = 262144, + PreciseWidths = 524288, + NoClip = 1048576, + PadOuterX = 2097152, + NoPadOuterX = 4194304, + NoPadInnerX = 8388608, + ScrollX = 16777216, + ScrollY = 33554432, + SortMulti = 67108864, + SortTristate = 134217728, + SizingMask = 57344, + } +} diff --git a/ImGuiNET/Wrapper/Generated/ImGuiTableFlags.gen.cs.meta b/ImGuiNET/Wrapper/Generated/ImGuiTableFlags.gen.cs.meta new file mode 100644 index 0000000..7a91d99 --- /dev/null +++ b/ImGuiNET/Wrapper/Generated/ImGuiTableFlags.gen.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b5b59caf131a3f049847243a4dac74e3 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/ImGuiNET/Wrapper/Generated/ImGuiTableRowFlags.gen.cs b/ImGuiNET/Wrapper/Generated/ImGuiTableRowFlags.gen.cs new file mode 100644 index 0000000..e90a011 --- /dev/null +++ b/ImGuiNET/Wrapper/Generated/ImGuiTableRowFlags.gen.cs @@ -0,0 +1,9 @@ +namespace ImGuiNET +{ + [System.Flags] + public enum ImGuiTableRowFlags + { + None = 0, + Headers = 1, + } +} diff --git a/ImGuiNET/Wrapper/Generated/ImGuiTableRowFlags.gen.cs.meta b/ImGuiNET/Wrapper/Generated/ImGuiTableRowFlags.gen.cs.meta new file mode 100644 index 0000000..2ae96eb --- /dev/null +++ b/ImGuiNET/Wrapper/Generated/ImGuiTableRowFlags.gen.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 724525d6af741de4e8622a0422a96d0e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/ImGuiNET/Wrapper/Generated/ImGuiTableSortSpecs.gen.cs b/ImGuiNET/Wrapper/Generated/ImGuiTableSortSpecs.gen.cs new file mode 100644 index 0000000..92806a3 --- /dev/null +++ b/ImGuiNET/Wrapper/Generated/ImGuiTableSortSpecs.gen.cs @@ -0,0 +1,30 @@ +using System; +using UnityEngine; +using Unity.Collections.LowLevel.Unsafe; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct ImGuiTableSortSpecs + { + public ImGuiTableColumnSortSpecs* Specs; + public int SpecsCount; + public byte SpecsDirty; + } + public unsafe partial struct ImGuiTableSortSpecsPtr + { + public ImGuiTableSortSpecs* NativePtr { get; } + public ImGuiTableSortSpecsPtr(ImGuiTableSortSpecs* nativePtr) => NativePtr = nativePtr; + public ImGuiTableSortSpecsPtr(IntPtr nativePtr) => NativePtr = (ImGuiTableSortSpecs*)nativePtr; + public static implicit operator ImGuiTableSortSpecsPtr(ImGuiTableSortSpecs* nativePtr) => new ImGuiTableSortSpecsPtr(nativePtr); + public static implicit operator ImGuiTableSortSpecs* (ImGuiTableSortSpecsPtr wrappedPtr) => wrappedPtr.NativePtr; + public static implicit operator ImGuiTableSortSpecsPtr(IntPtr nativePtr) => new ImGuiTableSortSpecsPtr(nativePtr); + public ImGuiTableColumnSortSpecsPtr Specs => new ImGuiTableColumnSortSpecsPtr(NativePtr->Specs); + public ref int SpecsCount => ref UnsafeUtility.AsRef(&NativePtr->SpecsCount); + public ref bool SpecsDirty => ref UnsafeUtility.AsRef(&NativePtr->SpecsDirty); + public void Destroy() + { + ImGuiNative.ImGuiTableSortSpecs_destroy((ImGuiTableSortSpecs*)(NativePtr)); + } + } +} diff --git a/ImGuiNET/Wrapper/Generated/ImGuiTableSortSpecs.gen.cs.meta b/ImGuiNET/Wrapper/Generated/ImGuiTableSortSpecs.gen.cs.meta new file mode 100644 index 0000000..ba11e6c --- /dev/null +++ b/ImGuiNET/Wrapper/Generated/ImGuiTableSortSpecs.gen.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: dab6dc33074c2f7449e8ba07110d17df +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/ImGuiNET/Wrapper/Generated/ImGuiTextBuffer.gen.cs b/ImGuiNET/Wrapper/Generated/ImGuiTextBuffer.gen.cs index 6f44c14..488a7c3 100644 --- a/ImGuiNET/Wrapper/Generated/ImGuiTextBuffer.gen.cs +++ b/ImGuiNET/Wrapper/Generated/ImGuiTextBuffer.gen.cs @@ -1,7 +1,7 @@ using System; -using System.Runtime.CompilerServices; -using System.Text; using UnityEngine; +using Unity.Collections.LowLevel.Unsafe; +using System.Text; namespace ImGuiNET { @@ -39,7 +39,7 @@ public void append(string str) } else { native_str = null; } byte* native_str_end = null; - ImGuiNative.ImGuiTextBuffer_append(NativePtr, native_str, native_str_end); + ImGuiNative.ImGuiTextBuffer_append((ImGuiTextBuffer*)(NativePtr), native_str, native_str_end); if (str_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_str); @@ -65,7 +65,7 @@ public void appendf(string fmt) native_fmt[native_fmt_offset] = 0; } else { native_fmt = null; } - ImGuiNative.ImGuiTextBuffer_appendf(NativePtr, native_fmt); + ImGuiNative.ImGuiTextBuffer_appendf((ImGuiTextBuffer*)(NativePtr), native_fmt); if (fmt_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_fmt); @@ -73,39 +73,39 @@ public void appendf(string fmt) } public string begin() { - byte* ret = ImGuiNative.ImGuiTextBuffer_begin(NativePtr); + byte* ret = ImGuiNative.ImGuiTextBuffer_begin((ImGuiTextBuffer*)(NativePtr)); return Util.StringFromPtr(ret); } public string c_str() { - byte* ret = ImGuiNative.ImGuiTextBuffer_c_str(NativePtr); + byte* ret = ImGuiNative.ImGuiTextBuffer_c_str((ImGuiTextBuffer*)(NativePtr)); return Util.StringFromPtr(ret); } public void clear() { - ImGuiNative.ImGuiTextBuffer_clear(NativePtr); + ImGuiNative.ImGuiTextBuffer_clear((ImGuiTextBuffer*)(NativePtr)); } public void Destroy() { - ImGuiNative.ImGuiTextBuffer_destroy(NativePtr); + ImGuiNative.ImGuiTextBuffer_destroy((ImGuiTextBuffer*)(NativePtr)); } public bool empty() { - byte ret = ImGuiNative.ImGuiTextBuffer_empty(NativePtr); + byte ret = ImGuiNative.ImGuiTextBuffer_empty((ImGuiTextBuffer*)(NativePtr)); return ret != 0; } public string end() { - byte* ret = ImGuiNative.ImGuiTextBuffer_end(NativePtr); + byte* ret = ImGuiNative.ImGuiTextBuffer_end((ImGuiTextBuffer*)(NativePtr)); return Util.StringFromPtr(ret); } public void reserve(int capacity) { - ImGuiNative.ImGuiTextBuffer_reserve(NativePtr, capacity); + ImGuiNative.ImGuiTextBuffer_reserve((ImGuiTextBuffer*)(NativePtr), capacity); } public int size() { - int ret = ImGuiNative.ImGuiTextBuffer_size(NativePtr); + int ret = ImGuiNative.ImGuiTextBuffer_size((ImGuiTextBuffer*)(NativePtr)); return ret; } } diff --git a/ImGuiNET/Wrapper/Generated/ImGuiTextFilter.gen.cs b/ImGuiNET/Wrapper/Generated/ImGuiTextFilter.gen.cs index 1a298a8..7b7b002 100644 --- a/ImGuiNET/Wrapper/Generated/ImGuiTextFilter.gen.cs +++ b/ImGuiNET/Wrapper/Generated/ImGuiTextFilter.gen.cs @@ -1,7 +1,7 @@ using System; -using System.Runtime.CompilerServices; -using System.Text; using UnityEngine; +using Unity.Collections.LowLevel.Unsafe; +using System.Text; namespace ImGuiNET { @@ -20,19 +20,19 @@ public unsafe partial struct ImGuiTextFilterPtr public static implicit operator ImGuiTextFilter* (ImGuiTextFilterPtr wrappedPtr) => wrappedPtr.NativePtr; public static implicit operator ImGuiTextFilterPtr(IntPtr nativePtr) => new ImGuiTextFilterPtr(nativePtr); public RangeAccessor InputBuf => new RangeAccessor(NativePtr->InputBuf, 256); - public ImPtrVector Filters => new ImPtrVector(NativePtr->Filters, Unsafe.SizeOf()); - public ref int CountGrep => ref Unsafe.AsRef(&NativePtr->CountGrep); + public ImPtrVector Filters => new ImPtrVector(NativePtr->Filters, UnsafeUtility.SizeOf()); + public ref int CountGrep => ref UnsafeUtility.AsRef(&NativePtr->CountGrep); public void Build() { - ImGuiNative.ImGuiTextFilter_Build(NativePtr); + ImGuiNative.ImGuiTextFilter_Build((ImGuiTextFilter*)(NativePtr)); } public void Clear() { - ImGuiNative.ImGuiTextFilter_Clear(NativePtr); + ImGuiNative.ImGuiTextFilter_Clear((ImGuiTextFilter*)(NativePtr)); } public void Destroy() { - ImGuiNative.ImGuiTextFilter_destroy(NativePtr); + ImGuiNative.ImGuiTextFilter_destroy((ImGuiTextFilter*)(NativePtr)); } public bool Draw() { @@ -51,7 +51,7 @@ public bool Draw() int native_label_offset = Util.GetUtf8("Filter(inc,-exc)", native_label, label_byteCount); native_label[native_label_offset] = 0; float width = 0.0f; - byte ret = ImGuiNative.ImGuiTextFilter_Draw(NativePtr, native_label, width); + byte ret = ImGuiNative.ImGuiTextFilter_Draw((ImGuiTextFilter*)(NativePtr), native_label, width); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -79,7 +79,7 @@ public bool Draw(string label) } else { native_label = null; } float width = 0.0f; - byte ret = ImGuiNative.ImGuiTextFilter_Draw(NativePtr, native_label, width); + byte ret = ImGuiNative.ImGuiTextFilter_Draw((ImGuiTextFilter*)(NativePtr), native_label, width); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -106,7 +106,7 @@ public bool Draw(string label, float width) native_label[native_label_offset] = 0; } else { native_label = null; } - byte ret = ImGuiNative.ImGuiTextFilter_Draw(NativePtr, native_label, width); + byte ret = ImGuiNative.ImGuiTextFilter_Draw((ImGuiTextFilter*)(NativePtr), native_label, width); if (label_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_label); @@ -115,7 +115,7 @@ public bool Draw(string label, float width) } public bool IsActive() { - byte ret = ImGuiNative.ImGuiTextFilter_IsActive(NativePtr); + byte ret = ImGuiNative.ImGuiTextFilter_IsActive((ImGuiTextFilter*)(NativePtr)); return ret != 0; } public bool PassFilter(string text) @@ -139,7 +139,7 @@ public bool PassFilter(string text) } else { native_text = null; } byte* native_text_end = null; - byte ret = ImGuiNative.ImGuiTextFilter_PassFilter(NativePtr, native_text, native_text_end); + byte ret = ImGuiNative.ImGuiTextFilter_PassFilter((ImGuiTextFilter*)(NativePtr), native_text, native_text_end); if (text_byteCount > Util.StackAllocationSizeLimit) { Util.Free(native_text); diff --git a/ImGuiNET/Wrapper/Generated/ImGuiTextRange.gen.cs b/ImGuiNET/Wrapper/Generated/ImGuiTextRange.gen.cs index 0731754..2e27ea4 100644 --- a/ImGuiNET/Wrapper/Generated/ImGuiTextRange.gen.cs +++ b/ImGuiNET/Wrapper/Generated/ImGuiTextRange.gen.cs @@ -1,7 +1,7 @@ using System; -using System.Runtime.CompilerServices; -using System.Text; using UnityEngine; +using Unity.Collections.LowLevel.Unsafe; +using System.Text; namespace ImGuiNET { @@ -22,18 +22,18 @@ public unsafe partial struct ImGuiTextRangePtr public IntPtr e { get => (IntPtr)NativePtr->e; set => NativePtr->e = (byte*)value; } public void Destroy() { - ImGuiNative.ImGuiTextRange_destroy(NativePtr); + ImGuiNative.ImGuiTextRange_destroy((ImGuiTextRange*)(NativePtr)); } public bool empty() { - byte ret = ImGuiNative.ImGuiTextRange_empty(NativePtr); + byte ret = ImGuiNative.ImGuiTextRange_empty((ImGuiTextRange*)(NativePtr)); return ret != 0; } public void split(byte separator, out ImVector @out) { fixed (ImVector* native_out = &@out) { - ImGuiNative.ImGuiTextRange_split(NativePtr, separator, native_out); + ImGuiNative.ImGuiTextRange_split((ImGuiTextRange*)(NativePtr), separator, native_out); } } } diff --git a/ImGuiNET/Wrapper/Generated/ImGuiTreeNodeFlags.gen.cs b/ImGuiNET/Wrapper/Generated/ImGuiTreeNodeFlags.gen.cs index 715a125..7f84875 100644 --- a/ImGuiNET/Wrapper/Generated/ImGuiTreeNodeFlags.gen.cs +++ b/ImGuiNET/Wrapper/Generated/ImGuiTreeNodeFlags.gen.cs @@ -4,20 +4,20 @@ namespace ImGuiNET public enum ImGuiTreeNodeFlags { None = 0, - Selected = 1 << 0, - Framed = 1 << 1, - AllowItemOverlap = 1 << 2, - NoTreePushOnOpen = 1 << 3, - NoAutoOpenOnLog = 1 << 4, - DefaultOpen = 1 << 5, - OpenOnDoubleClick = 1 << 6, - OpenOnArrow = 1 << 7, - Leaf = 1 << 8, - Bullet = 1 << 9, - FramePadding = 1 << 10, - SpanAvailWidth = 1 << 11, - SpanFullWidth = 1 << 12, - NavLeftJumpsBackHere = 1 << 13, - CollapsingHeader = Framed | NoTreePushOnOpen | NoAutoOpenOnLog, + Selected = 1, + Framed = 2, + AllowItemOverlap = 4, + NoTreePushOnOpen = 8, + NoAutoOpenOnLog = 16, + DefaultOpen = 32, + OpenOnDoubleClick = 64, + OpenOnArrow = 128, + Leaf = 256, + Bullet = 512, + FramePadding = 1024, + SpanAvailWidth = 2048, + SpanFullWidth = 4096, + NavLeftJumpsBackHere = 8192, + CollapsingHeader = 26, } } diff --git a/ImGuiNET/Wrapper/Generated/ImGuiViewport.gen.cs b/ImGuiNET/Wrapper/Generated/ImGuiViewport.gen.cs new file mode 100644 index 0000000..bc471ca --- /dev/null +++ b/ImGuiNET/Wrapper/Generated/ImGuiViewport.gen.cs @@ -0,0 +1,68 @@ +using System; +using UnityEngine; +using Unity.Collections.LowLevel.Unsafe; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct ImGuiViewport + { + public uint ID; + public ImGuiViewportFlags Flags; + public Vector2 Pos; + public Vector2 Size; + public Vector2 WorkPos; + public Vector2 WorkSize; + public float DpiScale; + public uint ParentViewportId; + public ImDrawData* DrawData; + public void* RendererUserData; + public void* PlatformUserData; + public void* PlatformHandle; + public void* PlatformHandleRaw; + public byte PlatformRequestMove; + public byte PlatformRequestResize; + public byte PlatformRequestClose; + } + public unsafe partial struct ImGuiViewportPtr + { + public ImGuiViewport* NativePtr { get; } + public ImGuiViewportPtr(ImGuiViewport* nativePtr) => NativePtr = nativePtr; + public ImGuiViewportPtr(IntPtr nativePtr) => NativePtr = (ImGuiViewport*)nativePtr; + public static implicit operator ImGuiViewportPtr(ImGuiViewport* nativePtr) => new ImGuiViewportPtr(nativePtr); + public static implicit operator ImGuiViewport* (ImGuiViewportPtr wrappedPtr) => wrappedPtr.NativePtr; + public static implicit operator ImGuiViewportPtr(IntPtr nativePtr) => new ImGuiViewportPtr(nativePtr); + public ref uint ID => ref UnsafeUtility.AsRef(&NativePtr->ID); + public ref ImGuiViewportFlags Flags => ref UnsafeUtility.AsRef(&NativePtr->Flags); + public ref Vector2 Pos => ref UnsafeUtility.AsRef(&NativePtr->Pos); + public ref Vector2 Size => ref UnsafeUtility.AsRef(&NativePtr->Size); + public ref Vector2 WorkPos => ref UnsafeUtility.AsRef(&NativePtr->WorkPos); + public ref Vector2 WorkSize => ref UnsafeUtility.AsRef(&NativePtr->WorkSize); + public ref float DpiScale => ref UnsafeUtility.AsRef(&NativePtr->DpiScale); + public ref uint ParentViewportId => ref UnsafeUtility.AsRef(&NativePtr->ParentViewportId); + public ImDrawDataPtr DrawData => new ImDrawDataPtr(NativePtr->DrawData); + public IntPtr RendererUserData { get => (IntPtr)NativePtr->RendererUserData; set => NativePtr->RendererUserData = (void*)value; } + public IntPtr PlatformUserData { get => (IntPtr)NativePtr->PlatformUserData; set => NativePtr->PlatformUserData = (void*)value; } + public IntPtr PlatformHandle { get => (IntPtr)NativePtr->PlatformHandle; set => NativePtr->PlatformHandle = (void*)value; } + public IntPtr PlatformHandleRaw { get => (IntPtr)NativePtr->PlatformHandleRaw; set => NativePtr->PlatformHandleRaw = (void*)value; } + public ref bool PlatformRequestMove => ref UnsafeUtility.AsRef(&NativePtr->PlatformRequestMove); + public ref bool PlatformRequestResize => ref UnsafeUtility.AsRef(&NativePtr->PlatformRequestResize); + public ref bool PlatformRequestClose => ref UnsafeUtility.AsRef(&NativePtr->PlatformRequestClose); + public void Destroy() + { + ImGuiNative.ImGuiViewport_destroy((ImGuiViewport*)(NativePtr)); + } + public Vector2 GetCenter() + { + Vector2 __retval; + ImGuiNative.ImGuiViewport_GetCenter(&__retval, (ImGuiViewport*)(NativePtr)); + return __retval; + } + public Vector2 GetWorkCenter() + { + Vector2 __retval; + ImGuiNative.ImGuiViewport_GetWorkCenter(&__retval, (ImGuiViewport*)(NativePtr)); + return __retval; + } + } +} diff --git a/ImGuiNET/Wrapper/Generated/ImGuiViewport.gen.cs.meta b/ImGuiNET/Wrapper/Generated/ImGuiViewport.gen.cs.meta new file mode 100644 index 0000000..11950d9 --- /dev/null +++ b/ImGuiNET/Wrapper/Generated/ImGuiViewport.gen.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3d0344669c7d0084f97bd2d0419582eb +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/ImGuiNET/Wrapper/Generated/ImGuiViewportFlags.gen.cs b/ImGuiNET/Wrapper/Generated/ImGuiViewportFlags.gen.cs new file mode 100644 index 0000000..463d0a1 --- /dev/null +++ b/ImGuiNET/Wrapper/Generated/ImGuiViewportFlags.gen.cs @@ -0,0 +1,21 @@ +namespace ImGuiNET +{ + [System.Flags] + public enum ImGuiViewportFlags + { + None = 0, + IsPlatformWindow = 1, + IsPlatformMonitor = 2, + OwnedByApp = 4, + NoDecoration = 8, + NoTaskBarIcon = 16, + NoFocusOnAppearing = 32, + NoFocusOnClick = 64, + NoInputs = 128, + NoRendererClear = 256, + TopMost = 512, + Minimized = 1024, + NoAutoMerge = 2048, + CanHostOtherWindows = 4096, + } +} diff --git a/ImGuiNET/Wrapper/Generated/ImGuiViewportFlags.gen.cs.meta b/ImGuiNET/Wrapper/Generated/ImGuiViewportFlags.gen.cs.meta new file mode 100644 index 0000000..4e9d94a --- /dev/null +++ b/ImGuiNET/Wrapper/Generated/ImGuiViewportFlags.gen.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: cdb9e34480e77b045946df5a02c9a884 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/ImGuiNET/Wrapper/Generated/ImGuiWindowClass.gen.cs b/ImGuiNET/Wrapper/Generated/ImGuiWindowClass.gen.cs new file mode 100644 index 0000000..f31b015 --- /dev/null +++ b/ImGuiNET/Wrapper/Generated/ImGuiWindowClass.gen.cs @@ -0,0 +1,40 @@ +using System; +using UnityEngine; +using Unity.Collections.LowLevel.Unsafe; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct ImGuiWindowClass + { + public uint ClassId; + public uint ParentViewportId; + public ImGuiViewportFlags ViewportFlagsOverrideSet; + public ImGuiViewportFlags ViewportFlagsOverrideClear; + public ImGuiTabItemFlags TabItemFlagsOverrideSet; + public ImGuiDockNodeFlags DockNodeFlagsOverrideSet; + public byte DockingAlwaysTabBar; + public byte DockingAllowUnclassed; + } + public unsafe partial struct ImGuiWindowClassPtr + { + public ImGuiWindowClass* NativePtr { get; } + public ImGuiWindowClassPtr(ImGuiWindowClass* nativePtr) => NativePtr = nativePtr; + public ImGuiWindowClassPtr(IntPtr nativePtr) => NativePtr = (ImGuiWindowClass*)nativePtr; + public static implicit operator ImGuiWindowClassPtr(ImGuiWindowClass* nativePtr) => new ImGuiWindowClassPtr(nativePtr); + public static implicit operator ImGuiWindowClass* (ImGuiWindowClassPtr wrappedPtr) => wrappedPtr.NativePtr; + public static implicit operator ImGuiWindowClassPtr(IntPtr nativePtr) => new ImGuiWindowClassPtr(nativePtr); + public ref uint ClassId => ref UnsafeUtility.AsRef(&NativePtr->ClassId); + public ref uint ParentViewportId => ref UnsafeUtility.AsRef(&NativePtr->ParentViewportId); + public ref ImGuiViewportFlags ViewportFlagsOverrideSet => ref UnsafeUtility.AsRef(&NativePtr->ViewportFlagsOverrideSet); + public ref ImGuiViewportFlags ViewportFlagsOverrideClear => ref UnsafeUtility.AsRef(&NativePtr->ViewportFlagsOverrideClear); + public ref ImGuiTabItemFlags TabItemFlagsOverrideSet => ref UnsafeUtility.AsRef(&NativePtr->TabItemFlagsOverrideSet); + public ref ImGuiDockNodeFlags DockNodeFlagsOverrideSet => ref UnsafeUtility.AsRef(&NativePtr->DockNodeFlagsOverrideSet); + public ref bool DockingAlwaysTabBar => ref UnsafeUtility.AsRef(&NativePtr->DockingAlwaysTabBar); + public ref bool DockingAllowUnclassed => ref UnsafeUtility.AsRef(&NativePtr->DockingAllowUnclassed); + public void Destroy() + { + ImGuiNative.ImGuiWindowClass_destroy((ImGuiWindowClass*)(NativePtr)); + } + } +} diff --git a/ImGuiNET/Wrapper/Generated/ImGuiWindowClass.gen.cs.meta b/ImGuiNET/Wrapper/Generated/ImGuiWindowClass.gen.cs.meta new file mode 100644 index 0000000..4dd1739 --- /dev/null +++ b/ImGuiNET/Wrapper/Generated/ImGuiWindowClass.gen.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2ce76edd47469ef4093a045ee7dd9c61 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/ImGuiNET/Wrapper/Generated/ImGuiWindowFlags.gen.cs b/ImGuiNET/Wrapper/Generated/ImGuiWindowFlags.gen.cs index 43e1390..be9ed0f 100644 --- a/ImGuiNET/Wrapper/Generated/ImGuiWindowFlags.gen.cs +++ b/ImGuiNET/Wrapper/Generated/ImGuiWindowFlags.gen.cs @@ -4,34 +4,36 @@ namespace ImGuiNET public enum ImGuiWindowFlags { None = 0, - NoTitleBar = 1 << 0, - NoResize = 1 << 1, - NoMove = 1 << 2, - NoScrollbar = 1 << 3, - NoScrollWithMouse = 1 << 4, - NoCollapse = 1 << 5, - AlwaysAutoResize = 1 << 6, - NoBackground = 1 << 7, - NoSavedSettings = 1 << 8, - NoMouseInputs = 1 << 9, - MenuBar = 1 << 10, - HorizontalScrollbar = 1 << 11, - NoFocusOnAppearing = 1 << 12, - NoBringToFrontOnFocus = 1 << 13, - AlwaysVerticalScrollbar = 1 << 14, - AlwaysHorizontalScrollbar = 1<< 15, - AlwaysUseWindowPadding = 1 << 16, - NoNavInputs = 1 << 18, - NoNavFocus = 1 << 19, - UnsavedDocument = 1 << 20, - NoNav = NoNavInputs | NoNavFocus, - NoDecoration = NoTitleBar | NoResize | NoScrollbar | NoCollapse, - NoInputs = NoMouseInputs | NoNavInputs | NoNavFocus, - NavFlattened = 1 << 23, - ChildWindow = 1 << 24, - Tooltip = 1 << 25, - Popup = 1 << 26, - Modal = 1 << 27, - ChildMenu = 1 << 28, + NoTitleBar = 1, + NoResize = 2, + NoMove = 4, + NoScrollbar = 8, + NoScrollWithMouse = 16, + NoCollapse = 32, + AlwaysAutoResize = 64, + NoBackground = 128, + NoSavedSettings = 256, + NoMouseInputs = 512, + MenuBar = 1024, + HorizontalScrollbar = 2048, + NoFocusOnAppearing = 4096, + NoBringToFrontOnFocus = 8192, + AlwaysVerticalScrollbar = 16384, + AlwaysHorizontalScrollbar = 32768, + AlwaysUseWindowPadding = 65536, + NoNavInputs = 262144, + NoNavFocus = 524288, + UnsavedDocument = 1048576, + NoDocking = 2097152, + NoNav = 786432, + NoDecoration = 43, + NoInputs = 786944, + NavFlattened = 8388608, + ChildWindow = 16777216, + Tooltip = 33554432, + Popup = 67108864, + Modal = 134217728, + ChildMenu = 268435456, + DockNodeHost = 536870912, } } diff --git a/ImGuiNET/Wrapper/Generated/STB_TexteditState.gen.cs b/ImGuiNET/Wrapper/Generated/STB_TexteditState.gen.cs new file mode 100644 index 0000000..b9615ea --- /dev/null +++ b/ImGuiNET/Wrapper/Generated/STB_TexteditState.gen.cs @@ -0,0 +1,48 @@ +using System; +using UnityEngine; +using Unity.Collections.LowLevel.Unsafe; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct STB_TexteditState + { + public int cursor; + public int select_start; + public int select_end; + public byte insert_mode; + public int row_count_per_page; + public byte cursor_at_end_of_line; + public byte initialized; + public byte has_preferred_x; + public byte single_line; + public byte padding1; + public byte padding2; + public byte padding3; + public float preferred_x; + public StbUndoState undostate; + } + public unsafe partial struct STB_TexteditStatePtr + { + public STB_TexteditState* NativePtr { get; } + public STB_TexteditStatePtr(STB_TexteditState* nativePtr) => NativePtr = nativePtr; + public STB_TexteditStatePtr(IntPtr nativePtr) => NativePtr = (STB_TexteditState*)nativePtr; + public static implicit operator STB_TexteditStatePtr(STB_TexteditState* nativePtr) => new STB_TexteditStatePtr(nativePtr); + public static implicit operator STB_TexteditState* (STB_TexteditStatePtr wrappedPtr) => wrappedPtr.NativePtr; + public static implicit operator STB_TexteditStatePtr(IntPtr nativePtr) => new STB_TexteditStatePtr(nativePtr); + public ref int cursor => ref UnsafeUtility.AsRef(&NativePtr->cursor); + public ref int select_start => ref UnsafeUtility.AsRef(&NativePtr->select_start); + public ref int select_end => ref UnsafeUtility.AsRef(&NativePtr->select_end); + public ref byte insert_mode => ref UnsafeUtility.AsRef(&NativePtr->insert_mode); + public ref int row_count_per_page => ref UnsafeUtility.AsRef(&NativePtr->row_count_per_page); + public ref byte cursor_at_end_of_line => ref UnsafeUtility.AsRef(&NativePtr->cursor_at_end_of_line); + public ref byte initialized => ref UnsafeUtility.AsRef(&NativePtr->initialized); + public ref byte has_preferred_x => ref UnsafeUtility.AsRef(&NativePtr->has_preferred_x); + public ref byte single_line => ref UnsafeUtility.AsRef(&NativePtr->single_line); + public ref byte padding1 => ref UnsafeUtility.AsRef(&NativePtr->padding1); + public ref byte padding2 => ref UnsafeUtility.AsRef(&NativePtr->padding2); + public ref byte padding3 => ref UnsafeUtility.AsRef(&NativePtr->padding3); + public ref float preferred_x => ref UnsafeUtility.AsRef(&NativePtr->preferred_x); + public ref StbUndoState undostate => ref UnsafeUtility.AsRef(&NativePtr->undostate); + } +} diff --git a/ImGuiNET/Wrapper/Generated/STB_TexteditState.gen.cs.meta b/ImGuiNET/Wrapper/Generated/STB_TexteditState.gen.cs.meta new file mode 100644 index 0000000..27d2153 --- /dev/null +++ b/ImGuiNET/Wrapper/Generated/STB_TexteditState.gen.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e6366c8721db4fb44a2b579aac7a94f6 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/ImGuiNET/Wrapper/Generated/StbTexteditRow.gen.cs b/ImGuiNET/Wrapper/Generated/StbTexteditRow.gen.cs new file mode 100644 index 0000000..2505adf --- /dev/null +++ b/ImGuiNET/Wrapper/Generated/StbTexteditRow.gen.cs @@ -0,0 +1,32 @@ +using System; +using UnityEngine; +using Unity.Collections.LowLevel.Unsafe; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct StbTexteditRow + { + public float x0; + public float x1; + public float baseline_y_delta; + public float ymin; + public float ymax; + public int num_chars; + } + public unsafe partial struct StbTexteditRowPtr + { + public StbTexteditRow* NativePtr { get; } + public StbTexteditRowPtr(StbTexteditRow* nativePtr) => NativePtr = nativePtr; + public StbTexteditRowPtr(IntPtr nativePtr) => NativePtr = (StbTexteditRow*)nativePtr; + public static implicit operator StbTexteditRowPtr(StbTexteditRow* nativePtr) => new StbTexteditRowPtr(nativePtr); + public static implicit operator StbTexteditRow* (StbTexteditRowPtr wrappedPtr) => wrappedPtr.NativePtr; + public static implicit operator StbTexteditRowPtr(IntPtr nativePtr) => new StbTexteditRowPtr(nativePtr); + public ref float x0 => ref UnsafeUtility.AsRef(&NativePtr->x0); + public ref float x1 => ref UnsafeUtility.AsRef(&NativePtr->x1); + public ref float baseline_y_delta => ref UnsafeUtility.AsRef(&NativePtr->baseline_y_delta); + public ref float ymin => ref UnsafeUtility.AsRef(&NativePtr->ymin); + public ref float ymax => ref UnsafeUtility.AsRef(&NativePtr->ymax); + public ref int num_chars => ref UnsafeUtility.AsRef(&NativePtr->num_chars); + } +} diff --git a/ImGuiNET/Wrapper/Generated/StbTexteditRow.gen.cs.meta b/ImGuiNET/Wrapper/Generated/StbTexteditRow.gen.cs.meta new file mode 100644 index 0000000..9e62ad8 --- /dev/null +++ b/ImGuiNET/Wrapper/Generated/StbTexteditRow.gen.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: fc340e51e4504554e93549e48b1f784c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/ImGuiNET/Wrapper/Generated/StbUndoRecord.gen.cs b/ImGuiNET/Wrapper/Generated/StbUndoRecord.gen.cs new file mode 100644 index 0000000..a7a95b9 --- /dev/null +++ b/ImGuiNET/Wrapper/Generated/StbUndoRecord.gen.cs @@ -0,0 +1,28 @@ +using System; +using UnityEngine; +using Unity.Collections.LowLevel.Unsafe; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct StbUndoRecord + { + public int where; + public int insert_length; + public int delete_length; + public int char_storage; + } + public unsafe partial struct StbUndoRecordPtr + { + public StbUndoRecord* NativePtr { get; } + public StbUndoRecordPtr(StbUndoRecord* nativePtr) => NativePtr = nativePtr; + public StbUndoRecordPtr(IntPtr nativePtr) => NativePtr = (StbUndoRecord*)nativePtr; + public static implicit operator StbUndoRecordPtr(StbUndoRecord* nativePtr) => new StbUndoRecordPtr(nativePtr); + public static implicit operator StbUndoRecord* (StbUndoRecordPtr wrappedPtr) => wrappedPtr.NativePtr; + public static implicit operator StbUndoRecordPtr(IntPtr nativePtr) => new StbUndoRecordPtr(nativePtr); + public ref int where => ref UnsafeUtility.AsRef(&NativePtr->where); + public ref int insert_length => ref UnsafeUtility.AsRef(&NativePtr->insert_length); + public ref int delete_length => ref UnsafeUtility.AsRef(&NativePtr->delete_length); + public ref int char_storage => ref UnsafeUtility.AsRef(&NativePtr->char_storage); + } +} diff --git a/ImGuiNET/Wrapper/Generated/StbUndoRecord.gen.cs.meta b/ImGuiNET/Wrapper/Generated/StbUndoRecord.gen.cs.meta new file mode 100644 index 0000000..12210f9 --- /dev/null +++ b/ImGuiNET/Wrapper/Generated/StbUndoRecord.gen.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4db5fb05a8d60994ea2bf0c6b1533b9a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/ImGuiNET/Wrapper/Generated/StbUndoState.gen.cs b/ImGuiNET/Wrapper/Generated/StbUndoState.gen.cs new file mode 100644 index 0000000..4e9b31a --- /dev/null +++ b/ImGuiNET/Wrapper/Generated/StbUndoState.gen.cs @@ -0,0 +1,130 @@ +using System; +using UnityEngine; +using Unity.Collections.LowLevel.Unsafe; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct StbUndoState + { + public StbUndoRecord undo_rec_0; + public StbUndoRecord undo_rec_1; + public StbUndoRecord undo_rec_2; + public StbUndoRecord undo_rec_3; + public StbUndoRecord undo_rec_4; + public StbUndoRecord undo_rec_5; + public StbUndoRecord undo_rec_6; + public StbUndoRecord undo_rec_7; + public StbUndoRecord undo_rec_8; + public StbUndoRecord undo_rec_9; + public StbUndoRecord undo_rec_10; + public StbUndoRecord undo_rec_11; + public StbUndoRecord undo_rec_12; + public StbUndoRecord undo_rec_13; + public StbUndoRecord undo_rec_14; + public StbUndoRecord undo_rec_15; + public StbUndoRecord undo_rec_16; + public StbUndoRecord undo_rec_17; + public StbUndoRecord undo_rec_18; + public StbUndoRecord undo_rec_19; + public StbUndoRecord undo_rec_20; + public StbUndoRecord undo_rec_21; + public StbUndoRecord undo_rec_22; + public StbUndoRecord undo_rec_23; + public StbUndoRecord undo_rec_24; + public StbUndoRecord undo_rec_25; + public StbUndoRecord undo_rec_26; + public StbUndoRecord undo_rec_27; + public StbUndoRecord undo_rec_28; + public StbUndoRecord undo_rec_29; + public StbUndoRecord undo_rec_30; + public StbUndoRecord undo_rec_31; + public StbUndoRecord undo_rec_32; + public StbUndoRecord undo_rec_33; + public StbUndoRecord undo_rec_34; + public StbUndoRecord undo_rec_35; + public StbUndoRecord undo_rec_36; + public StbUndoRecord undo_rec_37; + public StbUndoRecord undo_rec_38; + public StbUndoRecord undo_rec_39; + public StbUndoRecord undo_rec_40; + public StbUndoRecord undo_rec_41; + public StbUndoRecord undo_rec_42; + public StbUndoRecord undo_rec_43; + public StbUndoRecord undo_rec_44; + public StbUndoRecord undo_rec_45; + public StbUndoRecord undo_rec_46; + public StbUndoRecord undo_rec_47; + public StbUndoRecord undo_rec_48; + public StbUndoRecord undo_rec_49; + public StbUndoRecord undo_rec_50; + public StbUndoRecord undo_rec_51; + public StbUndoRecord undo_rec_52; + public StbUndoRecord undo_rec_53; + public StbUndoRecord undo_rec_54; + public StbUndoRecord undo_rec_55; + public StbUndoRecord undo_rec_56; + public StbUndoRecord undo_rec_57; + public StbUndoRecord undo_rec_58; + public StbUndoRecord undo_rec_59; + public StbUndoRecord undo_rec_60; + public StbUndoRecord undo_rec_61; + public StbUndoRecord undo_rec_62; + public StbUndoRecord undo_rec_63; + public StbUndoRecord undo_rec_64; + public StbUndoRecord undo_rec_65; + public StbUndoRecord undo_rec_66; + public StbUndoRecord undo_rec_67; + public StbUndoRecord undo_rec_68; + public StbUndoRecord undo_rec_69; + public StbUndoRecord undo_rec_70; + public StbUndoRecord undo_rec_71; + public StbUndoRecord undo_rec_72; + public StbUndoRecord undo_rec_73; + public StbUndoRecord undo_rec_74; + public StbUndoRecord undo_rec_75; + public StbUndoRecord undo_rec_76; + public StbUndoRecord undo_rec_77; + public StbUndoRecord undo_rec_78; + public StbUndoRecord undo_rec_79; + public StbUndoRecord undo_rec_80; + public StbUndoRecord undo_rec_81; + public StbUndoRecord undo_rec_82; + public StbUndoRecord undo_rec_83; + public StbUndoRecord undo_rec_84; + public StbUndoRecord undo_rec_85; + public StbUndoRecord undo_rec_86; + public StbUndoRecord undo_rec_87; + public StbUndoRecord undo_rec_88; + public StbUndoRecord undo_rec_89; + public StbUndoRecord undo_rec_90; + public StbUndoRecord undo_rec_91; + public StbUndoRecord undo_rec_92; + public StbUndoRecord undo_rec_93; + public StbUndoRecord undo_rec_94; + public StbUndoRecord undo_rec_95; + public StbUndoRecord undo_rec_96; + public StbUndoRecord undo_rec_97; + public StbUndoRecord undo_rec_98; + public fixed ushort undo_char[999]; + public short undo_point; + public short redo_point; + public int undo_char_point; + public int redo_char_point; + } + public unsafe partial struct StbUndoStatePtr + { + public StbUndoState* NativePtr { get; } + public StbUndoStatePtr(StbUndoState* nativePtr) => NativePtr = nativePtr; + public StbUndoStatePtr(IntPtr nativePtr) => NativePtr = (StbUndoState*)nativePtr; + public static implicit operator StbUndoStatePtr(StbUndoState* nativePtr) => new StbUndoStatePtr(nativePtr); + public static implicit operator StbUndoState* (StbUndoStatePtr wrappedPtr) => wrappedPtr.NativePtr; + public static implicit operator StbUndoStatePtr(IntPtr nativePtr) => new StbUndoStatePtr(nativePtr); + public RangeAccessor undo_rec => new RangeAccessor(&NativePtr->undo_rec_0, 99); + public RangeAccessor undo_char => new RangeAccessor(NativePtr->undo_char, 999); + public ref short undo_point => ref UnsafeUtility.AsRef(&NativePtr->undo_point); + public ref short redo_point => ref UnsafeUtility.AsRef(&NativePtr->redo_point); + public ref int undo_char_point => ref UnsafeUtility.AsRef(&NativePtr->undo_char_point); + public ref int redo_char_point => ref UnsafeUtility.AsRef(&NativePtr->redo_char_point); + } +} diff --git a/ImGuiNET/Wrapper/Generated/StbUndoState.gen.cs.meta b/ImGuiNET/Wrapper/Generated/StbUndoState.gen.cs.meta new file mode 100644 index 0000000..4fd73d9 --- /dev/null +++ b/ImGuiNET/Wrapper/Generated/StbUndoState.gen.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 657ef01e5c0090e4eb8db4f574b298b8 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/ImGuiNET/Wrapper/ImDrawList.Manual.cs b/ImGuiNET/Wrapper/ImDrawList.Manual.cs index 34a7b49..099b813 100644 --- a/ImGuiNET/Wrapper/ImDrawList.Manual.cs +++ b/ImGuiNET/Wrapper/ImDrawList.Manual.cs @@ -1,5 +1,5 @@ -using System.Text; -using UnityEngine; +using UnityEngine; +using System.Text; namespace ImGuiNET { @@ -15,7 +15,7 @@ public void AddText(Vector2 pos, uint col, string text_begin) native_text_begin[native_text_begin_offset] = 0; } byte* native_text_end = null; - ImGuiNative.ImDrawList_AddText(NativePtr, pos, col, native_text_begin, native_text_end); + ImGuiNative.ImDrawList_AddText_Vec2(NativePtr, pos, col, native_text_begin, native_text_end); } public void AddText(ImFontPtr font, float font_size, Vector2 pos, uint col, string text_begin) @@ -31,7 +31,7 @@ public void AddText(ImFontPtr font, float font_size, Vector2 pos, uint col, stri byte* native_text_end = null; float wrap_width = 0.0f; Vector4* cpu_fine_clip_rect = null; - ImGuiNative.ImDrawList_AddTextFontPtr(NativePtr, native_font, font_size, pos, col, native_text_begin, native_text_end, wrap_width, cpu_fine_clip_rect); + ImGuiNative.ImDrawList_AddText_FontPtr(NativePtr, native_font, font_size, pos, col, native_text_begin, native_text_end, wrap_width, cpu_fine_clip_rect); } } } diff --git a/ImGuiNET/Wrapper/ImGui.Manual.cs b/ImGuiNET/Wrapper/ImGui.Manual.cs index 9295a7d..6610864 100644 --- a/ImGuiNET/Wrapper/ImGui.Manual.cs +++ b/ImGuiNET/Wrapper/ImGui.Manual.cs @@ -1,8 +1,7 @@ using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Text; using UnityEngine; +using Unity.Collections.LowLevel.Unsafe; +using System.Text; namespace ImGuiNET { @@ -128,8 +127,8 @@ public static bool InputText( } Util.GetUtf8(input, utf8InputBytes, inputBufSize); uint clearBytesCount = (uint)(inputBufSize - utf8InputByteCount); - Unsafe.InitBlockUnaligned(utf8InputBytes + utf8InputByteCount, 0, clearBytesCount); - Unsafe.CopyBlock(originalUtf8InputBytes, utf8InputBytes, (uint)inputBufSize); + UnsafeUtility.MemSet(utf8InputBytes + utf8InputByteCount, 0, clearBytesCount); + UnsafeUtility.MemCpy(originalUtf8InputBytes, utf8InputBytes, (uint)inputBufSize); byte result = ImGuiNative.igInputText( utf8LabelBytes, @@ -218,8 +217,8 @@ public static bool InputTextMultiline( } Util.GetUtf8(input, utf8InputBytes, inputBufSize); uint clearBytesCount = (uint)(inputBufSize - utf8InputByteCount); - Unsafe.InitBlockUnaligned(utf8InputBytes + utf8InputByteCount, 0, clearBytesCount); - Unsafe.CopyBlock(originalUtf8InputBytes, utf8InputBytes, (uint)inputBufSize); + UnsafeUtility.MemSet(utf8InputBytes + utf8InputByteCount, 0, clearBytesCount); + UnsafeUtility.MemCpy(originalUtf8InputBytes, utf8InputBytes, (uint)inputBufSize); byte result = ImGuiNative.igInputTextMultiline( utf8LabelBytes, @@ -247,6 +246,187 @@ public static bool InputTextMultiline( return result != 0; } + public static bool InputTextWithHint( + string label, + string hint, + ref string input, + uint maxLength) => InputTextWithHint(label, hint, ref input, maxLength, 0, null, IntPtr.Zero); + + public static bool InputTextWithHint( + string label, + string hint, + ref string input, + uint maxLength, + ImGuiInputTextFlags flags) => InputTextWithHint(label, hint, ref input, maxLength, flags, null, IntPtr.Zero); + + public static bool InputTextWithHint( + string label, + string hint, + ref string input, + uint maxLength, + ImGuiInputTextFlags flags, + ImGuiInputTextCallback callback) => InputTextWithHint(label, hint, ref input, maxLength, flags, callback, IntPtr.Zero); + + public static bool InputTextWithHint( + string label, + string hint, + ref string input, + uint maxLength, + ImGuiInputTextFlags flags, + ImGuiInputTextCallback callback, + IntPtr user_data) + { + int utf8LabelByteCount = Encoding.UTF8.GetByteCount(label); + byte* utf8LabelBytes; + if (utf8LabelByteCount > Util.StackAllocationSizeLimit) + { + utf8LabelBytes = Util.Allocate(utf8LabelByteCount + 1); + } + else + { + byte* stackPtr = stackalloc byte[utf8LabelByteCount + 1]; + utf8LabelBytes = stackPtr; + } + Util.GetUtf8(label, utf8LabelBytes, utf8LabelByteCount); + + int utf8HintByteCount = Encoding.UTF8.GetByteCount(hint); + byte* utf8HintBytes; + if (utf8HintByteCount > Util.StackAllocationSizeLimit) + { + utf8HintBytes = Util.Allocate(utf8HintByteCount + 1); + } + else + { + byte* stackPtr = stackalloc byte[utf8HintByteCount + 1]; + utf8HintBytes = stackPtr; + } + Util.GetUtf8(hint, utf8HintBytes, utf8HintByteCount); + + int utf8InputByteCount = Encoding.UTF8.GetByteCount(input); + int inputBufSize = Math.Max((int)maxLength + 1, utf8InputByteCount + 1); + + byte* utf8InputBytes; + byte* originalUtf8InputBytes; + if (inputBufSize > Util.StackAllocationSizeLimit) + { + utf8InputBytes = Util.Allocate(inputBufSize); + originalUtf8InputBytes = Util.Allocate(inputBufSize); + } + else + { + byte* inputStackBytes = stackalloc byte[inputBufSize]; + utf8InputBytes = inputStackBytes; + byte* originalInputStackBytes = stackalloc byte[inputBufSize]; + originalUtf8InputBytes = originalInputStackBytes; + } + Util.GetUtf8(input, utf8InputBytes, inputBufSize); + uint clearBytesCount = (uint)(inputBufSize - utf8InputByteCount); + UnsafeUtility.MemSet(utf8InputBytes + utf8InputByteCount, 0, clearBytesCount); + UnsafeUtility.MemCpy(originalUtf8InputBytes, utf8InputBytes, (uint)inputBufSize); + + byte result = ImGuiNative.igInputTextWithHint( + utf8LabelBytes, + utf8HintBytes, + utf8InputBytes, + (uint)inputBufSize, + flags, + callback, + user_data.ToPointer()); + if (!Util.AreStringsEqual(originalUtf8InputBytes, inputBufSize, utf8InputBytes)) + { + input = Util.StringFromPtr(utf8InputBytes); + } + + if (utf8LabelByteCount > Util.StackAllocationSizeLimit) + { + Util.Free(utf8LabelBytes); + } + if (utf8HintByteCount > Util.StackAllocationSizeLimit) + { + Util.Free(utf8HintBytes); + } + if (inputBufSize > Util.StackAllocationSizeLimit) + { + Util.Free(utf8InputBytes); + Util.Free(originalUtf8InputBytes); + } + + return result != 0; + } + + public static Vector2 CalcTextSize(string text) + => CalcTextSizeImpl(text); + + public static Vector2 CalcTextSize(string text, int start) + => CalcTextSizeImpl(text, start); + + public static Vector2 CalcTextSize(string text, float wrapWidth) + => CalcTextSizeImpl(text, wrapWidth: wrapWidth); + + public static Vector2 CalcTextSize(string text, bool hideTextAfterDoubleHash) + => CalcTextSizeImpl(text, hideTextAfterDoubleHash: hideTextAfterDoubleHash); + + public static Vector2 CalcTextSize(string text, int start, int length) + => CalcTextSizeImpl(text, start, length); + + public static Vector2 CalcTextSize(string text, int start, bool hideTextAfterDoubleHash) + => CalcTextSizeImpl(text, start, hideTextAfterDoubleHash: hideTextAfterDoubleHash); + + public static Vector2 CalcTextSize(string text, int start, float wrapWidth) + => CalcTextSizeImpl(text, start, wrapWidth: wrapWidth); + + public static Vector2 CalcTextSize(string text, bool hideTextAfterDoubleHash, float wrapWidth) + => CalcTextSizeImpl(text, hideTextAfterDoubleHash: hideTextAfterDoubleHash, wrapWidth: wrapWidth); + + public static Vector2 CalcTextSize(string text, int start, int length, bool hideTextAfterDoubleHash) + => CalcTextSizeImpl(text, start, length, hideTextAfterDoubleHash); + + public static Vector2 CalcTextSize(string text, int start, int length, float wrapWidth) + => CalcTextSizeImpl(text, start, length, wrapWidth: wrapWidth); + + public static Vector2 CalcTextSize(string text, int start, int length, bool hideTextAfterDoubleHash, float wrapWidth) + => CalcTextSizeImpl(text, start, length, hideTextAfterDoubleHash, wrapWidth); + + private static Vector2 CalcTextSizeImpl( + string text, + int start = 0, + int? length = null, + bool hideTextAfterDoubleHash = false, + float wrapWidth = -1.0f) + { + Vector2 ret; + byte* nativeTextStart = null; + byte* nativeTextEnd = null; + int textByteCount = 0; + if (text != null) + { + + int textToCopyLen = length.HasValue ? length.Value : text.Length; + textByteCount = Util.CalcSizeInUtf8(text, start, textToCopyLen); + if (textByteCount > Util.StackAllocationSizeLimit) + { + nativeTextStart = Util.Allocate(textByteCount + 1); + } + else + { + byte* nativeTextStackBytes = stackalloc byte[textByteCount + 1]; + nativeTextStart = nativeTextStackBytes; + } + + int nativeTextOffset = Util.GetUtf8(text, start, textToCopyLen, nativeTextStart, textByteCount); + nativeTextStart[nativeTextOffset] = 0; + nativeTextEnd = nativeTextStart + nativeTextOffset; + } + + ImGuiNative.igCalcTextSize(&ret, nativeTextStart, nativeTextEnd, *((byte*)(&hideTextAfterDoubleHash)), wrapWidth); + if (textByteCount > Util.StackAllocationSizeLimit) + { + Util.Free(nativeTextStart); + } + + return ret; + } + public static bool InputText( string label, IntPtr buf, diff --git a/ImGuiNET/Wrapper/ImVector.cs b/ImGuiNET/Wrapper/ImVector.cs index 76411b8..af04ceb 100644 --- a/ImGuiNET/Wrapper/ImVector.cs +++ b/ImGuiNET/Wrapper/ImVector.cs @@ -1,5 +1,5 @@ using System; -using System.Runtime.CompilerServices; +using Unity.Collections.LowLevel.Unsafe; namespace ImGuiNET { @@ -9,18 +9,18 @@ public unsafe struct ImVector public readonly int Capacity; public readonly IntPtr Data; - public ref T Ref(int index) + public ref T Ref(int index) where T : struct { - return ref Unsafe.AsRef((byte*)Data + index * Unsafe.SizeOf()); + return ref UnsafeUtility.AsRef((byte*)Data + index * UnsafeUtility.SizeOf()); } - public IntPtr Address(int index) + public IntPtr Address(int index) where T : struct { - return (IntPtr)((byte*)Data + index * Unsafe.SizeOf()); + return (IntPtr)((byte*)Data + index * UnsafeUtility.SizeOf()); } } - public unsafe struct ImVector + public unsafe struct ImVector where T : struct { public readonly int Size; public readonly int Capacity; @@ -40,7 +40,7 @@ public ImVector(int size, int capacity, IntPtr data) Data = data; } - public ref T this[int index] => ref Unsafe.AsRef((byte*)Data + index * Unsafe.SizeOf()); + public ref T this[int index] => ref UnsafeUtility.AsRef((byte*)Data + index * UnsafeUtility.SizeOf()); } public unsafe struct ImPtrVector @@ -67,7 +67,7 @@ public T this[int index] get { byte* address = (byte*)Data + index * _stride; - T ret = Unsafe.Read(&address); + T ret = UnsafeUtility.ReadArrayElement(&address, 0); return ret; } } diff --git a/ImGuiNET/Wrapper/RangeAccessor.cs b/ImGuiNET/Wrapper/RangeAccessor.cs index cf766c7..667f7c3 100644 --- a/ImGuiNET/Wrapper/RangeAccessor.cs +++ b/ImGuiNET/Wrapper/RangeAccessor.cs @@ -1,12 +1,12 @@ using System; -using System.Runtime.CompilerServices; +using Unity.Collections.LowLevel.Unsafe; using System.Text; namespace ImGuiNET { public unsafe struct RangeAccessor where T : struct { - private static readonly int s_sizeOfT = Unsafe.SizeOf(); + private static readonly int s_sizeOfT = UnsafeUtility.SizeOf(); public readonly void* Data; public readonly int Count; @@ -27,7 +27,7 @@ public ref T this[int index] throw new IndexOutOfRangeException(); } - return ref Unsafe.AsRef((byte*)Data + s_sizeOfT * index); + return ref UnsafeUtility.AsRef((byte*)Data + s_sizeOfT * index); } } } @@ -53,7 +53,7 @@ public T this[int index] throw new IndexOutOfRangeException(); } - return Unsafe.Read((byte*)Data + sizeof(void*) * index); + return UnsafeUtility.ReadArrayElement((byte*)Data + sizeof(void*) * index, 0); } } } diff --git a/ImGuiNET/Wrapper/Util.cs b/ImGuiNET/Wrapper/Util.cs index 34280a0..52785b6 100644 --- a/ImGuiNET/Wrapper/Util.cs +++ b/ImGuiNET/Wrapper/Util.cs @@ -32,7 +32,22 @@ internal static bool AreStringsEqual(byte* a, int aLength, byte* b) } internal static byte* Allocate(int byteCount) => (byte*)Marshal.AllocHGlobal(byteCount); + internal static void Free(byte* ptr) => Marshal.FreeHGlobal((IntPtr)ptr); + + internal static int CalcSizeInUtf8(string s, int start, int length) + { + if (start < 0 || length < 0 || start + length > s.Length) + { + throw new ArgumentOutOfRangeException(); + } + + fixed (char* utf16Ptr = s) + { + return Encoding.UTF8.GetByteCount(utf16Ptr + start, length); + } + } + internal static int GetUtf8(string s, byte* utf8Bytes, int utf8ByteCount) { fixed (char* utf16Ptr = s) @@ -40,5 +55,18 @@ internal static int GetUtf8(string s, byte* utf8Bytes, int utf8ByteCount) return Encoding.UTF8.GetBytes(utf16Ptr, s.Length, utf8Bytes, utf8ByteCount); } } + + internal static int GetUtf8(string s, int start, int length, byte* utf8Bytes, int utf8ByteCount) + { + if (start < 0 || length < 0 || start + length > s.Length) + { + throw new ArgumentOutOfRangeException(); + } + + fixed (char* utf16Ptr = s) + { + return Encoding.UTF8.GetBytes(utf16Ptr + start, length, utf8Bytes, utf8ByteCount); + } + } } } diff --git a/Plugins/linux/cimgui.so b/Plugins/linux/cimgui.so index 7581d09..cfefecd 100755 --- a/Plugins/linux/cimgui.so +++ b/Plugins/linux/cimgui.so @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:86cfa4af666a6fe5a5cb2b8fcc789952701354e3ba21e8cbb68475ce0db817cb -size 849952 +oid sha256:98ed63d472a1acc88e1e14b4a2aabe32011a21ce15fdd0f6c0beac565927b330 +size 1344328 diff --git a/Plugins/macos/cimgui.dylib b/Plugins/macos/cimgui.dylib index 59ab877..2b37cd5 100755 Binary files a/Plugins/macos/cimgui.dylib and b/Plugins/macos/cimgui.dylib differ diff --git a/Plugins/win/x64/cimgui.dll b/Plugins/win/x64/cimgui.dll index d36dee4..4b83133 100644 --- a/Plugins/win/x64/cimgui.dll +++ b/Plugins/win/x64/cimgui.dll @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:09bb9d5e23137e3b2ee681a1700a3a0f4bd847846368ede847a163f1f91e8560 -size 635392 +oid sha256:f91e92b84df3f53df8f74424178b28ad2fa91f05609d705f88c2bd4362aafec4 +size 917504 diff --git a/Resources/DefaultCursorShapes.asset b/Resources/DefaultCursorShapes.asset index 507727f..649da8f 100644 --- a/Resources/DefaultCursorShapes.asset +++ b/Resources/DefaultCursorShapes.asset @@ -13,29 +13,29 @@ MonoBehaviour: m_Name: DefaultCursorShapes m_EditorClassIdentifier: Arrow: - texture: {fileID: 2800000, guid: ea46916e6ffb6514c8cd48501aae4413, type: 3} + texture: {fileID: 2800000, guid: 803756803eea3ad44881bec84aed3ef6, type: 3} hotspot: {x: 7, y: 4} TextInput: - texture: {fileID: 2800000, guid: 6cc6ea8c71cf6bb43ac0fa3388381bca, type: 3} + texture: {fileID: 2800000, guid: 64f5d27b06bc9644581256027f10ab98, type: 3} hotspot: {x: 11, y: 11} ResizeAll: - texture: {fileID: 2800000, guid: 5f341bb432902ed40b45110627297954, type: 3} + texture: {fileID: 2800000, guid: 6c45888cc9b933a40aa8412a85243c45, type: 3} hotspot: {x: 4, y: 5} ResizeEW: - texture: {fileID: 2800000, guid: 448abc114685f314faa22e666326161c, type: 3} + texture: {fileID: 2800000, guid: 7dd782db7511c46408f40e17296ce6c9, type: 3} hotspot: {x: 11, y: 11} ResizeNS: - texture: {fileID: 2800000, guid: 32f6dcbea90e6ed49bea4b90a87f21f0, type: 3} + texture: {fileID: 2800000, guid: 67f8ea13ff143fd43b65cd23d76d8ccb, type: 3} hotspot: {x: 11, y: 11} ResizeNESW: - texture: {fileID: 2800000, guid: 37285429d3bbe394e86fd66efb774ad5, type: 3} + texture: {fileID: 2800000, guid: d786a2b6cff627e4bbaead17c5c31599, type: 3} hotspot: {x: 11, y: 11} ResizeNWSE: - texture: {fileID: 2800000, guid: d5999ae9988146342b95b8b8c27d40bb, type: 3} + texture: {fileID: 2800000, guid: 6d38df4effb6c324dae0efb77ce3b56d, type: 3} hotspot: {x: 11, y: 11} Hand: - texture: {fileID: 2800000, guid: 24f564a03779c3a4297194dac78ad82b, type: 3} + texture: {fileID: 2800000, guid: 34bd88782b7ebf148b1b115264497c55, type: 3} hotspot: {x: 9, y: 5} NotAllowed: - texture: {fileID: 2800000, guid: d1bbf82de973dbc4db33890da69c35ed, type: 3} + texture: {fileID: 2800000, guid: fa1b0fb3b4c8b97448841953a3b6d0b9, type: 3} hotspot: {x: 11, y: 11} diff --git a/Resources/DefaultShaderResources.asset b/Resources/DefaultShaderResources.asset index b72e5b9..0f01a90 100644 --- a/Resources/DefaultShaderResources.asset +++ b/Resources/DefaultShaderResources.asset @@ -13,8 +13,8 @@ MonoBehaviour: m_Name: DefaultShaderResources m_EditorClassIdentifier: shaders: - mesh: {fileID: 4800000, guid: 4672393d0e55548419ce9efb914275d9, type: 3} - procedural: {fileID: 4800000, guid: 9a6416cb7d14ac3408ac38188ae47cce, type: 3} + mesh: {fileID: 4800000, guid: 9c9a5a09c11715644a69fc57aa7beecc, type: 3} + procedural: {fileID: 4800000, guid: be8fea7817e28c742aa4b0ec01cacd7d, type: 3} propertyNames: tex: _Tex vertices: _Vertices diff --git a/Resources/DefaultStyle.asset b/Resources/DefaultStyle.asset index 3c8e7ce..827fe90 100644 --- a/Resources/DefaultStyle.asset +++ b/Resources/DefaultStyle.asset @@ -14,8 +14,8 @@ MonoBehaviour: m_EditorClassIdentifier: Alpha: 1 WindowPadding: {x: 8, y: 8} - WindowRounding: 7 - WindowBorderSize: 1 + WindowRounding: 4 + WindowBorderSize: 2 WindowMinSize: {x: 32, y: 32} WindowTitleAlign: {x: 0, y: 0.5} WindowMenuButtonPosition: 0 @@ -50,9 +50,9 @@ MonoBehaviour: Colors: - {r: 1, g: 1, b: 1, a: 1} - {r: 0.5, g: 0.5, b: 0.5, a: 1} - - {r: 0.06, g: 0.06, b: 0.06, a: 0.94} + - {r: 0.06, g: 0.06, b: 0.06, a: 0.69411767} - {r: 0, g: 0, b: 0, a: 0} - - {r: 0.08, g: 0.08, b: 0.08, a: 0.94} + - {r: 0.08, g: 0.08, b: 0.08, a: 0.9411765} - {r: 0.43, g: 0.43, b: 0.5, a: 0.5} - {r: 0, g: 0, b: 0, a: 0} - {r: 0.16, g: 0.29, b: 0.48, a: 0.54} diff --git a/Resources/Shaders/DearImGui-Mesh.shader b/Resources/Shaders/DearImGui-Mesh.shader index 776df89..48303de 100644 --- a/Resources/Shaders/DearImGui-Mesh.shader +++ b/Resources/Shaders/DearImGui-Mesh.shader @@ -17,7 +17,7 @@ HLSLPROGRAM #pragma vertex ImGuiPassVertex #pragma fragment ImGuiPassFrag - #include "Packages/com.realgames.dear-imgui/Resources/Shaders/PassesUniversal.hlsl" + #include "PassesUniversal.hlsl" ENDHLSL } } @@ -39,7 +39,7 @@ CGPROGRAM #pragma vertex ImGuiPassVertex #pragma fragment ImGuiPassFrag - #include "Packages/com.realgames.dear-imgui/Resources/Shaders/PassesBuiltin.hlsl" + #include "PassesBuiltin.hlsl" ENDCG } } diff --git a/Resources/Shaders/DearImGui-Procedural.shader b/Resources/Shaders/DearImGui-Procedural.shader index eed3821..aec8e02 100644 --- a/Resources/Shaders/DearImGui-Procedural.shader +++ b/Resources/Shaders/DearImGui-Procedural.shader @@ -17,7 +17,7 @@ HLSLPROGRAM #pragma vertex vert #pragma fragment ImGuiPassFrag - #include "Packages/com.realgames.dear-imgui/Resources/Shaders/PassesUniversal.hlsl" + #include "PassesUniversal.hlsl" StructuredBuffer _Vertices; int _BaseVertex; @@ -52,7 +52,7 @@ CGPROGRAM #pragma vertex vert #pragma fragment ImGuiPassFrag - #include "Packages/com.realgames.dear-imgui/Resources/Shaders/PassesBuiltin.hlsl" + #include "PassesBuiltin.hlsl" StructuredBuffer _Vertices; int _BaseVertex; diff --git a/Resources/Shaders/PassesBuiltin.hlsl b/Resources/Shaders/PassesBuiltin.hlsl index a466303..8ca19f7 100644 --- a/Resources/Shaders/PassesBuiltin.hlsl +++ b/Resources/Shaders/PassesBuiltin.hlsl @@ -2,7 +2,7 @@ #define DEARIMGUI_BUILTIN_INCLUDED #include "UnityCG.cginc" -#include "Packages/com.realgames.dear-imgui/Resources/Shaders/Common.hlsl" +#include "Common.hlsl" sampler2D _Tex; diff --git a/Resources/Shaders/PassesUniversal.hlsl b/Resources/Shaders/PassesUniversal.hlsl index 176fc13..811486b 100644 --- a/Resources/Shaders/PassesUniversal.hlsl +++ b/Resources/Shaders/PassesUniversal.hlsl @@ -5,7 +5,7 @@ #ifndef UNITY_COLORSPACE_GAMMA #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" #endif -#include "Packages/com.realgames.dear-imgui/Resources/Shaders/Common.hlsl" +#include "Common.hlsl" TEXTURE2D(_Tex); SAMPLER(sampler_Tex); diff --git a/package.json b/package.json index 36f8d91..23b3622 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,13 @@ { "name": "com.realgames.dear-imgui", + "version": "1.1.0", "displayName": "Dear ImGui", - "version": "1.0.0", "description": "Bloat-free Immediate Mode Graphical User interface", - "unity": "2019.3", - "keywords": [ + "unity": "2021.3", + "dependencies": { + "com.unity.collections": "1.3.1" + }, + "keywords": [ "dear", "imgui", "ui" @@ -13,9 +16,6 @@ "name": "Real Games", "url": "https://realgames.co" }, - "dependencies": { - "com.unity.collections": "0.5.0-preview.9" - }, "repository": { "type": "git", "url": "https://github.com/realgamessoftware/dear-imgui-unity",