Skip to content

Commit 7ab250f

Browse files
committed
Updated to ImGui 1.82 and recent ImPlot, ImNodes and ImGuizmo
1 parent 3db0d27 commit 7ab250f

File tree

82 files changed

+34943
-22870
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+34943
-22870
lines changed

src/CodeGenerator/ImguiDefinitions.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,12 @@ public void LoadFrom(string directory)
6565
{
6666
JProperty jp = (JProperty)jt;
6767
string name = jp.Name;
68-
if (typeLocations?[jp.Name]?.Value<string>() == "internal") {
68+
if (typeLocations?[jp.Name]?.Value<string>().Contains("internal") ?? false) {
6969
return null;
7070
}
7171
EnumMember[] elements = jp.Values().Select(v =>
7272
{
73-
return new EnumMember(v["name"].ToString(), v["value"].ToString());
73+
return new EnumMember(v["name"].ToString(), v["calc_value"].ToString());
7474
}).ToArray();
7575
return new EnumDefinition(name, elements);
7676
}).Where(x => x != null).ToArray();
@@ -79,7 +79,7 @@ public void LoadFrom(string directory)
7979
{
8080
JProperty jp = (JProperty)jt;
8181
string name = jp.Name;
82-
if (typeLocations?[jp.Name]?.Value<string>() == "internal") {
82+
if (typeLocations?[jp.Name]?.Value<string>().Contains("internal") ?? false) {
8383
return null;
8484
}
8585
TypeReference[] fields = jp.Values().Select(v =>
@@ -120,7 +120,7 @@ public void LoadFrom(string directory)
120120
}
121121
}
122122
if (friendlyName == null) { return null; }
123-
if (val["location"]?.ToString() == "internal") return null;
123+
if (val["location"]?.ToString().Contains("internal") ?? false) return null;
124124

125125
string exportedName = ov_cimguiname;
126126
if (exportedName == null)

src/CodeGenerator/TypeInfo.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ public class TypeInfo
3939
{ "ImGuiContext*", "IntPtr" },
4040
{ "ImPlotContext*", "IntPtr" },
4141
{ "EditorContext*", "IntPtr" },
42+
{ "ImGuiMemAllocFunc", "IntPtr" },
43+
{ "ImGuiMemFreeFunc", "IntPtr" },
44+
{ "ImFontBuilderIO", "IntPtr" },
4245
{ "float[2]", "Vector2*" },
4346
{ "float[3]", "Vector3*" },
4447
{ "float[4]", "Vector4*" },
@@ -76,6 +79,8 @@ public class TypeInfo
7679
{ "NULL", "null"},
7780
{ "nullptr", "null"},
7881
{ "ImVec2(0,0)", "new Vector2()" },
82+
{ "ImVec2(0.0f,0.0f)", "new Vector2()" },
83+
{ "ImVec2(-FLT_MIN,0)", "new Vector2(-float.MinValue, 0.0f)" },
7984
{ "ImVec2(-1,0)", "new Vector2(-1, 0)" },
8085
{ "ImVec2(1,0)", "new Vector2(1, 0)" },
8186
{ "ImVec2(1,1)", "new Vector2(1, 1)" },
@@ -92,6 +97,10 @@ public class TypeInfo
9297
{ "ImGuiCond_Once", "ImGuiCond.Once"},
9398
{ "ImPlotOrientation_Vertical", "ImPlotOrientation.Vertical"},
9499
{ "PinShape_CircleFilled", "PinShape._CircleFilled"},
100+
{ "ImGuiPopupFlags_None", "ImGuiPopupFlags.None"},
101+
{ "ImGuiNavHighlightFlags_TypeDefault", "ImGuiNavHighlightFlags.TypeDefault"},
102+
{ "ImGuiKeyModFlags_Ctrl", "ImGuiKeyModFlags.Ctrl"},
103+
{ "ImPlotYAxis_1", "ImPlotYAxis._1"},
95104
{ "FLT_MAX", "float.MaxValue" },
96105
{ "(((ImU32)(255)<<24)|((ImU32)(255)<<16)|((ImU32)(255)<<8)|((ImU32)(255)<<0))", "0xFFFFFFFF" },
97106
{ "sizeof(ImU8)", "sizeof(byte)"},

0 commit comments

Comments
 (0)