Update to imgui 1.53 (no native binary updates).

internals
Eric Mellino 7 years ago
parent 27e9bf5fc1
commit 9cfeed151d
  1. 2
      src/ImGui.NET.SampleProgram/MemoryEditor.cs
  2. 2
      src/ImGui.NET.SampleProgram/SampleWindow.cs
  3. 4
      src/ImGui.NET/ColorTarget.cs
  4. 27
      src/ImGui.NET/ComboFlags.cs
  5. 43
      src/ImGui.NET/DragDropFlags.cs
  6. 22
      src/ImGui.NET/DrawList.cs
  7. 71
      src/ImGui.NET/ImGui.cs
  8. 83
      src/ImGui.NET/ImGuiNative.cs
  9. 8
      src/ImGui.NET/InputTextFlags.cs
  10. 2
      src/ImGui.NET/NativeIO.cs
  11. 16
      src/ImGui.NET/NativePayload.cs
  12. 32
      src/ImGui.NET/NativeStyle.cs
  13. 13
      src/ImGui.NET/Payload.cs
  14. 104
      src/ImGui.NET/Style.cs
  15. 28
      src/ImGui.NET/StyleVar.cs
  16. 2
      src/ImGui.NET/TreeNodeFlags.cs
  17. 21
      src/ImGui.NET/WindowFlags.cs

@ -67,7 +67,7 @@ namespace ImGuiNET
int line_total_count = (mem_size + Rows - 1) / Rows; int line_total_count = (mem_size + Rows - 1) / Rows;
ImGuiNative.igSetNextWindowContentSize(new Vector2(0.0f, line_total_count * line_height)); ImGuiNative.igSetNextWindowContentSize(new Vector2(0.0f, line_total_count * line_height));
ImGui.BeginChild("##scrolling", new Vector2(0, -ImGuiNative.igGetItemsLineHeightWithSpacing()), false, 0); ImGui.BeginChild("##scrolling", new Vector2(0, -ImGuiNative.igGetFrameHeightWithSpacing()), false, 0);
ImGui.PushStyleVar(StyleVar.FramePadding, new Vector2(0, 0)); ImGui.PushStyleVar(StyleVar.FramePadding, new Vector2(0, 0));
ImGui.PushStyleVar(StyleVar.ItemSpacing, new Vector2(0, 0)); ImGui.PushStyleVar(StyleVar.ItemSpacing, new Vector2(0, 0));

@ -224,6 +224,8 @@ namespace ImGuiNET
bool leftPressed = ImGui.GetIO().MouseDown[0]; bool leftPressed = ImGui.GetIO().MouseDown[0];
ImGui.Text("Current mouse position: " + pos + ". Pressed=" + leftPressed); ImGui.Text("Current mouse position: " + pos + ". Pressed=" + leftPressed);
ImGui.ShowStyleSelector("Select style");
if (ImGui.Button("Increment the counter.")) if (ImGui.Button("Increment the counter."))
{ {
_pressCount += 1; _pressCount += 1;

@ -8,7 +8,7 @@
Text, Text,
TextDisabled, TextDisabled,
WindowBg, WindowBg,
ChildWindowBg, ChildBg,
PopupBg, PopupBg,
Border, Border,
BorderShadow, BorderShadow,
@ -26,7 +26,6 @@
ScrollbarGrab, ScrollbarGrab,
ScrollbarGrabHovered, ScrollbarGrabHovered,
ScrollbarGrabActive, ScrollbarGrabActive,
ComboBg,
CheckMark, CheckMark,
SliderGrab, SliderGrab,
SliderGrabActive, SliderGrabActive,
@ -54,6 +53,7 @@
/// darken entire screen when a modal window is active /// darken entire screen when a modal window is active
/// </summary> /// </summary>
ModalWindowDarkening, ModalWindowDarkening,
DragDropTarget,
Count, Count,
}; };
} }

@ -0,0 +1,27 @@
namespace ImGuiNET
{
public enum ComboFlags
{
/// <summary>
/// Align the popup toward the left by default
/// </summary>
PopupAlignLeft = 1 << 0,
/// <summary>
/// Max ~4 items visible. Tip: If you want your combo popup to be a specific size you can use SetNextWindowSizeConstraints() prior to calling BeginCombo()
/// </summary>
HeightSmall = 1 << 1,
/// <summary>
/// Max ~8 items visible (default)
/// </summary>
HeightRegular = 1 << 2,
/// <summary>
/// Max ~20 items visible
/// </summary>
HeightLarge = 1 << 3,
/// <summary>
/// As many fitting items as possible
/// </summary>
HeightLargest = 1 << 4,
HeightMask_ = HeightSmall | HeightRegular | HeightLarge | HeightLargest
}
}

