Skip to content

Commit 48978b8

Browse files
authored
New release for imgui 1.90 (#448)
* release imgui 1.90 * added new keys
1 parent 51d0b74 commit 48978b8

26 files changed

+3352
-2801
lines changed

deps/cimgui/linux-x64/cimgui.so

23.6 KB
Binary file not shown.

deps/cimgui/osx/cimgui.dylib

86.9 KB
Binary file not shown.

deps/cimgui/win-arm64/cimgui.dll

11.5 KB
Binary file not shown.

deps/cimgui/win-x64/cimgui.dll

15.5 KB
Binary file not shown.

deps/cimgui/win-x86/cimgui.dll

11.5 KB
Binary file not shown.

src/CodeGenerator/definitions/cimgui/definitions.json

Lines changed: 2352 additions & 1627 deletions
Large diffs are not rendered by default.

src/CodeGenerator/definitions/cimgui/structs_and_enums.json

Lines changed: 711 additions & 462 deletions
Large diffs are not rendered by default.

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ private bool TryMapKeys(Keys key, out ImGuiKey imguikey)
258258
Keys.Subtract => ImGuiKey.KeypadSubtract,
259259
Keys.Decimal => ImGuiKey.KeypadDecimal,
260260
Keys.Divide => ImGuiKey.KeypadDivide,
261-
>= Keys.F1 and <= Keys.F12 => ImGuiKey.F1 + (key - Keys.F1),
261+
>= Keys.F1 and <= Keys.F24 => ImGuiKey.F1 + (key - Keys.F1),
262262
Keys.NumLock => ImGuiKey.NumLock,
263263
Keys.Scroll => ImGuiKey.ScrollLock,
264264
Keys.LeftShift => ImGuiKey.ModShift,
@@ -275,6 +275,8 @@ private bool TryMapKeys(Keys key, out ImGuiKey imguikey)
275275
Keys.OemCloseBrackets => ImGuiKey.RightBracket,
276276
Keys.OemPipe => ImGuiKey.Backslash,
277277
Keys.OemQuotes => ImGuiKey.Apostrophe,
278+
Keys.BrowserBack => ImGuiKey.AppBack,
279+
Keys.BrowserForward => ImGuiKey.AppForward,
278280
_ => ImGuiKey.None,
279281
};
280282

