Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New release for imgui 1.90 #448

Merged
merged 2 commits into from
Nov 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified deps/cimgui/linux-x64/cimgui.so
Binary file not shown.
Binary file modified deps/cimgui/osx/cimgui.dylib
Binary file not shown.
Binary file modified deps/cimgui/win-arm64/cimgui.dll
Binary file not shown.
Binary file modified deps/cimgui/win-x64/cimgui.dll
Binary file not shown.
Binary file modified deps/cimgui/win-x86/cimgui.dll
Binary file not shown.
3,979 changes: 2,352 additions & 1,627 deletions src/CodeGenerator/definitions/cimgui/definitions.json

Large diffs are not rendered by default.

1,173 changes: 711 additions & 462 deletions src/CodeGenerator/definitions/cimgui/structs_and_enums.json

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion src/ImGui.NET.SampleProgram.XNA/ImGuiRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ private bool TryMapKeys(Keys key, out ImGuiKey imguikey)
Keys.Subtract => ImGuiKey.KeypadSubtract,
Keys.Decimal => ImGuiKey.KeypadDecimal,
Keys.Divide => ImGuiKey.KeypadDivide,
>= Keys.F1 and <= Keys.F12 => ImGuiKey.F1 + (key - Keys.F1),
>= Keys.F1 and <= Keys.F24 => ImGuiKey.F1 + (key - Keys.F1),
Keys.NumLock => ImGuiKey.NumLock,
Keys.Scroll => ImGuiKey.ScrollLock,
Keys.LeftShift => ImGuiKey.ModShift,
Expand All @@ -275,6 +275,8 @@ private bool TryMapKeys(Keys key, out ImGuiKey imguikey)
Keys.OemCloseBrackets => ImGuiKey.RightBracket,
Keys.OemPipe => ImGuiKey.Backslash,
Keys.OemQuotes => ImGuiKey.Apostrophe,
Keys.BrowserBack => ImGuiKey.AppBack,
Keys.BrowserForward => ImGuiKey.AppForward,
_ => ImGuiKey.None,
};