@ -0,0 +1,43 @@
namespace ImGuiNET
{
public enum DragDropFlags
{
// BeginDragDropSource() flags
/// <summary>
/// By default, a successful call to BeginDragDropSource opens a tooltip so you can display a preview or description of the source contents. This flag disable this behavior.
/// </summary>
SourceNoPreviewTooltip = 1 << 0,
/// <summary>
/// By default, when dragging we clear data so that IsItemHovered() will return true, to avoid subsequent user code submitting tooltips. This flag disable this behavior so you can still call IsItemHovered() on the source item.
/// </summary>
SourceNoDisableHover = 1 << 1,
/// <summary>
/// Disable the behavior that allows to open tree nodes and collapsing header by holding over them while dragging a source item.
/// </summary>
SourceNoHoldToOpenOthers = 1 << 2,
/// <summary>
/// Allow items such as Text(), Image() that have no unique identifier to be used as drag source, by manufacturing a temporary identifier based on their window-relative position. This is extremely unusual within the dear imgui ecosystem and so we made it explicit.
/// </summary>
SourceAllowNullID = 1 << 3,
/// <summary>
/// External source (from outside of imgui), won't attempt to read current item/window info. Will always return true. Only one Extern source can be active simultaneously.
/// </summary>
SourceExtern = 1 << 4,
// AcceptDragDropPayload() flags
/// <summary>
/// AcceptDragDropPayload() will returns true even before the mouse button is released. You can then call IsDelivery() to test if the payload needs to be delivered.
/// </summary>
AcceptBeforeDelivery = 1 << 10,
/// <summary>
/// Do not draw the default highlight rectangle when hovering over target.
/// </summary>
AcceptNoDrawDefaultRect = 1 << 11,
/// <summary>
/// For peeking ahead and inspecting the payload before delivery.
/// </summary>
AcceptPeekOnly = AcceptBeforeDelivery | AcceptNoDrawDefaultRect
}
}

