|
@@ -11,7 +11,7 @@
|
|
// - Getting Started https://dearimgui.com/getting-started
|
|
// - Getting Started https://dearimgui.com/getting-started
|
|
// - Homepage https://github.com/ocornut/imgui
|
|
// - Homepage https://github.com/ocornut/imgui
|
|
// - Releases & changelog https://github.com/ocornut/imgui/releases
|
|
// - Releases & changelog https://github.com/ocornut/imgui/releases
|
|
-// - Gallery https://github.com/ocornut/imgui/issues/6478 (please post your screenshots/video there!)
|
|
|
|
|
|
+// - Gallery https://github.com/ocornut/imgui/issues/6897 (please post your screenshots/video there!)
|
|
// - Wiki https://github.com/ocornut/imgui/wiki (lots of good stuff there)
|
|
// - Wiki https://github.com/ocornut/imgui/wiki (lots of good stuff there)
|
|
// - Glossary https://github.com/ocornut/imgui/wiki/Glossary
|
|
// - Glossary https://github.com/ocornut/imgui/wiki/Glossary
|
|
// - Issues & support https://github.com/ocornut/imgui/issues
|
|
// - Issues & support https://github.com/ocornut/imgui/issues
|
|
@@ -24,7 +24,7 @@
|
|
// Library Version
|
|
// Library Version
|
|
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals, e.g. '#if IMGUI_VERSION_NUM >= 12345')
|
|
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals, e.g. '#if IMGUI_VERSION_NUM >= 12345')
|
|
#define IMGUI_VERSION "1.90 WIP"
|
|
#define IMGUI_VERSION "1.90 WIP"
|
|
-#define IMGUI_VERSION_NUM 18993
|
|
|
|
|
|
+#define IMGUI_VERSION_NUM 18994
|
|
#define IMGUI_HAS_TABLE
|
|
#define IMGUI_HAS_TABLE
|
|
#define IMGUI_HAS_VIEWPORT // Viewport WIP branch
|
|
#define IMGUI_HAS_VIEWPORT // Viewport WIP branch
|
|
#define IMGUI_HAS_DOCK // Docking WIP branch
|
|
#define IMGUI_HAS_DOCK // Docking WIP branch
|
|
@@ -361,8 +361,8 @@ namespace ImGui
|
|
IMGUI_API bool IsWindowHovered(ImGuiHoveredFlags flags=0); // is current window hovered (and typically: not blocked by a popup/modal)? see flags for options. NB: If you are trying to check whether your mouse should be dispatched to imgui or to your app, you should use the 'io.WantCaptureMouse' boolean for that! Please read the FAQ!
|
|
IMGUI_API bool IsWindowHovered(ImGuiHoveredFlags flags=0); // is current window hovered (and typically: not blocked by a popup/modal)? see flags for options. NB: If you are trying to check whether your mouse should be dispatched to imgui or to your app, you should use the 'io.WantCaptureMouse' boolean for that! Please read the FAQ!
|
|
IMGUI_API ImDrawList* GetWindowDrawList(); // get draw list associated to the current window, to append your own drawing primitives
|
|
IMGUI_API ImDrawList* GetWindowDrawList(); // get draw list associated to the current window, to append your own drawing primitives
|
|
IMGUI_API float GetWindowDpiScale(); // get DPI scale currently associated to the current window's viewport.
|
|
IMGUI_API float GetWindowDpiScale(); // get DPI scale currently associated to the current window's viewport.
|
|
- IMGUI_API ImVec2 GetWindowPos(); // get current window position in screen space (note: it is unlikely you need to use this. Consider using current layout pos instead, GetScreenCursorPos())
|
|
|
|
- IMGUI_API ImVec2 GetWindowSize(); // get current window size (note: it is unlikely you need to use this. Consider using GetScreenCursorPos() and e.g. GetContentRegionAvail() instead)
|
|
|
|
|
|
+ IMGUI_API ImVec2 GetWindowPos(); // get current window position in screen space (note: it is unlikely you need to use this. Consider using current layout pos instead, GetCursorScreenPos())
|
|
|
|
+ IMGUI_API ImVec2 GetWindowSize(); // get current window size (note: it is unlikely you need to use this. Consider using GetCursorScreenPos() and e.g. GetContentRegionAvail() instead)
|
|
IMGUI_API float GetWindowWidth(); // get current window width (shortcut for GetWindowSize().x)
|
|
IMGUI_API float GetWindowWidth(); // get current window width (shortcut for GetWindowSize().x)
|
|
IMGUI_API float GetWindowHeight(); // get current window height (shortcut for GetWindowSize().y)
|
|
IMGUI_API float GetWindowHeight(); // get current window height (shortcut for GetWindowSize().y)
|
|
IMGUI_API ImGuiViewport*GetWindowViewport(); // get viewport currently associated to the current window.
|
|
IMGUI_API ImGuiViewport*GetWindowViewport(); // get viewport currently associated to the current window.
|
|
@@ -442,13 +442,25 @@ namespace ImGui
|
|
IMGUI_API ImU32 GetColorU32(ImU32 col); // retrieve given color with style alpha applied, packed as a 32-bit value suitable for ImDrawList
|
|
IMGUI_API ImU32 GetColorU32(ImU32 col); // retrieve given color with style alpha applied, packed as a 32-bit value suitable for ImDrawList
|
|
IMGUI_API const ImVec4& GetStyleColorVec4(ImGuiCol idx); // retrieve style color as stored in ImGuiStyle structure. use to feed back into PushStyleColor(), otherwise use GetColorU32() to get style color with style alpha baked in.
|
|
IMGUI_API const ImVec4& GetStyleColorVec4(ImGuiCol idx); // retrieve style color as stored in ImGuiStyle structure. use to feed back into PushStyleColor(), otherwise use GetColorU32() to get style color with style alpha baked in.
|
|
|
|
|
|
- // Cursor / Layout
|
|
|
|
|
|
+ // Layout cursor positioning
|
|
// - By "cursor" we mean the current output position.
|
|
// - By "cursor" we mean the current output position.
|
|
// - The typical widget behavior is to output themselves at the current cursor position, then move the cursor one line down.
|
|
// - The typical widget behavior is to output themselves at the current cursor position, then move the cursor one line down.
|
|
// - You can call SameLine() between widgets to undo the last carriage return and output at the right of the preceding widget.
|
|
// - You can call SameLine() between widgets to undo the last carriage return and output at the right of the preceding widget.
|
|
// - Attention! We currently have inconsistencies between window-local and absolute positions we will aim to fix with future API:
|
|
// - Attention! We currently have inconsistencies between window-local and absolute positions we will aim to fix with future API:
|
|
- // Window-local coordinates: SameLine(), GetCursorPos(), SetCursorPos(), GetCursorStartPos(), GetContentRegionMax(), GetWindowContentRegion*(), PushTextWrapPos()
|
|
|
|
- // Absolute coordinate: GetCursorScreenPos(), SetCursorScreenPos(), all ImDrawList:: functions.
|
|
|
|
|
|
+ // - Absolute coordinate: GetCursorScreenPos(), SetCursorScreenPos(), all ImDrawList:: functions. -> this is the preferred way forward.
|
|
|
|
+ // - Window-local coordinates: SameLine(), GetCursorPos(), SetCursorPos(), GetCursorStartPos(), GetContentRegionMax(), GetWindowContentRegion*(), PushTextWrapPos()
|
|
|
|
+ // - GetCursorScreenPos() = GetCursorPos() + GetWindowPos(). GetWindowPos() is almost only ever useful to convert from window-local to absolute coordinates.
|
|
|
|
+ IMGUI_API ImVec2 GetCursorScreenPos(); // cursor position in absolute coordinates (prefer using this, also more useful to work with ImDrawList API).
|
|
|
|
+ IMGUI_API void SetCursorScreenPos(const ImVec2& pos); // cursor position in absolute coordinates
|
|
|
|
+ IMGUI_API ImVec2 GetCursorPos(); // [window-local] cursor position in window coordinates (relative to window position)
|
|
|
|
+ IMGUI_API float GetCursorPosX(); // [window-local] "
|
|
|
|
+ IMGUI_API float GetCursorPosY(); // [window-local] "
|
|
|
|
+ IMGUI_API void SetCursorPos(const ImVec2& local_pos); // [window-local] "
|
|
|
|
+ IMGUI_API void SetCursorPosX(float local_x); // [window-local] "
|
|
|
|
+ IMGUI_API void SetCursorPosY(float local_y); // [window-local] "
|
|
|
|
+ IMGUI_API ImVec2 GetCursorStartPos(); // [window-local] initial cursor position, in window coordinates
|
|
|
|
+
|
|
|
|
+ // Other layout functions
|
|
IMGUI_API void Separator(); // separator, generally horizontal. inside a menu bar or in horizontal layout mode, this becomes a vertical separator.
|
|
IMGUI_API void Separator(); // separator, generally horizontal. inside a menu bar or in horizontal layout mode, this becomes a vertical separator.
|
|
IMGUI_API void SameLine(float offset_from_start_x=0.0f, float spacing=-1.0f); // call between widgets or groups to layout them horizontally. X position given in window coordinates.
|
|
IMGUI_API void SameLine(float offset_from_start_x=0.0f, float spacing=-1.0f); // call between widgets or groups to layout them horizontally. X position given in window coordinates.
|
|
IMGUI_API void NewLine(); // undo a SameLine() or force a new line when in a horizontal-layout context.
|
|
IMGUI_API void NewLine(); // undo a SameLine() or force a new line when in a horizontal-layout context.
|
|
@@ -458,15 +470,6 @@ namespace ImGui
|
|
IMGUI_API void Unindent(float indent_w = 0.0f); // move content position back to the left, by indent_w, or style.IndentSpacing if indent_w <= 0
|
|
IMGUI_API void Unindent(float indent_w = 0.0f); // move content position back to the left, by indent_w, or style.IndentSpacing if indent_w <= 0
|
|
IMGUI_API void BeginGroup(); // lock horizontal starting position
|
|
IMGUI_API void BeginGroup(); // lock horizontal starting position
|
|
IMGUI_API void EndGroup(); // unlock horizontal starting position + capture the whole group bounding box into one "item" (so you can use IsItemHovered() or layout primitives such as SameLine() on whole group, etc.)
|
|
IMGUI_API void EndGroup(); // unlock horizontal starting position + capture the whole group bounding box into one "item" (so you can use IsItemHovered() or layout primitives such as SameLine() on whole group, etc.)
|
|
- IMGUI_API ImVec2 GetCursorPos(); // cursor position in window coordinates (relative to window position)
|
|
|
|
- IMGUI_API float GetCursorPosX(); // (some functions are using window-relative coordinates, such as: GetCursorPos, GetCursorStartPos, GetContentRegionMax, GetWindowContentRegion* etc.
|
|
|
|
- IMGUI_API float GetCursorPosY(); // other functions such as GetCursorScreenPos or everything in ImDrawList::
|
|
|
|
- IMGUI_API void SetCursorPos(const ImVec2& local_pos); // are using the main, absolute coordinate system.
|
|
|
|
- IMGUI_API void SetCursorPosX(float local_x); // GetWindowPos() + GetCursorPos() == GetCursorScreenPos() etc.)
|
|
|
|
- IMGUI_API void SetCursorPosY(float local_y); //
|
|
|
|
- IMGUI_API ImVec2 GetCursorStartPos(); // initial cursor position in window coordinates
|
|
|
|
- IMGUI_API ImVec2 GetCursorScreenPos(); // cursor position in absolute coordinates (useful to work with ImDrawList API). generally top-left == GetMainViewport()->Pos == (0,0) in single viewport mode, and bottom-right == GetMainViewport()->Pos+Size == io.DisplaySize in single-viewport mode.
|
|
|
|
- IMGUI_API void SetCursorScreenPos(const ImVec2& pos); // cursor position in absolute coordinates
|
|
|
|
IMGUI_API void AlignTextToFramePadding(); // vertically align upcoming text baseline to FramePadding.y so that it will align properly to regularly framed items (call if you have text on a line before a framed item)
|
|
IMGUI_API void AlignTextToFramePadding(); // vertically align upcoming text baseline to FramePadding.y so that it will align properly to regularly framed items (call if you have text on a line before a framed item)
|
|
IMGUI_API float GetTextLineHeight(); // ~ FontSize
|
|
IMGUI_API float GetTextLineHeight(); // ~ FontSize
|
|
IMGUI_API float GetTextLineHeightWithSpacing(); // ~ FontSize + style.ItemSpacing.y (distance in pixels between 2 consecutive lines of text)
|
|
IMGUI_API float GetTextLineHeightWithSpacing(); // ~ FontSize + style.ItemSpacing.y (distance in pixels between 2 consecutive lines of text)
|
|
@@ -855,7 +858,7 @@ namespace ImGui
|
|
IMGUI_API bool BeginDragDropTarget(); // call after submitting an item that may receive a payload. If this returns true, you can call AcceptDragDropPayload() + EndDragDropTarget()
|
|
IMGUI_API bool BeginDragDropTarget(); // call after submitting an item that may receive a payload. If this returns true, you can call AcceptDragDropPayload() + EndDragDropTarget()
|
|
IMGUI_API const ImGuiPayload* AcceptDragDropPayload(const char* type, ImGuiDragDropFlags flags = 0); // accept contents of a given type. If ImGuiDragDropFlags_AcceptBeforeDelivery is set you can peek into the payload before the mouse button is released.
|
|
IMGUI_API const ImGuiPayload* AcceptDragDropPayload(const char* type, ImGuiDragDropFlags flags = 0); // accept contents of a given type. If ImGuiDragDropFlags_AcceptBeforeDelivery is set you can peek into the payload before the mouse button is released.
|
|
IMGUI_API void EndDragDropTarget(); // only call EndDragDropTarget() if BeginDragDropTarget() returns true!
|
|
IMGUI_API void EndDragDropTarget(); // only call EndDragDropTarget() if BeginDragDropTarget() returns true!
|
|
- IMGUI_API const ImGuiPayload* GetDragDropPayload(); // peek directly into the current payload from anywhere. may return NULL. use ImGuiPayload::IsDataType() to test for the payload type.
|
|
|
|
|
|
+ IMGUI_API const ImGuiPayload* GetDragDropPayload(); // peek directly into the current payload from anywhere. returns NULL when drag and drop is finished or inactive. use ImGuiPayload::IsDataType() to test for the payload type.
|
|
|
|
|
|
// Disabling [BETA API]
|
|
// Disabling [BETA API]
|
|
// - Disable all user interactions and dim items visuals (applying style.DisabledAlpha over current colors)
|
|
// - Disable all user interactions and dim items visuals (applying style.DisabledAlpha over current colors)
|
|
@@ -1096,7 +1099,8 @@ enum ImGuiTreeNodeFlags_
|
|
ImGuiTreeNodeFlags_FramePadding = 1 << 10, // Use FramePadding (even for an unframed text node) to vertically align text baseline to regular widget height. Equivalent to calling AlignTextToFramePadding().
|
|
ImGuiTreeNodeFlags_FramePadding = 1 << 10, // Use FramePadding (even for an unframed text node) to vertically align text baseline to regular widget height. Equivalent to calling AlignTextToFramePadding().
|
|
ImGuiTreeNodeFlags_SpanAvailWidth = 1 << 11, // Extend hit box to the right-most edge, even if not framed. This is not the default in order to allow adding other items on the same line. In the future we may refactor the hit system to be front-to-back, allowing natural overlaps and then this can become the default.
|
|
ImGuiTreeNodeFlags_SpanAvailWidth = 1 << 11, // Extend hit box to the right-most edge, even if not framed. This is not the default in order to allow adding other items on the same line. In the future we may refactor the hit system to be front-to-back, allowing natural overlaps and then this can become the default.
|
|
ImGuiTreeNodeFlags_SpanFullWidth = 1 << 12, // Extend hit box to the left-most and right-most edges (bypass the indented area).
|
|
ImGuiTreeNodeFlags_SpanFullWidth = 1 << 12, // Extend hit box to the left-most and right-most edges (bypass the indented area).
|
|
- ImGuiTreeNodeFlags_NavLeftJumpsBackHere = 1 << 13, // (WIP) Nav: left direction may move to this TreeNode() from any of its child (items submitted between TreeNode and TreePop)
|
|
|
|
|
|
+ ImGuiTreeNodeFlags_SpanAllColumns = 1 << 13, // Frame will span all columns of its container table (text will still fit in current column)
|
|
|
|
+ ImGuiTreeNodeFlags_NavLeftJumpsBackHere = 1 << 14, // (WIP) Nav: left direction may move to this TreeNode() from any of its child (items submitted between TreeNode and TreePop)
|
|
//ImGuiTreeNodeFlags_NoScrollOnOpen = 1 << 14, // FIXME: TODO: Disable automatic scroll on TreePop() if node got just open and contents is not visible
|
|
//ImGuiTreeNodeFlags_NoScrollOnOpen = 1 << 14, // FIXME: TODO: Disable automatic scroll on TreePop() if node got just open and contents is not visible
|
|
ImGuiTreeNodeFlags_CollapsingHeader = ImGuiTreeNodeFlags_Framed | ImGuiTreeNodeFlags_NoTreePushOnOpen | ImGuiTreeNodeFlags_NoAutoOpenOnLog,
|
|
ImGuiTreeNodeFlags_CollapsingHeader = ImGuiTreeNodeFlags_Framed | ImGuiTreeNodeFlags_NoTreePushOnOpen | ImGuiTreeNodeFlags_NoAutoOpenOnLog,
|
|
|
|
|
|
@@ -1133,7 +1137,7 @@ enum ImGuiSelectableFlags_
|
|
{
|
|
{
|
|
ImGuiSelectableFlags_None = 0,
|
|
ImGuiSelectableFlags_None = 0,
|
|
ImGuiSelectableFlags_DontClosePopups = 1 << 0, // Clicking this doesn't close parent popup window
|
|
ImGuiSelectableFlags_DontClosePopups = 1 << 0, // Clicking this doesn't close parent popup window
|
|
- ImGuiSelectableFlags_SpanAllColumns = 1 << 1, // Selectable frame can span all columns (text will still fit in current column)
|
|
|
|
|
|
+ ImGuiSelectableFlags_SpanAllColumns = 1 << 1, // Frame will span all columns of its container table (text will still fit in current column)
|
|
ImGuiSelectableFlags_AllowDoubleClick = 1 << 2, // Generate press events on double clicks too
|
|
ImGuiSelectableFlags_AllowDoubleClick = 1 << 2, // Generate press events on double clicks too
|
|
ImGuiSelectableFlags_Disabled = 1 << 3, // Cannot be selected, display grayed out text
|
|
ImGuiSelectableFlags_Disabled = 1 << 3, // Cannot be selected, display grayed out text
|
|
ImGuiSelectableFlags_AllowOverlap = 1 << 4, // (WIP) Hit testing to allow subsequent widgets to overlap this one
|
|
ImGuiSelectableFlags_AllowOverlap = 1 << 4, // (WIP) Hit testing to allow subsequent widgets to overlap this one
|