Skip to content

Commit a51c982

Browse files
authored
Merge pull request #427 from ImGuiNET/f/upgrade-18990
Ugrade to imgui.net 1.89.9
2 parents 0ea06bb + ab30115 commit a51c982

File tree

18 files changed

+2008
-1659
lines changed

18 files changed

+2008
-1659
lines changed

deps/cimgui/linux-x64/cimgui.so

9.13 KB
Binary file not shown.

deps/cimgui/osx/cimgui.dylib

33.2 KB
Binary file not shown.

deps/cimgui/win-arm64/cimgui.dll

3 KB
Binary file not shown.

deps/cimgui/win-x64/cimgui.dll

5 KB
Binary file not shown.

deps/cimgui/win-x86/cimgui.dll

6 KB
Binary file not shown.

src/CodeGenerator/definitions/cimgui/definitions.json

+1,548-1,426
Large diffs are not rendered by default.

src/CodeGenerator/definitions/cimgui/structs_and_enums.json

+424-208
Large diffs are not rendered by default.

src/ImGui.NET.SampleProgram.XNA/ImGuiRenderer.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ private unsafe void UpdateBuffers(ImDrawDataPtr drawData)
346346

347347
for (int n = 0; n < drawData.CmdListsCount; n++)
348348
{
349-
ImDrawListPtr cmdList = drawData.CmdListsRange[n];
349+
ImDrawListPtr cmdList = drawData.CmdLists[n];
350350

351351
fixed (void* vtxDstPtr = &_vertexData[vtxOffset * DrawVertDeclaration.Size])
352352
fixed (void* idxDstPtr = &_indexData[idxOffset * sizeof(ushort)])
@@ -374,7 +374,7 @@ private unsafe void RenderCommandLists(ImDrawDataPtr drawData)
374374

375375
for (int n = 0; n < drawData.CmdListsCount; n++)
376376
{
377-
ImDrawListPtr cmdList = drawData.CmdListsRange[n];
377+
ImDrawListPtr cmdList = drawData.CmdLists[n];
378378

379379
for (int cmdi = 0; cmdi < cmdList.CmdBuffer.Size; cmdi++)
380380
{

src/ImGui.NET.SampleProgram/ImGuiController.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ private void RenderImDrawData(ImDrawDataPtr draw_data, GraphicsDevice gd, Comman
439439

440440
for (int i = 0; i < draw_data.CmdListsCount; i++)
441441
{
442-
ImDrawListPtr cmd_list = draw_data.CmdListsRange[i];
442+
ImDrawListPtr cmd_list = draw_data.CmdLists[i];
443443

444444
cl.UpdateBuffer(
445445
_vertexBuffer,
@@ -481,7 +481,7 @@ private void RenderImDrawData(ImDrawDataPtr draw_data, GraphicsDevice gd, Comman
481481
int idx_offset = 0;
482482
for (int n = 0; n < draw_data.CmdListsCount; n++)
483483
{
484-
ImDrawListPtr cmd_list = draw_data.CmdListsRange[n];
484+
ImDrawListPtr cmd_list = draw_data.CmdLists[n];
485485
for (int cmd_i = 0; cmd_i < cmd_list.CmdBuffer.Size; cmd_i++)
486486
{
487487
ImDrawCmdPtr pcmd = cmd_list.CmdBuffer[cmd_i];

src/ImGui.NET/Generated/ImDrawData.gen.cs

+7-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public unsafe partial struct ImDrawData
1111
public int CmdListsCount;
1212
public int TotalIdxCount;
1313
public int TotalVtxCount;
14-
public ImDrawList** CmdLists;
14+
public ImVector CmdLists;
1515
public Vector2 DisplayPos;
1616
public Vector2 DisplaySize;
1717
public Vector2 FramebufferScale;
@@ -29,11 +29,16 @@ public unsafe partial struct ImDrawDataPtr
2929
public ref int CmdListsCount => ref Unsafe.AsRef<int>(&NativePtr->CmdListsCount);
3030
public ref int TotalIdxCount => ref Unsafe.AsRef<int>(&NativePtr->TotalIdxCount);
3131
public ref int TotalVtxCount => ref Unsafe.AsRef<int>(&NativePtr->TotalVtxCount);
32-
public IntPtr CmdLists { get => (IntPtr)NativePtr->CmdLists; set => NativePtr->CmdLists = (ImDrawList**)value; }
32+
public ImVector<ImDrawListPtr> CmdLists => new ImVector<ImDrawListPtr>(NativePtr->CmdLists);
3333
public ref Vector2 DisplayPos => ref Unsafe.AsRef<Vector2>(&NativePtr->DisplayPos);
3434
public ref Vector2 DisplaySize => ref Unsafe.AsRef<Vector2>(&NativePtr->DisplaySize);
3535
public ref Vector2 FramebufferScale => ref Unsafe.AsRef<Vector2>(&NativePtr->FramebufferScale);
3636
public ImGuiViewportPtr OwnerViewport => new ImGuiViewportPtr(NativePtr->OwnerViewport);
37+
public void AddDrawList(ImDrawListPtr draw_list)
38+
{
39+
ImDrawList* native_draw_list = draw_list.NativePtr;
40+
ImGuiNative.ImDrawData_AddDrawList((ImDrawData*)(NativePtr), native_draw_list);
41+
}
3742
public void Clear()
3843
{
3944
ImGuiNative.ImDrawData_Clear((ImDrawData*)(NativePtr));

src/ImGui.NET/Generated/ImGuiHoveredFlags.gen.cs

+6-6
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ public enum ImGuiHoveredFlags
1818
AllowWhenOverlapped = 768,
1919
RectOnly = 928,
2020
RootAndChildWindows = 3,
21-
ForTooltip = 2048,
22-
Stationary = 4096,
23-
DelayNone = 8192,
24-
DelayShort = 16384,
25-
DelayNormal = 32768,
26-
NoSharedDelay = 65536,
21+
ForTooltip = 4096,
22+
Stationary = 8192,
23+
DelayNone = 16384,
24+
DelayShort = 32768,
25+
DelayNormal = 65536,
26+
NoSharedDelay = 131072,
2727
}
2828
}

src/ImGui.NET/Generated/ImGuiIO.gen.cs

+4-2
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ public unsafe partial struct ImGuiIO
5656
public void* ClipboardUserData;
5757
public IntPtr SetPlatformImeDataFn;
5858
public void* _UnusedPadding;
59+
public ushort PlatformLocaleDecimalPoint;
5960
public byte WantCaptureMouse;
6061
public byte WantCaptureKeyboard;
6162
public byte WantTextInput;
@@ -826,6 +827,7 @@ public unsafe partial struct ImGuiIOPtr
826827
public IntPtr ClipboardUserData { get => (IntPtr)NativePtr->ClipboardUserData; set => NativePtr->ClipboardUserData = (void*)value; }
827828
public ref IntPtr SetPlatformImeDataFn => ref Unsafe.AsRef<IntPtr>(&NativePtr->SetPlatformImeDataFn);
828829
public IntPtr _UnusedPadding { get => (IntPtr)NativePtr->_UnusedPadding; set => NativePtr->_UnusedPadding = (void*)value; }
830+
public ref ushort PlatformLocaleDecimalPoint => ref Unsafe.AsRef<ushort>(&NativePtr->PlatformLocaleDecimalPoint);
829831
public ref bool WantCaptureMouse => ref Unsafe.AsRef<bool>(&NativePtr->WantCaptureMouse);
830832
public ref bool WantCaptureKeyboard => ref Unsafe.AsRef<bool>(&NativePtr->WantCaptureKeyboard);
831833
public ref bool WantTextInput => ref Unsafe.AsRef<bool>(&NativePtr->WantTextInput);
@@ -953,9 +955,9 @@ public void AddMouseWheelEvent(float wheel_x, float wheel_y)
953955
{
954956
ImGuiNative.ImGuiIO_AddMouseWheelEvent((ImGuiIO*)(NativePtr), wheel_x, wheel_y);
955957
}
956-
public void ClearInputCharacters()
958+
public void ClearEventsQueue()
957959
{
958-
ImGuiNative.ImGuiIO_ClearInputCharacters((ImGuiIO*)(NativePtr));
960+
ImGuiNative.ImGuiIO_ClearEventsQueue((ImGuiIO*)(NativePtr));
959961
}
960962
public void ClearInputKeys()
961963
{

src/ImGui.NET/Generated/ImGuiListClipper.gen.cs

+4
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ public void End()
4747
{
4848
ImGuiNative.ImGuiListClipper_End((ImGuiListClipper*)(NativePtr));
4949
}
50+
public void IncludeItemByIndex(int item_index)
51+
{
52+
ImGuiNative.ImGuiListClipper_IncludeItemByIndex((ImGuiListClipper*)(NativePtr), item_index);
53+
}
5054
public bool Step()
5155
{
5256
byte ret = ImGuiNative.ImGuiListClipper_Step((ImGuiListClipper*)(NativePtr));

src/ImGui.NET/Generated/ImGuiNative.gen.cs

+6-2
Original file line numberDiff line numberDiff line change
@@ -791,6 +791,8 @@ public static unsafe partial class ImGuiNative
791791
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
792792
public static extern ImDrawCmd* ImDrawCmd_ImDrawCmd();
793793
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
794+
public static extern void ImDrawData_AddDrawList(ImDrawData* self, ImDrawList* draw_list);
795+
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
794796
public static extern void ImDrawData_Clear(ImDrawData* self);
795797
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
796798
public static extern void ImDrawData_DeIndexAllBuffers(ImDrawData* self);
@@ -1109,7 +1111,7 @@ public static unsafe partial class ImGuiNative
11091111
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
11101112
public static extern void ImGuiIO_AddMouseWheelEvent(ImGuiIO* self, float wheel_x, float wheel_y);
11111113
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
1112-
public static extern void ImGuiIO_ClearInputCharacters(ImGuiIO* self);
1114+
public static extern void ImGuiIO_ClearEventsQueue(ImGuiIO* self);
11131115
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
11141116
public static extern void ImGuiIO_ClearInputKeys(ImGuiIO* self);
11151117
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
@@ -1129,7 +1131,9 @@ public static unsafe partial class ImGuiNative
11291131
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
11301132
public static extern ImGuiListClipper* ImGuiListClipper_ImGuiListClipper();
11311133
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
1132-
public static extern void ImGuiListClipper_IncludeRangeByIndices(ImGuiListClipper* self, int item_begin, int item_end);
1134+
public static extern void ImGuiListClipper_IncludeItemByIndex(ImGuiListClipper* self, int item_index);
1135+
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
1136+
public static extern void ImGuiListClipper_IncludeItemsByIndex(ImGuiListClipper* self, int item_begin, int item_end);
11331137
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
11341138
public static extern byte ImGuiListClipper_Step(ImGuiListClipper* self);
11351139
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]

src/ImGui.NET/Generated/ImGuiStyle.gen.cs

+2
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ public unsafe partial struct ImGuiStyle
4444
public Vector2 SeparatorTextPadding;
4545
public Vector2 DisplayWindowPadding;
4646
public Vector2 DisplaySafeAreaPadding;
47+
public float DockingSeparatorSize;
4748
public float MouseCursorScale;
4849
public byte AntiAliasedLines;
4950
public byte AntiAliasedLinesUseTex;
@@ -156,6 +157,7 @@ public unsafe partial struct ImGuiStylePtr
156157
public ref Vector2 SeparatorTextPadding => ref Unsafe.AsRef<Vector2>(&NativePtr->SeparatorTextPadding);
157158
public ref Vector2 DisplayWindowPadding => ref Unsafe.AsRef<Vector2>(&NativePtr->DisplayWindowPadding);
158159
public ref Vector2 DisplaySafeAreaPadding => ref Unsafe.AsRef<Vector2>(&NativePtr->DisplaySafeAreaPadding);
160+
public ref float DockingSeparatorSize => ref Unsafe.AsRef<float>(&NativePtr->DockingSeparatorSize);
159161
public ref float MouseCursorScale => ref Unsafe.AsRef<float>(&NativePtr->MouseCursorScale);
160162
public ref bool AntiAliasedLines => ref Unsafe.AsRef<bool>(&NativePtr->AntiAliasedLines);
161163
public ref bool AntiAliasedLinesUseTex => ref Unsafe.AsRef<bool>(&NativePtr->AntiAliasedLinesUseTex);

src/ImGui.NET/Generated/ImGuiStyleVar.gen.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ public enum ImGuiStyleVar
3030
SeparatorTextBorderSize = 25,
3131
SeparatorTextAlign = 26,
3232
SeparatorTextPadding = 27,
33-
COUNT = 28,
33+
DockingSeparatorSize = 28,
34+
COUNT = 29,
3435
}
3536
}

src/ImGui.NET/ImDrawData.Manual.cs

-7
This file was deleted.

src/ImGui.NET/ImGui.NET.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<Description>A .NET wrapper for the Dear ImGui library.</Description>
4-
<AssemblyVersion>1.89.7.1</AssemblyVersion>
4+
<AssemblyVersion>1.89.9.1</AssemblyVersion>
55
<Authors>Eric Mellino</Authors>
66
<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks>
77
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>

0 commit comments

Comments
 (0)