@ -70,6 +70,28 @@ namespace ImGuiNET
ArrayPool<byte>.Shared.Return(tempBytes); ArrayPool<byte>.Shared.Return(tempBytes);
} }
public unsafe void AddImageRounded(
IntPtr userTextureID,
Vector2 a,
Vector2 b,
Vector2 uvA,
Vector2 uvB,
uint color,
float rounding,
int roundingCorners)
{
ImGuiNative.ImDrawList_AddImageRounded(
_nativeDrawList,
userTextureID.ToPointer(),
a,
b,
uvA,
uvB,
color,
rounding,
roundingCorners);
}
public void PushClipRect(Vector2 min, Vector2 max, bool intersectWithCurrentClipRect) public void PushClipRect(Vector2 min, Vector2 max, bool intersectWithCurrentClipRect)
{ {
ImGuiNative.ImDrawList_PushClipRect(_nativeDrawList, min, max, intersectWithCurrentClipRect ? (byte)1 : (byte)0); ImGuiNative.ImDrawList_PushClipRect(_nativeDrawList, min, max, intersectWithCurrentClipRect ? (byte)1 : (byte)0);

@ -35,17 +35,17 @@ namespace ImGuiNET
public static void PushID(string id) public static void PushID(string id)
{ {
ImGuiNative.igPushIdStr(id); ImGuiNative.igPushIDStr(id);
} }
public static void PushID(int id) public static void PushID(int id)
{ {
ImGuiNative.igPushIdInt(id); ImGuiNative.igPushIDInt(id);
} }
public static void PushIDRange(string idBegin, string idEnd) public static void PushIDRange(string idBegin, string idEnd)
{ {
ImGuiNative.igPushIdStrRange(idBegin, idEnd); ImGuiNative.igPushIDStrRange(idBegin, idEnd);
} }
public static void PushItemWidth(float width) public static void PushItemWidth(float width)
@ -60,17 +60,17 @@ namespace ImGuiNET
public static void PopID() public static void PopID()
{ {
ImGuiNative.igPopId(); ImGuiNative.igPopID();
} }
public static uint GetID(string id) public static uint GetID(string id)
{ {
return ImGuiNative.igGetIdStr(id); return ImGuiNative.igGetIDStr(id);
} }
public static uint GetID(string idBegin, string idEnd) public static uint GetID(string idBegin, string idEnd)
{ {
return ImGuiNative.igGetIdStrRange(idBegin, idEnd); return ImGuiNative.igGetIDStrRange(idBegin, idEnd);
} }
public static void Text(string message) public static void Text(string message)
@ -171,6 +171,11 @@ namespace ImGuiNET
return ImGuiNative.igRadioButtonBool(label, active); return ImGuiNative.igRadioButtonBool(label, active);
} }
public static bool BeginCombo(string label, string previewValue, ComboFlags flags)
=> ImGuiNative.igBeginCombo(label, previewValue, flags);
public static void EndCombo() => ImGuiNative.igEndCombo();
public unsafe static bool Combo(string label, ref int current_item, string[] items) public unsafe static bool Combo(string label, ref int current_item, string[] items)
{ {
return ImGuiNative.igCombo(label, ref current_item, items, items.Length, 5); return ImGuiNative.igCombo(label, ref current_item, items, items.Length, 5);
@ -286,6 +291,16 @@ namespace ImGuiNET
} }
} }
public static void ShowStyleSelector(string label)
{
ImGuiNative.igShowStyleSelector(label);
}
public static void ShowFontSelector(string label)
{
ImGuiNative.igShowFontSelector(label);
}
public unsafe static void PlotHistogram(string label, float[] values, int valuesOffset, string overlayText, float scaleMin, float scaleMax, Vector2 graphSize, int stride) public unsafe static void PlotHistogram(string label, float[] values, int valuesOffset, string overlayText, float scaleMin, float scaleMax, Vector2 graphSize, int stride)
{ {
fixed (float* valuesBasePtr = values) fixed (float* valuesBasePtr = values)
@ -821,6 +836,11 @@ namespace ImGuiNET
ImGuiNative.igSetCursorScreenPos(pos); ImGuiNative.igSetCursorScreenPos(pos);
} }
public static float GetFrameHeightWithSpacing()
{
return ImGuiNative.igGetFrameHeightWithSpacing();
}
public static void AlignTextToFramePadding() public static void AlignTextToFramePadding()
{ {
ImGuiNative.igAlignTextToFramePadding(); ImGuiNative.igAlignTextToFramePadding();
@ -1009,6 +1029,8 @@ namespace ImGuiNET
ImGuiNative.igSpacing(); ImGuiNative.igSpacing();
} }
public static float GetFrameHeight() => ImGuiNative.igGetFrameHeight();
public static void Columns(int count, string id, bool border) public static void Columns(int count, string id, bool border)
{ {
ImGuiNative.igColumns(count, id, border); ImGuiNative.igColumns(count, id, border);
@ -1059,6 +1081,21 @@ namespace ImGuiNET
ImGuiNative.igSameLine(localPositionX, spacingW); ImGuiNative.igSameLine(localPositionX, spacingW);
} }
public static bool BeginDragDropSource(DragDropFlags flags, int mouseButton)
=> ImGuiNative.igBeginDragDropSource(flags, mouseButton);
public static unsafe bool SetDragDropPayload(string type, IntPtr data, uint size, Condition cond)
=> ImGuiNative.igSetDragDropPayload(type, data.ToPointer(), size, cond);
public static void EndDragDropSource() => ImGuiNative.igEndDragDropSource();
public static bool BeginDragDropTarget() => ImGuiNative.igBeginDragDropTarget();
public static unsafe Payload AcceptDragDropPayload(string type, DragDropFlags flags)
=> new Payload(ImGuiNative.igAcceptDragDropPayload(type, flags));
public static void EndDragDropTarget() => ImGuiNative.igEndDragDropTarget();
public static void PushClipRect(Vector2 min, Vector2 max, bool intersectWithCurrentCliRect) public static void PushClipRect(Vector2 min, Vector2 max, bool intersectWithCurrentCliRect)
{ {
ImGuiNative.igPushClipRect(min, max, intersectWithCurrentCliRect ? (byte)1 : (byte)0); ImGuiNative.igPushClipRect(min, max, intersectWithCurrentCliRect ? (byte)1 : (byte)0);
@ -1069,6 +1106,21 @@ namespace ImGuiNET
ImGuiNative.igPopClipRect(); ImGuiNative.igPopClipRect();
} }
public static unsafe void StyleColorsClassic(Style style)
{
ImGuiNative.igStyleColorsClassic(style.NativePtr);
}
public static unsafe void StyleColorsDark(Style style)
{
ImGuiNative.igStyleColorsDark(style.NativePtr);
}
public static unsafe void StyleColorsLight(Style style)
{
ImGuiNative.igStyleColorsLight(style.NativePtr);
}
public static bool IsItemHovered(HoveredFlags flags) public static bool IsItemHovered(HoveredFlags flags)
{ {
return ImGuiNative.igIsItemHovered(flags); return ImGuiNative.igIsItemHovered(flags);
@ -1094,6 +1146,8 @@ namespace ImGuiNET
return ImGuiNative.igIsAnyItemActive(); return ImGuiNative.igIsAnyItemActive();
} }
public static unsafe DrawList GetOverlayDrawList() => new DrawList(ImGuiNative.igGetOverlayDrawList());
public static void SetTooltip(string text) public static void SetTooltip(string text)
{ {
ImGuiNative.igSetTooltip(text); ImGuiNative.igSetTooltip(text);
@ -1160,6 +1214,11 @@ namespace ImGuiNET
ImGuiNative.igSetScrollHere(); ImGuiNative.igSetScrollHere();
} }
public static void SetItemDefaultFocus()
{
ImGuiNative.igSetItemDefaultFocus();
}
public static void SetScrollHere(float centerYRatio) public static void SetScrollHere(float centerYRatio)
{ {
ImGuiNative.igSetScrollHere(centerYRatio); ImGuiNative.igSetScrollHere(centerYRatio);

@ -34,10 +34,16 @@ namespace ImGuiNET
public static extern void igShowStyleEditor(ref NativeStyle @ref); public static extern void igShowStyleEditor(ref NativeStyle @ref);
[DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)]
public static extern void igShowTestWindow(ref bool opened); public static extern void igShowDemoWindow(ref bool opened);
[DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)]
public static extern void igShowMetricsWindow(ref bool opened); public static extern void igShowMetricsWindow(ref bool opened);
[DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)]
public static extern void igShowStyleSelector(string label);
[DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)]
public static extern void igShowFontSelector(string label);
// Window // Window
[DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.I1)] [return: MarshalAs(UnmanagedType.I1)]
@ -98,8 +104,6 @@ namespace ImGuiNET
[DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)]
public static extern void igSetNextWindowContentSize(Vector2 size); public static extern void igSetNextWindowContentSize(Vector2 size);
[DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)]
public static extern void igSetNextWindowContentWidth(float width);
[DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)]
public static extern void igSetNextWindowCollapsed(bool collapsed, Condition cond); public static extern void igSetNextWindowCollapsed(bool collapsed, Condition cond);
[DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)]
public static extern void igSetNextWindowFocus(); public static extern void igSetNextWindowFocus();
@ -137,6 +141,9 @@ namespace ImGuiNET
[DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)]
public static extern void igSetScrollFromPosY(float pos_y, float center_y_ratio = 0.5f); public static extern void igSetScrollFromPosY(float pos_y, float center_y_ratio = 0.5f);
[DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)]
public static extern void igSetItemDefaultFocus();
[DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)]
public static extern void igSetKeyboardFocusHere(int offset); public static extern void igSetKeyboardFocusHere(int offset);
@ -234,7 +241,9 @@ namespace ImGuiNET
[DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)]
public static extern float igGetTextLineHeightWithSpacing(); public static extern float igGetTextLineHeightWithSpacing();
[DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)]
public static extern float igGetItemsLineHeightWithSpacing(); public static extern float igGetFrameHeight();
[DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)]
public static extern float igGetFrameHeightWithSpacing();
// Columns // Columns
[DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)]
@ -259,21 +268,21 @@ namespace ImGuiNET
// If you are creating widgets in a loop you most likely want to push a unique identifier so ImGui can differentiate them // If you are creating widgets in a loop you most likely want to push a unique identifier so ImGui can differentiate them
// You can also use "##extra" within your widget name to distinguish them from each others (see 'Programmer Guide') // You can also use "##extra" within your widget name to distinguish them from each others (see 'Programmer Guide')
[DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)]
public static extern void igPushIdStr(string str_id); public static extern void igPushIDStr(string str_id);
[DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)]
public static extern void igPushIdStrRange(string str_begin, string str_end); public static extern void igPushIDStrRange(string str_begin, string str_end);
[DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)]
public static extern void igPushIdPtr(void* ptr_id); public static extern void igPushIDPtr(void* ptr_id);
[DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)]
public static extern void igPushIdInt(int int_id); public static extern void igPushIDInt(int int_id);
[DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)]
public static extern void igPopId(); public static extern void igPopID();
[DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)]
public static extern uint igGetIdStr(string str_id); public static extern uint igGetIDStr(string str_id);
[DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)]
public static extern uint igGetIdStrRange(string str_begin, string str_end); public static extern uint igGetIDStrRange(string str_begin, string str_end);
[DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)]
public static extern uint igGetIdPtr(void* ptr_id); public static extern uint igGetIDPtr(void* ptr_id);
// Widgets // Widgets
[DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)]
@ -324,6 +333,13 @@ namespace ImGuiNET
[DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.I1)] [return: MarshalAs(UnmanagedType.I1)]
public static extern bool igRadioButton(string label, int* v, int v_button); public static extern bool igRadioButton(string label, int* v, int v_button);
[DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.I1)]
public static extern bool igBeginCombo(string label, string preview_value, ComboFlags flags);
[DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)]
public static extern void igEndCombo();
[DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.I1)] [return: MarshalAs(UnmanagedType.I1)]
public static extern bool igCombo(string label, ref int current_item, string[] items, int items_count, int height_in_items); public static extern bool igCombo(string label, ref int current_item, string[] items, int items_count, int height_in_items);
@ -624,12 +640,38 @@ namespace ImGuiNET
//public static extern void igLogText(string fmt, ...); //public static extern void igLogText(string fmt, ...);
public static extern void igLogText(string fmt); public static extern void igLogText(string fmt);
// Drag-drop
[DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.I1)]
public static extern bool igBeginDragDropSource(DragDropFlags flags, int mouse_button);
[DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.I1)]
public static extern bool igSetDragDropPayload(string type, void* data, uint size, Condition cond);
[DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)]
public static extern void igEndDragDropSource();
[DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.I1)]
public static extern bool igBeginDragDropTarget();
[DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)]
public static extern NativePayload* igAcceptDragDropPayload(string type, DragDropFlags flags);
[DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)]
public static extern void igEndDragDropTarget();
// Clipping // Clipping
[DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)]
public static extern void igPushClipRect(Vector2 clip_rect_min, Vector2 clip_rect_max, byte intersect_with_current_clip_rect); public static extern void igPushClipRect(Vector2 clip_rect_min, Vector2 clip_rect_max, byte intersect_with_current_clip_rect);
[DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)]
public static extern void igPopClipRect(); public static extern void igPopClipRect();
// Built-in Styles
[DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)]
public static extern void igStyleColorsClassic(NativeStyle* dst);
[DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)]
public static extern void igStyleColorsDark(NativeStyle* dst);
[DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)]
public static extern void igStyleColorsLight(NativeStyle* dst);
// Utilities // Utilities
[DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.I1)] [return: MarshalAs(UnmanagedType.I1)]
@ -666,15 +708,6 @@ namespace ImGuiNET
public static extern bool igIsWindowFocused(FocusedFlags flags); public static extern bool igIsWindowFocused(FocusedFlags flags);
[DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.I1)] [return: MarshalAs(UnmanagedType.I1)]
public static extern bool igIsRootWindowFocused();
[DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.I1)]
public static extern bool igIsRootWindowOrAnyChildFocused();
[DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.I1)]
public static extern bool igIsRootWindowOrAnyChildHovered();
[DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.I1)]
public static extern bool igIsRectVisible(Vector2 item_size); public static extern bool igIsRectVisible(Vector2 item_size);
[DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.I1)] [return: MarshalAs(UnmanagedType.I1)]
@ -684,6 +717,8 @@ namespace ImGuiNET
[DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)]
public static extern int igGetFrameCount(); public static extern int igGetFrameCount();
[DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)]
public static extern NativeDrawList* igGetOverlayDrawList();
[DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)]
public static extern string igGetStyleColorName(ColorTarget idx); public static extern string igGetStyleColorName(ColorTarget idx);
[DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)]
public static extern void igCalcItemRectClosestPoint(out Vector2 pOut, Vector2 pos, bool on_edge, float outward); public static extern void igCalcItemRectClosestPoint(out Vector2 pOut, Vector2 pos, bool on_edge, float outward);
@ -892,9 +927,11 @@ namespace ImGuiNET
[DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)]
public static extern void ImDrawList_AddImageQuad(NativeDrawList* list, void* user_texture_id, Vector2 a, Vector2 b, Vector2 c, Vector2 d, Vector2 uv_a, Vector2 uv_b, Vector2 uv_c, Vector2 uv_d, uint col); public static extern void ImDrawList_AddImageQuad(NativeDrawList* list, void* user_texture_id, Vector2 a, Vector2 b, Vector2 c, Vector2 d, Vector2 uv_a, Vector2 uv_b, Vector2 uv_c, Vector2 uv_d, uint col);
[DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)]
public static extern void ImDrawList_AddPolyline(NativeDrawList* list, Vector2* points, int num_points, uint col, byte closed, float thickness, byte anti_aliased); public static extern void ImDrawList_AddImageRounded(NativeDrawList* list, void* user_texture_id, Vector2 a, Vector2 b, Vector2 uv_a, Vector2 uv_b, uint col, float rounding, int rounding_corners);
[DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)]
public static extern void ImDrawList_AddPolyline(NativeDrawList* list, Vector2* points, int num_points, uint col, byte closed, float thickness);
[DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)]
public static extern void ImDrawList_AddConvexPolyFilled(NativeDrawList* list, Vector2* points, int num_points, uint col, byte anti_aliased); public static extern void ImDrawList_AddConvexPolyFilled(NativeDrawList* list, Vector2* points, int num_points, uint col);
[DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)]
public static extern void ImDrawList_AddBezierCurve(NativeDrawList* list, Vector2 pos0, Vector2 cp0, Vector2 cp1, Vector2 pos1, uint col, float thickness, int num_segments); public static extern void ImDrawList_AddBezierCurve(NativeDrawList* list, Vector2 pos0, Vector2 cp0, Vector2 cp1, Vector2 pos1, uint col, float thickness, int num_segments);
[DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)]

