Skip to content

Commit

Permalink
Update to v1.78.
Browse files Browse the repository at this point in the history
  • Loading branch information
mellinoe committed Aug 26, 2020
1 parent 181ceb5 commit 9b74ee4
Show file tree
Hide file tree
Showing 53 changed files with 26,572 additions and 8,560 deletions.
Binary file modified deps/cimgui/linux-x64/cimgui.so
Binary file not shown.
Binary file modified deps/cimgui/osx-x64/cimgui.dylib
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.
27,270 changes: 19,932 additions & 7,338 deletions src/CodeGenerator/definitions.json

Large diffs are not rendered by default.

5,018 changes: 4,528 additions & 490 deletions src/CodeGenerator/structs_and_enums.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/ImGui.NET.SampleProgram.XNA/SampleGame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ protected virtual void ImGuiLayout()
// Tip: if we don't call ImGui.Begin()/ImGui.End() the widgets appears in a window automatically called "Debug"
{
ImGui.Text("Hello, world!");
ImGui.SliderFloat("float", ref f, 0.0f, 1.0f, string.Empty, 1f);
ImGui.SliderFloat("float", ref f, 0.0f, 1.0f, string.Empty);
ImGui.ColorEdit3("clear color", ref clear_color);
if (ImGui.Button("Test Window")) show_test_window = !show_test_window;
if (ImGui.Button("Another Window")) show_another_window = !show_another_window;
Expand Down
2 changes: 1 addition & 1 deletion src/ImGui.NET.SampleProgram/MemoryEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public unsafe void Draw(string title, byte[] mem_data, int mem_size, int base_di
float scroll_offset = ((DataEditingAddr / Rows) - (data_editing_addr_backup / Rows)) * line_height;
bool scroll_desired = (scroll_offset < 0.0f && DataEditingAddr < visible_start_addr + Rows * 2) || (scroll_offset > 0.0f && DataEditingAddr > visible_end_addr - Rows * 2);
if (scroll_desired)
ImGuiNative.igSetScrollY(ImGuiNative.igGetScrollY() + scroll_offset);
ImGuiNative.igSetScrollYFloat(ImGuiNative.igGetScrollY() + scroll_offset);
}

for (int line_i = clipper.DisplayStart; line_i < clipper.DisplayEnd; line_i++) // display only visible items
Expand Down
2 changes: 1 addition & 1 deletion src/ImGui.NET.SampleProgram/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ private static unsafe void SubmitUI()
// Tip: if we don't call ImGui.BeginWindow()/ImGui.EndWindow() the widgets automatically appears in a window called "Debug".
{
ImGui.Text("Hello, world!"); // Display some text (you can use a format string too)
ImGui.SliderFloat("float", ref _f, 0, 1, _f.ToString("0.000"), 1); // Edit 1 float using a slider from 0.0f to 1.0f
ImGui.SliderFloat("float", ref _f, 0, 1, _f.ToString("0.000")); // Edit 1 float using a slider from 0.0f to 1.0f
//ImGui.ColorEdit3("clear color", ref _clearColor); // Edit 3 floats representing a color

ImGui.Text($"Mouse position: {ImGui.GetMousePos()}");
Expand Down
16 changes: 9 additions & 7 deletions src/ImGui.NET/Generated/ImColor.gen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,29 @@ public unsafe partial struct ImColorPtr
public ref Vector4 Value => ref Unsafe.AsRef<Vector4>(&NativePtr->Value);
public void Destroy()
{
ImGuiNative.ImColor_destroy(NativePtr);
ImGuiNative.ImColor_destroy((ImColor*)(NativePtr));
}
public ImColor HSV(float h, float s, float v)
{
ImColor __retval;
float a = 1.0f;
ImColor ret = ImGuiNative.ImColor_HSV(NativePtr, h, s, v, a);
return ret;
ImGuiNative.ImColor_HSV(&__retval, (ImColor*)(NativePtr), h, s, v, a);
return __retval;
}
public ImColor HSV(float h, float s, float v, float a)
{
ImColor ret = ImGuiNative.ImColor_HSV(NativePtr, h, s, v, a);
return ret;
ImColor __retval;
ImGuiNative.ImColor_HSV(&__retval, (ImColor*)(NativePtr), h, s, v, a);
return __retval;
}
public void SetHSV(float h, float s, float v)
{
float a = 1.0f;
ImGuiNative.ImColor_SetHSV(NativePtr, h, s, v, a);
ImGuiNative.ImColor_SetHSV((ImColor*)(NativePtr), h, s, v, a);
}
public void SetHSV(float h, float s, float v, float a)
{
ImGuiNative.ImColor_SetHSV(NativePtr, h, s, v, a);
ImGuiNative.ImColor_SetHSV((ImColor*)(NativePtr), h, s, v, a);
}
}
}
6 changes: 3 additions & 3 deletions src/ImGui.NET/Generated/ImDrawCmd.gen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ namespace ImGuiNET
{
public unsafe partial struct ImDrawCmd
{
public uint ElemCount;
public Vector4 ClipRect;
public IntPtr TextureId;
public uint VtxOffset;
public uint IdxOffset;
public uint ElemCount;
public IntPtr UserCallback;
public void* UserCallbackData;
}
Expand All @@ -23,16 +23,16 @@ public unsafe partial struct ImDrawCmdPtr
public static implicit operator ImDrawCmdPtr(ImDrawCmd* nativePtr) => new ImDrawCmdPtr(nativePtr);
public static implicit operator ImDrawCmd* (ImDrawCmdPtr wrappedPtr) => wrappedPtr.NativePtr;
public static implicit operator ImDrawCmdPtr(IntPtr nativePtr) => new ImDrawCmdPtr(nativePtr);
public ref uint ElemCount => ref Unsafe.AsRef<uint>(&NativePtr->ElemCount);
public ref Vector4 ClipRect => ref Unsafe.AsRef<Vector4>(&NativePtr->ClipRect);
public ref IntPtr TextureId => ref Unsafe.AsRef<IntPtr>(&NativePtr->TextureId);
public ref uint VtxOffset => ref Unsafe.AsRef<uint>(&NativePtr->VtxOffset);
public ref uint IdxOffset => ref Unsafe.AsRef<uint>(&NativePtr->IdxOffset);
public ref uint ElemCount => ref Unsafe.AsRef<uint>(&NativePtr->ElemCount);
public ref IntPtr UserCallback => ref Unsafe.AsRef<IntPtr>(&NativePtr->UserCallback);
public IntPtr UserCallbackData { get => (IntPtr)NativePtr->UserCallbackData; set => NativePtr->UserCallbackData = (void*)value; }
public void Destroy()
{
ImGuiNative.ImDrawCmd_destroy(NativePtr);
ImGuiNative.ImDrawCmd_destroy((ImDrawCmd*)(NativePtr));
}
}
}
10 changes: 6 additions & 4 deletions src/ImGui.NET/Generated/ImDrawData.gen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public unsafe partial struct ImDrawData
public Vector2 DisplayPos;
public Vector2 DisplaySize;
public Vector2 FramebufferScale;
public ImGuiViewport* OwnerViewport;
}
public unsafe partial struct ImDrawDataPtr
{
Expand All @@ -32,21 +33,22 @@ public unsafe partial struct ImDrawDataPtr
public ref Vector2 DisplayPos => ref Unsafe.AsRef<Vector2>(&NativePtr->DisplayPos);
public ref Vector2 DisplaySize => ref Unsafe.AsRef<Vector2>(&NativePtr->DisplaySize);
public ref Vector2 FramebufferScale => ref Unsafe.AsRef<Vector2>(&NativePtr->FramebufferScale);
public ImGuiViewportPtr OwnerViewport => new ImGuiViewportPtr(NativePtr->OwnerViewport);
public void Clear()
{
ImGuiNative.ImDrawData_Clear(NativePtr);
ImGuiNative.ImDrawData_Clear((ImDrawData*)(NativePtr));
}
public void DeIndexAllBuffers()
{
ImGuiNative.ImDrawData_DeIndexAllBuffers(NativePtr);
ImGuiNative.ImDrawData_DeIndexAllBuffers((ImDrawData*)(NativePtr));
}
public void Destroy()
{
ImGuiNative.ImDrawData_destroy(NativePtr);
ImGuiNative.ImDrawData_destroy((ImDrawData*)(NativePtr));
}
public void ScaleClipRects(Vector2 fb_scale)
{
ImGuiNative.ImDrawData_ScaleClipRects(NativePtr, fb_scale);
ImGuiNative.ImDrawData_ScaleClipRects((ImDrawData*)(NativePtr), fb_scale);
}
}
}
Loading

0 comments on commit 9b74ee4

Please sign in to comment.