Skip to content

Commit bab93b7

Browse files
committed
Update to v1.66 of Dear ImGui.
Still marking this as a beta until the final autogen work items are completed.
1 parent 7f9b7d3 commit bab93b7

11 files changed

Lines changed: 3365 additions & 3252 deletions

File tree

deps/cimgui/linux-x64/cimgui.so

15.4 KB
Binary file not shown.

deps/cimgui/osx-x64/cimgui.dylib

3.97 KB
Binary file not shown.

deps/cimgui/win-x64/cimgui.dll

8 KB
Binary file not shown.

deps/cimgui/win-x86/cimgui.dll

4.5 KB
Binary file not shown.

src/CodeGenerator/definitions.json

Lines changed: 3257 additions & 3237 deletions
Large diffs are not rendered by default.

src/CodeGenerator/structs_and_enums.json

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -494,14 +494,19 @@
494494
"name": "ImGuiWindowFlags_AlwaysAutoResize",
495495
"value": "1 << 6"
496496
},
497+
{
498+
"calc_value": 128,
499+
"name": "ImGuiWindowFlags_NoBackground",
500+
"value": "1 << 7"
501+
},
497502
{
498503
"calc_value": 256,
499504
"name": "ImGuiWindowFlags_NoSavedSettings",
500505
"value": "1 << 8"
501506
},
502507
{
503508
"calc_value": 512,
504-
"name": "ImGuiWindowFlags_NoInputs",
509+
"name": "ImGuiWindowFlags_NoMouseInputs",
505510
"value": "1 << 9"
506511
},
507512
{
@@ -554,6 +559,16 @@
554559
"name": "ImGuiWindowFlags_NoNav",
555560
"value": "ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus"
556561
},
562+
{
563+
"calc_value": 43,
564+
"name": "ImGuiWindowFlags_NoDecoration",
565+
"value": "ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoCollapse"
566+
},
567+
{
568+
"calc_value": 786944,
569+
"name": "ImGuiWindowFlags_NoInputs",
570+
"value": "ImGuiWindowFlags_NoMouseInputs | ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus"
571+
},
557572
{
558573
"calc_value": 8388608,
559574
"name": "ImGuiWindowFlags_NavFlattened",
@@ -1608,8 +1623,8 @@
16081623
"name": "IndexAdvanceX"
16091624
},
16101625
{
1611-
"type": "ImVector_unsigned_short",
1612-
"template_type": "unsigned short",
1626+
"type": "ImVector_ImWchar",
1627+
"template_type": "ImWchar",
16131628
"name": "IndexLookup"
16141629
},
16151630
{
@@ -1963,6 +1978,11 @@
19631978
"type": "ImVector_char",
19641979
"template_type": "char",
19651980
"name": "Buf"
1981+
},
1982+
{
1983+
"type": "static char",
1984+
"size": 1,
1985+
"name": "EmptyString[1]"
19661986
}
19671987
],
19681988
"ImGuiStyle": [

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

Lines changed: 73 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3799,6 +3799,11 @@ public static Vector2 GetCursorStartPos()
37993799
Vector2 ret = ImGuiNative.igGetCursorStartPos();
38003800
return ret;
38013801
}
3802+
public static ImGuiPayloadPtr GetDragDropPayload()
3803+
{
3804+
ImGuiPayload* ret = ImGuiNative.igGetDragDropPayload();
3805+
return new ImGuiPayloadPtr(ret);
3806+
}
38023807
public static ImDrawDataPtr GetDrawData()
38033808
{
38043809
ImDrawData* ret = ImGuiNative.igGetDrawData();
@@ -7132,14 +7137,14 @@ public static void SetScrollFromPosY(float pos_y, float center_y_ratio)
71327137
{
71337138
ImGuiNative.igSetScrollFromPosY(pos_y, center_y_ratio);
71347139
}
7135-
public static void SetScrollHere()
7140+
public static void SetScrollHereY()
71367141
{
71377142
float center_y_ratio = 0.5f;
7138-
ImGuiNative.igSetScrollHere(center_y_ratio);
7143+
ImGuiNative.igSetScrollHereY(center_y_ratio);
71397144
}
7140-
public static void SetScrollHere(float center_y_ratio)
7145+
public static void SetScrollHereY(float center_y_ratio)
71417146
{
7142-
ImGuiNative.igSetScrollHere(center_y_ratio);
7147+
ImGuiNative.igSetScrollHereY(center_y_ratio);
71437148
}
71447149
public static void SetScrollX(float scroll_x)
71457150
{
@@ -7422,9 +7427,18 @@ public static bool SliderAngle(string label, ref float v_rad)
74227427
else { native_label = null; }
74237428
float v_degrees_min = -360.0f;
74247429
float v_degrees_max = +360.0f;
7430+
byte* native_format;
7431+
int format_byteCount = Encoding.UTF8.GetByteCount("%.0f deg");
7432+
byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1];
7433+
native_format = native_format_stackBytes;
7434+
fixed (char* format_ptr = "%.0f deg")
7435+
{
7436+
int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.0f deg".Length, native_format, format_byteCount);
7437+
native_format[native_format_offset] = 0;
7438+
}
74257439
fixed (float* native_v_rad = &v_rad)
74267440
{
7427-
byte ret = ImGuiNative.igSliderAngle(native_label, native_v_rad, v_degrees_min, v_degrees_max);
7441+
byte ret = ImGuiNative.igSliderAngle(native_label, native_v_rad, v_degrees_min, v_degrees_max, native_format);
74287442
return ret != 0;
74297443
}
74307444
}
@@ -7444,9 +7458,18 @@ public static bool SliderAngle(string label, ref float v_rad, float v_degrees_mi
74447458
}
74457459
else { native_label = null; }
74467460
float v_degrees_max = +360.0f;
7461+
byte* native_format;
7462+
int format_byteCount = Encoding.UTF8.GetByteCount("%.0f deg");
7463+
byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1];
7464+
native_format = native_format_stackBytes;
7465+
fixed (char* format_ptr = "%.0f deg")
7466+
{
7467+
int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.0f deg".Length, native_format, format_byteCount);
7468+
native_format[native_format_offset] = 0;
7469+
}
74477470
fixed (float* native_v_rad = &v_rad)
74487471
{
7449-
byte ret = ImGuiNative.igSliderAngle(native_label, native_v_rad, v_degrees_min, v_degrees_max);
7472+
byte ret = ImGuiNative.igSliderAngle(native_label, native_v_rad, v_degrees_min, v_degrees_max, native_format);
74507473
return ret != 0;
74517474
}
74527475
}
@@ -7465,9 +7488,52 @@ public static bool SliderAngle(string label, ref float v_rad, float v_degrees_mi
74657488
}
74667489
}
74677490
else { native_label = null; }
7491+
byte* native_format;
7492+
int format_byteCount = Encoding.UTF8.GetByteCount("%.0f deg");
7493+
byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1];
7494+
native_format = native_format_stackBytes;
7495+
fixed (char* format_ptr = "%.0f deg")
7496+
{
7497+
int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.0f deg".Length, native_format, format_byteCount);
7498+
native_format[native_format_offset] = 0;
7499+
}
7500+
fixed (float* native_v_rad = &v_rad)
7501+
{
7502+
byte ret = ImGuiNative.igSliderAngle(native_label, native_v_rad, v_degrees_min, v_degrees_max, native_format);
7503+
return ret != 0;
7504+
}
7505+
}
7506+
public static bool SliderAngle(string label, ref float v_rad, float v_degrees_min, float v_degrees_max, string format)
7507+
{
7508+
byte* native_label;
7509+
if (label != null)
7510+
{
7511+
int label_byteCount = Encoding.UTF8.GetByteCount(label);
7512+
byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1];
7513+
native_label = native_label_stackBytes;
7514+
fixed (char* label_ptr = label)
7515+
{
7516+
int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount);
7517+
native_label[native_label_offset] = 0;
7518+
}
7519+
}
7520+
else { native_label = null; }
7521+
byte* native_format;
7522+
if (format != null)
7523+
{
7524+
int format_byteCount = Encoding.UTF8.GetByteCount(format);
7525+
byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1];
7526+
native_format = native_format_stackBytes;
7527+
fixed (char* format_ptr = format)
7528+
{
7529+
int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount);
7530+
native_format[native_format_offset] = 0;
7531+
}
7532+
}
7533+
else { native_format = null; }
74687534
fixed (float* native_v_rad = &v_rad)
74697535
{
7470-
byte ret = ImGuiNative.igSliderAngle(native_label, native_v_rad, v_degrees_min, v_degrees_max);
7536+
byte ret = ImGuiNative.igSliderAngle(native_label, native_v_rad, v_degrees_min, v_degrees_max, native_format);
74717537
return ret != 0;
74727538
}
74737539
}

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,8 @@ public static unsafe partial class ImGuiNative
207207
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl, EntryPoint = "igGetCursorStartPos_nonUDT2")]
208208
public static extern Vector2 igGetCursorStartPos();
209209
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
210+
public static extern ImGuiPayload* igGetDragDropPayload();
211+
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
210212
public static extern ImDrawData* igGetDrawData();
211213
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
212214
public static extern IntPtr igGetDrawListSharedData();
@@ -547,7 +549,7 @@ public static unsafe partial class ImGuiNative
547549
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
548550
public static extern void igSetScrollFromPosY(float pos_y, float center_y_ratio);
549551
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
550-
public static extern void igSetScrollHere(float center_y_ratio);
552+
public static extern void igSetScrollHereY(float center_y_ratio);
551553
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
552554
public static extern void igSetScrollX(float scroll_x);
553555
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
@@ -587,7 +589,7 @@ public static unsafe partial class ImGuiNative
587589
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
588590
public static extern void igShowUserGuide();
589591
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
590-
public static extern byte igSliderAngle(byte* label, float* v_rad, float v_degrees_min, float v_degrees_max);
592+
public static extern byte igSliderAngle(byte* label, float* v_rad, float v_degrees_min, float v_degrees_max, byte* format);
591593
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]
592594
public static extern byte igSliderFloat(byte* label, float* v, float v_min, float v_max, byte* format, float power);
593595
[DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)]

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ namespace ImGuiNET
88
public unsafe partial struct ImGuiTextBuffer
99
{
1010
public ImVector Buf;
11+
public static char EmptyString_0;
1112
}
1213
public unsafe partial struct ImGuiTextBufferPtr
1314
{
@@ -18,6 +19,7 @@ public unsafe partial struct ImGuiTextBufferPtr
1819
public static implicit operator ImGuiTextBuffer* (ImGuiTextBufferPtr wrappedPtr) => wrappedPtr.NativePtr;
1920
public static implicit operator ImGuiTextBufferPtr(IntPtr nativePtr) => new ImGuiTextBufferPtr(nativePtr);
2021
public ImVector<byte> Buf => new ImVector<byte>(NativePtr->Buf);
22+
public RangeAccessor<static char> EmptyString => new RangeAccessor<static char>(&NativePtr->EmptyString_0, 1);
2123
public void appendf(string fmt)
2224
{
2325
byte* native_fmt;

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ public enum ImGuiWindowFlags
1111
NoScrollWithMouse = 1 << 4,
1212
NoCollapse = 1 << 5,
1313
AlwaysAutoResize = 1 << 6,
14+
NoBackground = 1 << 7,
1415
NoSavedSettings = 1 << 8,
15-
NoInputs = 1 << 9,
16+
NoMouseInputs = 1 << 9,
1617
MenuBar = 1 << 10,
1718
HorizontalScrollbar = 1 << 11,
1819
NoFocusOnAppearing = 1 << 12,
@@ -23,6 +24,8 @@ public enum ImGuiWindowFlags
2324
NoNavInputs = 1 << 18,
2425
NoNavFocus = 1 << 19,
2526
NoNav = NoNavInputs | NoNavFocus,
27+
NoDecoration = NoTitleBar | NoResize | NoScrollbar | NoCollapse,
28+
NoInputs = NoMouseInputs | NoNavInputs | NoNavFocus,
2629
NavFlattened = 1 << 23,
2730
ChildWindow = 1 << 24,
2831
Tooltip = 1 << 25,

0 commit comments

Comments
 (0)