@ -67,6 +67,14 @@
/// </summary> /// </summary>
ReadOnly = 1 << 14, ReadOnly = 1 << 14,
/// <summary> /// <summary>
/// Password mode, display all characters as '*'
/// </summary>
Password,
/// <summary>
/// Disable undo/redo. Note that input text owns the text data while active, if you want to provide your own undo/redo stack you need e.g. to call ClearActiveID().
/// </summary>
NoUndoRedo,
/// <summary>
/// For internal use by InputTextMultiline() /// For internal use by InputTextMultiline()
/// </summary> /// </summary>
Multiline = 1 << 20 Multiline = 1 << 20

@ -117,7 +117,7 @@ namespace ImGuiNET
/// Multi-selection in lists uses Cmd/Super instead of Ctrl /// Multi-selection in lists uses Cmd/Super instead of Ctrl
/// Default value: True on OSX; false otherwise. /// Default value: True on OSX; false otherwise.
/// </summary> /// </summary>
public byte OSXBehaviors; public byte OptMacOSXBehaviors;
/// <summary> /// <summary>
/// Enable blinking cursor, for users who consider it annoying. /// Enable blinking cursor, for users who consider it annoying.
/// Default value: true. /// Default value: true.

@ -0,0 +1,16 @@
namespace ImGuiNET
{
public unsafe struct NativePayload
{
public void* Data;
public int DataSize;
// Internal
private uint SourceId;
private uint SourceParentId;
private int DataFrameCount;
private fixed byte DataType[8 + 1];
private byte Preview;
private byte Delivery;
}
}