src/ImGui.NET.SampleProgram/ImGuiController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ ImGuiKey KeyToImGuiKeyShortcut(Key keyToConvert, Key startKey1, ImGuiKey startKe
336336

337337
result = key switch
338338
{
339-
>= Key.F1 and <= Key.F12 => KeyToImGuiKeyShortcut(key, Key.F1, ImGuiKey.F1),
339+
>= Key.F1 and <= Key.F24 => KeyToImGuiKeyShortcut(key, Key.F1, ImGuiKey.F1),
340340
>= Key.Keypad0 and <= Key.Keypad9 => KeyToImGuiKeyShortcut(key, Key.Keypad0, ImGuiKey.Keypad0),
341341
>= Key.A and <= Key.Z => KeyToImGuiKeyShortcut(key, Key.A, ImGuiKey.A),
342342
>= Key.Number0 and <= Key.Number9 => KeyToImGuiKeyShortcut(key, Key.Number0, ImGuiKey._0),

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

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,43 @@ public void AddDrawCmd()
145145
{
146146
ImGuiNative.ImDrawList_AddDrawCmd((ImDrawList*)(NativePtr));
147147
}
148+
public void AddEllipse(Vector2 center, float radius_x, float radius_y, uint col)
149+
{
150+
float rot = 0.0f;
151+
int num_segments = 0;
152+
float thickness = 1.0f;
153+
ImGuiNative.ImDrawList_AddEllipse((ImDrawList*)(NativePtr), center, radius_x, radius_y, col, rot, num_segments, thickness);
154+
}
155+
public void AddEllipse(Vector2 center, float radius_x, float radius_y, uint col, float rot)
156+
{
157+
int num_segments = 0;
158+
float thickness = 1.0f;
159+
ImGuiNative.ImDrawList_AddEllipse((ImDrawList*)(NativePtr), center, radius_x, radius_y, col, rot, num_segments, thickness);
160+
}
161+
public void AddEllipse(Vector2 center, float radius_x, float radius_y, uint col, float rot, int num_segments)
162+
{
163+
float thickness = 1.0f;
164+
ImGuiNative.ImDrawList_AddEllipse((ImDrawList*)(NativePtr), center, radius_x, radius_y, col, rot, num_segments, thickness);
165+
}
166+
public void AddEllipse(Vector2 center, float radius_x, float radius_y, uint col, float rot, int num_segments, float thickness)
167+
{
168+
ImGuiNative.ImDrawList_AddEllipse((ImDrawList*)(NativePtr), center, radius_x, radius_y, col, rot, num_segments, thickness);
169+
}
170+
public void AddEllipseFilled(Vector2 center, float radius_x, float radius_y, uint col)
171+
{
172+
float rot = 0.0f;
173+
int num_segments = 0;
174+
ImGuiNative.ImDrawList_AddEllipseFilled((ImDrawList*)(NativePtr), center, radius_x, radius_y, col, rot, num_segments);
175+
}
176+
public void AddEllipseFilled(Vector2 center, float radius_x, float radius_y, uint col, float rot)
177+
{
178+
int num_segments = 0;
179+
ImGuiNative.ImDrawList_AddEllipseFilled((ImDrawList*)(NativePtr), center, radius_x, radius_y, col, rot, num_segments);
180+
}
181+
public void AddEllipseFilled(Vector2 center, float radius_x, float radius_y, uint col, float rot, int num_segments)
182+
{
183+
ImGuiNative.ImDrawList_AddEllipseFilled((ImDrawList*)(NativePtr), center, radius_x, radius_y, col, rot, num_segments);
184+
}
148185
public void AddImage(IntPtr user_texture_id, Vector2 p_min, Vector2 p_max)
149186
{
150187
Vector2 uv_min = new Vector2();
@@ -581,6 +618,15 @@ public void PathClear()
581618
{
582619
ImGuiNative.ImDrawList_PathClear((ImDrawList*)(NativePtr));
583620
}
621+
public void PathEllipticalArcTo(Vector2 center, float radius_x, float radius_y, float rot, float a_min, float a_max)
622+
{
623+
int num_segments = 0;
624+
ImGuiNative.ImDrawList_PathEllipticalArcTo((ImDrawList*)(NativePtr), center, radius_x, radius_y, rot, a_min, a_max, num_segments);
625+
}
626+
public void PathEllipticalArcTo(Vector2 center, float radius_x, float radius_y, float rot, float a_min, float a_max, int num_segments)
627+
{
628+
ImGuiNative.ImDrawList_PathEllipticalArcTo((ImDrawList*)(NativePtr), center, radius_x, radius_y, rot, a_min, a_max, num_segments);
629+
}
584630
public void PathFillConvex(uint col)
585631
{
586632
ImGuiNative.ImDrawList_PathFillConvex((ImDrawList*)(NativePtr), col);

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -519,52 +519,52 @@ public ImFontPtr AddFontFromMemoryCompressedBase85TTF(string compressed_font_dat
519519
}
520520
return new ImFontPtr(ret);
521521
}
522-
public ImFontPtr AddFontFromMemoryCompressedTTF(IntPtr compressed_font_data, int compressed_font_size, float size_pixels)
522+
public ImFontPtr AddFontFromMemoryCompressedTTF(IntPtr compressed_font_data, int compressed_font_data_size, float size_pixels)
523523
{
524524
void* native_compressed_font_data = (void*)compressed_font_data.ToPointer();
525525
ImFontConfig* font_cfg = null;
526526
ushort* glyph_ranges = null;
527-
ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryCompressedTTF((ImFontAtlas*)(NativePtr), native_compressed_font_data, compressed_font_size, size_pixels, font_cfg, glyph_ranges);
527+
ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryCompressedTTF((ImFontAtlas*)(NativePtr), native_compressed_font_data, compressed_font_data_size, size_pixels, font_cfg, glyph_ranges);
528528
return new ImFontPtr(ret);
529529
}
530-
public ImFontPtr AddFontFromMemoryCompressedTTF(IntPtr compressed_font_data, int compressed_font_size, float size_pixels, ImFontConfigPtr font_cfg)
530+
public ImFontPtr AddFontFromMemoryCompressedTTF(IntPtr compressed_font_data, int compressed_font_data_size, float size_pixels, ImFontConfigPtr font_cfg)
531531
{
532532
void* native_compressed_font_data = (void*)compressed_font_data.ToPointer();
533533
ImFontConfig* native_font_cfg = font_cfg.NativePtr;
534534
ushort* glyph_ranges = null;
535-
ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryCompressedTTF((ImFontAtlas*)(NativePtr), native_compressed_font_data, compressed_font_size, size_pixels, native_font_cfg, glyph_ranges);
535+
ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryCompressedTTF((ImFontAtlas*)(NativePtr), native_compressed_font_data, compressed_font_data_size, size_pixels, native_font_cfg, glyph_ranges);
536536
return new ImFontPtr(ret);
537537
}
538-
public ImFontPtr AddFontFromMemoryCompressedTTF(IntPtr compressed_font_data, int compressed_font_size, float size_pixels, ImFontConfigPtr font_cfg, IntPtr glyph_ranges)
538+
public ImFontPtr AddFontFromMemoryCompressedTTF(IntPtr compressed_font_data, int compressed_font_data_size, float size_pixels, ImFontConfigPtr font_cfg, IntPtr glyph_ranges)
539539
{
540540
void* native_compressed_font_data = (void*)compressed_font_data.ToPointer();
541541
ImFontConfig* native_font_cfg = font_cfg.NativePtr;
542542
ushort* native_glyph_ranges = (ushort*)glyph_ranges.ToPointer();
543-
ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryCompressedTTF((ImFontAtlas*)(NativePtr), native_compressed_font_data, compressed_font_size, size_pixels, native_font_cfg, native_glyph_ranges);
543+
ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryCompressedTTF((ImFontAtlas*)(NativePtr), native_compressed_font_data, compressed_font_data_size, size_pixels, native_font_cfg, native_glyph_ranges);
544544
return new ImFontPtr(ret);
545545
}
546-
public ImFontPtr AddFontFromMemoryTTF(IntPtr font_data, int font_size, float size_pixels)
546+
public ImFontPtr AddFontFromMemoryTTF(IntPtr font_data, int font_data_size, float size_pixels)
547547
{
548548
void* native_font_data = (void*)font_data.ToPointer();
549549
ImFontConfig* font_cfg = null;
550550
ushort* glyph_ranges = null;
551-
ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryTTF((ImFontAtlas*)(NativePtr), native_font_data, font_size, size_pixels, font_cfg, glyph_ranges);
551+
ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryTTF((ImFontAtlas*)(NativePtr), native_font_data, font_data_size, size_pixels, font_cfg, glyph_ranges);
552552
return new ImFontPtr(ret);
553553
}
554-
public ImFontPtr AddFontFromMemoryTTF(IntPtr font_data, int font_size, float size_pixels, ImFontConfigPtr font_cfg)
554+
public ImFontPtr AddFontFromMemoryTTF(IntPtr font_data, int font_data_size, float size_pixels, ImFontConfigPtr font_cfg)
555555
{
556556
void* native_font_data = (void*)font_data.ToPointer();
557557
ImFontConfig* native_font_cfg = font_cfg.NativePtr;
558558
ushort* glyph_ranges = null;
559-
ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryTTF((ImFontAtlas*)(NativePtr), native_font_data, font_size, size_pixels, native_font_cfg, glyph_ranges);
559+
ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryTTF((ImFontAtlas*)(NativePtr), native_font_data, font_data_size, size_pixels, native_font_cfg, glyph_ranges);
560560
return new ImFontPtr(ret);
561561
}
562-
public ImFontPtr AddFontFromMemoryTTF(IntPtr font_data, int font_size, float size_pixels, ImFontConfigPtr font_cfg, IntPtr glyph_ranges)
562+
public ImFontPtr AddFontFromMemoryTTF(IntPtr font_data, int font_data_size, float size_pixels, ImFontConfigPtr font_cfg, IntPtr glyph_ranges)
563563
{
564564
void* native_font_data = (void*)font_data.ToPointer();
565565
ImFontConfig* native_font_cfg = font_cfg.NativePtr;
566566
ushort* native_glyph_ranges = (ushort*)glyph_ranges.ToPointer();
567-
ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryTTF((ImFontAtlas*)(NativePtr), native_font_data, font_size, size_pixels, native_font_cfg, native_glyph_ranges);
567+
ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryTTF((ImFontAtlas*)(NativePtr), native_font_data, font_data_size, size_pixels, native_font_cfg, native_glyph_ranges);
568568
return new ImFontPtr(ret);
569569
}
570570
public bool Build()

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ public unsafe partial struct ImFontConfig
2323
public byte MergeMode;
2424
public uint FontBuilderFlags;
2525
public float RasterizerMultiply;
26+
public float RasterizerDensity;
2627
public ushort EllipsisChar;
2728
public fixed byte Name[40];
2829
public ImFont* DstFont;
@@ -51,6 +52,7 @@ public unsafe partial struct ImFontConfigPtr
5152
public ref bool MergeMode => ref Unsafe.AsRef<bool>(&NativePtr->MergeMode);
5253
public ref uint FontBuilderFlags => ref Unsafe.AsRef<uint>(&NativePtr->FontBuilderFlags);
5354
public ref float RasterizerMultiply => ref Unsafe.AsRef<float>(&NativePtr->RasterizerMultiply);
55+
public ref float RasterizerDensity => ref Unsafe.AsRef<float>(&NativePtr->RasterizerDensity);
5456
public ref ushort EllipsisChar => ref Unsafe.AsRef<ushort>(&NativePtr->EllipsisChar);
5557
public RangeAccessor<byte> Name => new RangeAccessor<byte>(NativePtr->Name, 40);
5658
public ImFontPtr DstFont => new ImFontPtr(NativePtr->DstFont);

0 commit comments

Comments
 (0)