Expand Down
2 changes: 1 addition & 1 deletion src/ImGui.NET.SampleProgram/ImGuiController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ ImGuiKey KeyToImGuiKeyShortcut(Key keyToConvert, Key startKey1, ImGuiKey startKe

result = key switch
{
>= Key.F1 and <= Key.F12 => KeyToImGuiKeyShortcut(key, Key.F1, ImGuiKey.F1),
>= Key.F1 and <= Key.F24 => KeyToImGuiKeyShortcut(key, Key.F1, ImGuiKey.F1),
>= Key.Keypad0 and <= Key.Keypad9 => KeyToImGuiKeyShortcut(key, Key.Keypad0, ImGuiKey.Keypad0),
>= Key.A and <= Key.Z => KeyToImGuiKeyShortcut(key, Key.A, ImGuiKey.A),
>= Key.Number0 and <= Key.Number9 => KeyToImGuiKeyShortcut(key, Key.Number0, ImGuiKey._0),
Expand Down
46 changes: 46 additions & 0 deletions src/ImGui.NET/Generated/ImDrawList.gen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,43 @@ public void AddDrawCmd()
{
ImGuiNative.ImDrawList_AddDrawCmd((ImDrawList*)(NativePtr));
}
public void AddEllipse(Vector2 center, float radius_x, float radius_y, uint col)
{
float rot = 0.0f;
int num_segments = 0;
float thickness = 1.0f;
ImGuiNative.ImDrawList_AddEllipse((ImDrawList*)(NativePtr), center, radius_x, radius_y, col, rot, num_segments, thickness);
}
public void AddEllipse(Vector2 center, float radius_x, float radius_y, uint col, float rot)
{
int num_segments = 0;
float thickness = 1.0f;
ImGuiNative.ImDrawList_AddEllipse((ImDrawList*)(NativePtr), center, radius_x, radius_y, col, rot, num_segments, thickness);
}
public void AddEllipse(Vector2 center, float radius_x, float radius_y, uint col, float rot, int num_segments)
{
float thickness = 1.0f;
ImGuiNative.ImDrawList_AddEllipse((ImDrawList*)(NativePtr), center, radius_x, radius_y, col, rot, num_segments, thickness);
}
public void AddEllipse(Vector2 center, float radius_x, float radius_y, uint col, float rot, int num_segments, float thickness)
{
ImGuiNative.ImDrawList_AddEllipse((ImDrawList*)(NativePtr), center, radius_x, radius_y, col, rot, num_segments, thickness);
}
public void AddEllipseFilled(Vector2 center, float radius_x, float radius_y, uint col)
{
float rot = 0.0f;
int num_segments = 0;
ImGuiNative.ImDrawList_AddEllipseFilled((ImDrawList*)(NativePtr), center, radius_x, radius_y, col, rot, num_segments);
}
public void AddEllipseFilled(Vector2 center, float radius_x, float radius_y, uint col, float rot)
{
int num_segments = 0;
ImGuiNative.ImDrawList_AddEllipseFilled((ImDrawList*)(NativePtr), center, radius_x, radius_y, col, rot, num_segments);
}
public void AddEllipseFilled(Vector2 center, float radius_x, float radius_y, uint col, float rot, int num_segments)
{
ImGuiNative.ImDrawList_AddEllipseFilled((ImDrawList*)(NativePtr), center, radius_x, radius_y, col, rot, num_segments);
}
public void AddImage(IntPtr user_texture_id, Vector2 p_min, Vector2 p_max)
{
Vector2 uv_min = new Vector2();
Expand Down Expand Up @@ -581,6 +618,15 @@ public void PathClear()
{
ImGuiNative.ImDrawList_PathClear((ImDrawList*)(NativePtr));
}
public void PathEllipticalArcTo(Vector2 center, float radius_x, float radius_y, float rot, float a_min, float a_max)
{
int num_segments = 0;
ImGuiNative.ImDrawList_PathEllipticalArcTo((ImDrawList*)(NativePtr), center, radius_x, radius_y, rot, a_min, a_max, num_segments);
}
public void PathEllipticalArcTo(Vector2 center, float radius_x, float radius_y, float rot, float a_min, float a_max, int num_segments)
{
ImGuiNative.ImDrawList_PathEllipticalArcTo((ImDrawList*)(NativePtr), center, radius_x, radius_y, rot, a_min, a_max, num_segments);
}
public void PathFillConvex(uint col)
{
ImGuiNative.ImDrawList_PathFillConvex((ImDrawList*)(NativePtr), col);
Expand Down
24 changes: 12 additions & 12 deletions src/ImGui.NET/Generated/ImFontAtlas.gen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -519,52 +519,52 @@ public ImFontPtr AddFontFromMemoryCompressedBase85TTF(string compressed_font_dat
}
return new ImFontPtr(ret);
}
public ImFontPtr AddFontFromMemoryCompressedTTF(IntPtr compressed_font_data, int compressed_font_size, float size_pixels)
public ImFontPtr AddFontFromMemoryCompressedTTF(IntPtr compressed_font_data, int compressed_font_data_size, float size_pixels)
{
void* native_compressed_font_data = (void*)compressed_font_data.ToPointer();
ImFontConfig* font_cfg = null;
ushort* glyph_ranges = null;
ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryCompressedTTF((ImFontAtlas*)(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_data_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)
public ImFontPtr AddFontFromMemoryCompressedTTF(IntPtr compressed_font_data, int compressed_font_data_size, float size_pixels, ImFontConfigPtr font_cfg)
{
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((ImFontAtlas*)(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_data_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)
public ImFontPtr AddFontFromMemoryCompressedTTF(IntPtr compressed_font_data, int compressed_font_data_size, float size_pixels, ImFontConfigPtr font_cfg, IntPtr glyph_ranges)
{
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((ImFontAtlas*)(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_data_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)
public ImFontPtr AddFontFromMemoryTTF(IntPtr font_data, int font_data_size, float size_pixels)
{
void* native_font_data = (void*)font_data.ToPointer();
ImFontConfig* font_cfg = null;
ushort* glyph_ranges = null;
ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryTTF((ImFontAtlas*)(NativePtr), native_font_data, font_size, size_pixels, font_cfg, glyph_ranges);
ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryTTF((ImFontAtlas*)(NativePtr), native_font_data, font_data_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)
public ImFontPtr AddFontFromMemoryTTF(IntPtr font_data, int font_data_size, float size_pixels, ImFontConfigPtr font_cfg)
{
void* native_font_data = (void*)font_data.ToPointer();
ImFontConfig* native_font_cfg = font_cfg.NativePtr;
ushort* glyph_ranges = null;
ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryTTF((ImFontAtlas*)(NativePtr), native_font_data, font_size, size_pixels, native_font_cfg, glyph_ranges);
ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryTTF((ImFontAtlas*)(NativePtr), native_font_data, font_data_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)
public ImFontPtr AddFontFromMemoryTTF(IntPtr font_data, int font_data_size, float size_pixels, ImFontConfigPtr font_cfg, IntPtr glyph_ranges)
{
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((ImFontAtlas*)(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_data_size, size_pixels, native_font_cfg, native_glyph_ranges);
return new ImFontPtr(ret);
}
public bool Build()
Expand Down
2 changes: 2 additions & 0 deletions src/ImGui.NET/Generated/ImFontConfig.gen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public unsafe partial struct ImFontConfig
public byte MergeMode;
public uint FontBuilderFlags;
public float RasterizerMultiply;
public float RasterizerDensity;
public ushort EllipsisChar;
public fixed byte Name[40];
public ImFont* DstFont;
Expand Down Expand Up @@ -51,6 +52,7 @@ public unsafe partial struct ImFontConfigPtr
public ref bool MergeMode => ref Unsafe.AsRef<bool>(&NativePtr->MergeMode);
public ref uint FontBuilderFlags => ref Unsafe.AsRef<uint>(&NativePtr->FontBuilderFlags);
public ref float RasterizerMultiply => ref Unsafe.AsRef<float>(&NativePtr->RasterizerMultiply);
public ref float RasterizerDensity => ref Unsafe.AsRef<float>(&NativePtr->RasterizerDensity);
public ref ushort EllipsisChar => ref Unsafe.AsRef<ushort>(&NativePtr->EllipsisChar);
public RangeAccessor<byte> Name => new RangeAccessor<byte>(NativePtr->Name, 40);
public ImFontPtr DstFont => new ImFontPtr(NativePtr->DstFont);
Expand Down
Loading
Loading