@ -15,21 +15,37 @@ namespace ImGuiNET
/// </summary> /// </summary>
public Vector2 WindowPadding; public Vector2 WindowPadding;
/// <summary> /// <summary>
/// Minimum window size.
/// </summary>
public Vector2 WindowMinSize;
/// <summary>
/// Radius of window corners rounding. Set to 0.0f to have rectangular windows. /// Radius of window corners rounding. Set to 0.0f to have rectangular windows.
/// </summary> /// </summary>
public float WindowRounding; public float WindowRounding;
/// <summary> /// <summary>
/// Thickness of border around windows. Generally set to 0.0f or 1.0f. (Other values are not well tested and more CPU/GPU costly)
/// </summary>
public float WindowBorderSize;
/// <summary>
/// Minimum window size.
/// </summary>
public Vector2 WindowMinSize;
/// <summary>
/// Alignment for title bar text. /// Alignment for title bar text.
/// </summary> /// </summary>
public Vector2 WindowTitleAlign; public Vector2 WindowTitleAlign;
/// <summary> /// <summary>
/// Radius of child window corners rounding. Set to 0.0f to have rectangular windows. /// Radius of child window corners rounding. Set to 0.0f to have rectangular windows.
/// </summary> /// </summary>
public float ChildWindowRounding; public float ChildRounding;
/// <summary>
/// Thickness of border around child windows. Generally set to 0.0f or 1.0f. (Other values are not well tested and more CPU/GPU costly)
/// </summary>
public float ChildBorderSize;
/// <summary>
/// Radius of popup window corners rounding.
/// </summary>
public float PopupRounding;
/// <summary>
/// Thickness of border around popup windows. Generally set to 0.0f or 1.0f. (Other values are not well tested and more CPU/GPU costly)
/// </summary>
public float PopupBorderSize;
/// <summary> /// <summary>
/// Padding within a framed rectangle (used by most widgets). /// Padding within a framed rectangle (used by most widgets).
/// </summary> /// </summary>
@ -39,6 +55,10 @@ namespace ImGuiNET
/// </summary> /// </summary>
public float FrameRounding; public float FrameRounding;
/// <summary> /// <summary>
/// Thickness of border around frames. Generally set to 0.0f or 1.0f. (Other values are not well tested and more CPU/GPU costly)
/// </summary>
public float FrameBorderSize;
/// <summary>
/// Horizontal and vertical spacing between widgets/lines. /// Horizontal and vertical spacing between widgets/lines.
/// </summary> /// </summary>
public Vector2 ItemSpacing; public Vector2 ItemSpacing;
@ -93,7 +113,7 @@ namespace ImGuiNET
/// <summary> /// <summary>
/// Enable anti-aliasing on filled shapes (rounded rectangles, circles, etc.) /// Enable anti-aliasing on filled shapes (rounded rectangles, circles, etc.)
/// </summary> /// </summary>
public byte AntiAliasedShapes; public byte AntiAliasedFill;
/// <summary> /// <summary>
/// Tessellation tolerance. Decrease for highly tessellated curves (higher quality, more polygons), increase to reduce quality. /// Tessellation tolerance. Decrease for highly tessellated curves (higher quality, more polygons), increase to reduce quality.
/// </summary> /// </summary>

@ -0,0 +1,13 @@
using System;
namespace ImGuiNET
{
public unsafe struct Payload
{
public readonly NativePayload* NativePtr;
public Payload(NativePayload* ptr) => NativePtr = ptr;
public IntPtr Data => (IntPtr)NativePtr->Data;
public int DataSize => NativePtr->DataSize;
}
}

@ -4,11 +4,11 @@ namespace ImGuiNET
{ {
public unsafe class Style public unsafe class Style
{ {
private readonly NativeStyle* _stylePtr; public readonly NativeStyle* NativePtr;
public Style(NativeStyle* style) public Style(NativeStyle* style)
{ {
_stylePtr = style; NativePtr = style;
} }
/// <summary> /// <summary>
@ -16,8 +16,8 @@ namespace ImGuiNET
/// </summary> /// </summary>
public float Alpha public float Alpha
{ {
get { return _stylePtr->Alpha; } get { return NativePtr->Alpha; }
set { _stylePtr->Alpha = value; } set { NativePtr->Alpha = value; }
} }
/// <summary> /// <summary>
@ -25,8 +25,8 @@ namespace ImGuiNET
/// </summary> /// </summary>
public Vector2 WindowPadding public Vector2 WindowPadding
{ {
get { return _stylePtr->WindowPadding; } get { return NativePtr->WindowPadding; }
set { _stylePtr->WindowPadding = value; } set { NativePtr->WindowPadding = value; }
} }
/// <summary> /// <summary>
@ -34,8 +34,8 @@ namespace ImGuiNET
/// </summary> /// </summary>
public Vector2 WindowMinSize public Vector2 WindowMinSize
{ {
get { return _stylePtr->WindowMinSize; } get { return NativePtr->WindowMinSize; }
set { _stylePtr->WindowMinSize = value; } set { NativePtr->WindowMinSize = value; }
} }
/// <summary> /// <summary>
@ -43,8 +43,8 @@ namespace ImGuiNET
/// </summary> /// </summary>
public float WindowRounding public float WindowRounding
{ {
get { return _stylePtr->WindowRounding; } get { return NativePtr->WindowRounding; }
set { _stylePtr->WindowRounding = value; } set { NativePtr->WindowRounding = value; }
} }
/// <summary> /// <summary>
@ -52,8 +52,8 @@ namespace ImGuiNET
/// </summary> /// </summary>
public Vector2 WindowTitleAlign public Vector2 WindowTitleAlign
{ {
get { return _stylePtr->WindowTitleAlign; } get { return NativePtr->WindowTitleAlign; }
set { _stylePtr->WindowTitleAlign = value; } set { NativePtr->WindowTitleAlign = value; }
} }
/// <summary> /// <summary>
@ -61,8 +61,8 @@ namespace ImGuiNET
/// </summary> /// </summary>
public float ChildWindowRounding public float ChildWindowRounding
{ {
get { return _stylePtr->ChildWindowRounding; } get { return NativePtr->ChildRounding; }
set { _stylePtr->ChildWindowRounding = value; } set { NativePtr->ChildRounding = value; }
} }
/// <summary> /// <summary>
@ -70,8 +70,8 @@ namespace ImGuiNET
/// </summary> /// </summary>
public Vector2 FramePadding public Vector2 FramePadding
{ {
get { return _stylePtr->FramePadding; } get { return NativePtr->FramePadding; }
set { _stylePtr->FramePadding = value; } set { NativePtr->FramePadding = value; }
} }
/// <summary> /// <summary>
@ -79,8 +79,8 @@ namespace ImGuiNET
/// </summary> /// </summary>
public float FrameRounding public float FrameRounding
{ {
get { return _stylePtr->FrameRounding; } get { return NativePtr->FrameRounding; }
set { _stylePtr->FrameRounding = value; } set { NativePtr->FrameRounding = value; }
} }
/// <summary> /// <summary>
@ -88,8 +88,8 @@ namespace ImGuiNET
/// </summary> /// </summary>
public Vector2 ItemSpacing public Vector2 ItemSpacing
{ {
get { return _stylePtr->ItemSpacing; } get { return NativePtr->ItemSpacing; }
set { _stylePtr->ItemSpacing = value; } set { NativePtr->ItemSpacing = value; }
} }
/// <summary> /// <summary>
@ -97,8 +97,8 @@ namespace ImGuiNET
/// </summary> /// </summary>
public Vector2 ItemInnerSpacing public Vector2 ItemInnerSpacing
{ {
get { return _stylePtr->ItemInnerSpacing; } get { return NativePtr->ItemInnerSpacing; }
set { _stylePtr->ItemInnerSpacing = value; } set { NativePtr->ItemInnerSpacing = value; }
} }
/// <summary> /// <summary>
@ -106,8 +106,8 @@ namespace ImGuiNET
/// </summary> /// </summary>
public Vector2 TouchExtraPadding public Vector2 TouchExtraPadding
{ {
get { return _stylePtr->TouchExtraPadding; } get { return NativePtr->TouchExtraPadding; }
set { _stylePtr->TouchExtraPadding = value; } set { NativePtr->TouchExtraPadding = value; }
} }
/// <summary> /// <summary>
@ -115,8 +115,8 @@ namespace ImGuiNET
/// </summary> /// </summary>
public float IndentSpacing public float IndentSpacing
{ {
get { return _stylePtr->IndentSpacing; } get { return NativePtr->IndentSpacing; }
set { _stylePtr->IndentSpacing = value; } set { NativePtr->IndentSpacing = value; }
} }
/// <summary> /// <summary>
@ -124,8 +124,8 @@ namespace ImGuiNET
/// </summary> /// </summary>
public float ColumnsMinSpacing public float ColumnsMinSpacing
{ {
get { return _stylePtr->ColumnsMinSpacing; } get { return NativePtr->ColumnsMinSpacing; }
set { _stylePtr->ColumnsMinSpacing = value; } set { NativePtr->ColumnsMinSpacing = value; }
} }
/// <summary> /// <summary>
@ -133,8 +133,8 @@ namespace ImGuiNET
/// </summary> /// </summary>
public float ScrollbarSize public float ScrollbarSize
{ {
get { return _stylePtr->ScrollbarSize; } get { return NativePtr->ScrollbarSize; }
set { _stylePtr->ScrollbarSize = value; } set { NativePtr->ScrollbarSize = value; }
} }
/// <summary> /// <summary>
@ -142,8 +142,8 @@ namespace ImGuiNET
/// </summary> /// </summary>
public float ScrollbarRounding public float ScrollbarRounding
{ {
get { return _stylePtr->ScrollbarRounding; } get { return NativePtr->ScrollbarRounding; }
set { _stylePtr->ScrollbarRounding = value; } set { NativePtr->ScrollbarRounding = value; }
} }
/// <summary> /// <summary>
@ -151,8 +151,8 @@ namespace ImGuiNET
/// </summary> /// </summary>
public float GrabMinSize public float GrabMinSize
{ {
get { return _stylePtr->GrabMinSize; } get { return NativePtr->GrabMinSize; }
set { _stylePtr->GrabMinSize = value; } set { NativePtr->GrabMinSize = value; }
} }
/// <summary> /// <summary>
@ -160,8 +160,8 @@ namespace ImGuiNET
/// </summary> /// </summary>
public float GrabRounding public float GrabRounding
{ {
get { return _stylePtr->GrabRounding; } get { return NativePtr->GrabRounding; }
set { _stylePtr->GrabRounding = value; } set { NativePtr->GrabRounding = value; }
} }
/// <summary> /// <summary>
@ -169,8 +169,8 @@ namespace ImGuiNET
/// </summary> /// </summary>
public Vector2 DisplayWindowPadding public Vector2 DisplayWindowPadding
{ {
get { return _stylePtr->DisplayWindowPadding; } get { return NativePtr->DisplayWindowPadding; }
set { _stylePtr->DisplayWindowPadding = value; } set { NativePtr->DisplayWindowPadding = value; }
} }
/// <summary> /// <summary>
@ -178,8 +178,8 @@ namespace ImGuiNET
/// </summary> /// </summary>
public Vector2 DisplaySafeAreaPadding public Vector2 DisplaySafeAreaPadding
{ {
get { return _stylePtr->DisplaySafeAreaPadding; } get { return NativePtr->DisplaySafeAreaPadding; }
set { _stylePtr->DisplaySafeAreaPadding = value; } set { NativePtr->DisplaySafeAreaPadding = value; }
} }
/// <summary> /// <summary>
@ -187,17 +187,17 @@ namespace ImGuiNET
/// </summary> /// </summary>
public bool AntiAliasedLines public bool AntiAliasedLines
{ {
get { return _stylePtr->AntiAliasedLines == 1; } get { return NativePtr->AntiAliasedLines == 1; }
set { _stylePtr->AntiAliasedLines = value ? (byte)1 : (byte)0; } set { NativePtr->AntiAliasedLines = value ? (byte)1 : (byte)0; }
} }
/// <summary> /// <summary>
/// Enable anti-aliasing on filled shapes (rounded rectangles, circles, etc.) /// Enable anti-aliasing on filled shapes (rounded rectangles, circles, etc.)
/// </summary> /// </summary>
public bool AntiAliasedShapes public bool AntiAliasedFill
{ {
get { return _stylePtr->AntiAliasedShapes == 1; } get { return NativePtr->AntiAliasedFill == 1; }
set { _stylePtr->AntiAliasedShapes = value ? (byte)1 : (byte)0; } set { NativePtr->AntiAliasedFill = value ? (byte)1 : (byte)0; }
} }
/// <summary> /// <summary>
@ -205,8 +205,8 @@ namespace ImGuiNET
/// </summary> /// </summary>
public float CurveTessellationTolerance public float CurveTessellationTolerance
{ {
get { return _stylePtr->CurveTessellationTol; } get { return NativePtr->CurveTessellationTol; }
set { _stylePtr->CurveTessellationTol = value; } set { NativePtr->CurveTessellationTol = value; }
} }
/// <summary> /// <summary>
@ -214,7 +214,7 @@ namespace ImGuiNET
/// </summary> /// </summary>
/// <param name="target">The type of UI element.</param> /// <param name="target">The type of UI element.</param>
/// <returns>The element's color as currently configured.</returns> /// <returns>The element's color as currently configured.</returns>
public Vector4 GetColor(ColorTarget target) => *(Vector4*)&_stylePtr->Colors[(int)target * 4]; public Vector4 GetColor(ColorTarget target) => *(Vector4*)&NativePtr->Colors[(int)target * 4];
/// <summary> /// <summary>
/// Sets the style color for a particular UI element type. /// Sets the style color for a particular UI element type.
@ -223,10 +223,10 @@ namespace ImGuiNET
/// <param name="value">The new color.</param> /// <param name="value">The new color.</param>
public void SetColor(ColorTarget target, Vector4 value) public void SetColor(ColorTarget target, Vector4 value)
{ {
_stylePtr->Colors[(int)target * 4 + 0] = value.X; NativePtr->Colors[(int)target * 4 + 0] = value.X;
_stylePtr->Colors[(int)target * 4 + 1] = value.Y; NativePtr->Colors[(int)target * 4 + 1] = value.Y;
_stylePtr->Colors[(int)target * 4 + 2] = value.Z; NativePtr->Colors[(int)target * 4 + 2] = value.Z;
_stylePtr->Colors[(int)target * 4 + 3] = value.W; NativePtr->Colors[(int)target * 4 + 3] = value.W;
} }
} }
} }

@ -19,13 +19,29 @@
/// </summary> /// </summary>
WindowRounding, WindowRounding,
/// <summary> /// <summary>
/// float
/// </summary>
WindowBorderSize,
/// <summary>
/// System.Numerics.Vector2 /// System.Numerics.Vector2
/// </summary> /// </summary>
WindowMinSize, WindowMinSize,
/// <summary> /// <summary>
/// float /// float
/// </summary> /// </summary>
ChildWindowRounding, ChildRounding,
/// <summary>
/// float
/// </summary>
ChildBorderSize,
/// <summary>
/// float
/// </summary>
PopupRounding,
/// <summary>
/// float
/// </summary>
PopupBorderSize,
/// <summary> /// <summary>
/// System.Numerics.Vector2 /// System.Numerics.Vector2
/// </summary> /// </summary>
@ -35,6 +51,10 @@
/// </summary> /// </summary>
FrameRounding, FrameRounding,
/// <summary> /// <summary>
/// float
/// </summary>
FrameBorderSize,
/// <summary>
/// System.Numerics.Vector2 /// System.Numerics.Vector2
/// </summary> /// </summary>
ItemSpacing, ItemSpacing,
@ -49,6 +69,10 @@
/// <summary> /// <summary>
/// float /// float
/// </summary> /// </summary>
GrabMinSize GrabMinSize,
/// <summary>
/// System.Numerics.Vector2
/// </summary>
ButtonTextAlign,
}; };
} }

@ -16,7 +16,7 @@ namespace ImGuiNET
/// <summary> /// <summary>
/// Hit testing to allow subsequent widgets to overlap this one /// Hit testing to allow subsequent widgets to overlap this one
/// </summary> /// </summary>
AllowOverlapMode = 1 << 2, AllowItemOverlap = 1 << 2,
/// <summary> /// <summary>
/// Don't do a TreePush() when open (e.g. for CollapsingHeader) = no extra indent nor pushing on ID stack /// Don't do a TreePush() when open (e.g. for CollapsingHeader) = no extra indent nor pushing on ID stack
/// </summary> /// </summary>

@ -35,10 +35,6 @@
/// </summary> /// </summary>
AlwaysAutoResize = 1 << 6, AlwaysAutoResize = 1 << 6,
/// <summary> /// <summary>
/// Show borders around windows and items
/// </summary>
ShowBorders = 1 << 7,
/// <summary>
/// Never load/save settings in .ini file /// Never load/save settings in .ini file
/// </summary> /// </summary>
NoSavedSettings = 1 << 8, NoSavedSettings = 1 << 8,
@ -63,5 +59,22 @@
/// Disable bringing window to front when taking focus (e.g. clicking on it or programatically giving it focus) /// Disable bringing window to front when taking focus (e.g. clicking on it or programatically giving it focus)
/// </summary> /// </summary>
NoBringToFrontOnFocus = 1 << 13, NoBringToFrontOnFocus = 1 << 13,
/// <summary>
/// Always show vertical scrollbar (even if ContentSize.y < Size.y)
/// </summary>
AlwaysVerticalScrollbar = 1 << 14,
/// <summary>
/// Always show horizontal scrollbar (even if ContentSize.x < Size.x)
/// </summary>
AlwaysHorizontalScrollbar = 1 << 15,
/// <summary>
/// Ensure child windows without border uses style.WindowPadding (ignored by default for non-bordered child windows, because more convenient)
/// </summary>
AlwaysUseWindowPadding = 1 << 16,
/// <summary>
/// Enable resize from any corners and borders. Your back-end needs to honor the different values of io.MouseCursor set by imgui.
/// </summary>
ResizeFromAnySide = 1 << 17,
} }
} }

Loading…
Cancel
Save