Version 1.89.1 WIP

This commit is contained in:
ocornut 2022-11-16 17:55:27 +01:00
parent 7bee9a8f96
commit 5bb2874940
7 changed files with 65 additions and 65 deletions

View File

@ -32,7 +32,7 @@ HOW TO UPDATE?
-----------------------------------------------------------------------
VERSION 1.89.1 (In Progress)
VERSION 1.89.1 WIP (In Progress)
-----------------------------------------------------------------------
- Inputs: fixed moving a window or drag and dropping from preventing input-owner-unaware code
@ -48,63 +48,63 @@ Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v
Breaking changes:
- Layout: Obsoleted using SetCursorPos()/SetCursorScreenPos() to extend parent window/cell boundaries. (#5548)
This relates to when moving the cursor position beyond current boundaries WITHOUT submitting an item.
- Previously this would make the window content size ~200x200:
Begin(...) + SetCursorScreenPos(GetCursorScreenPos() + ImVec2(200,200)) + End();
- Instead, please submit an item:
Begin(...) + SetCursorScreenPos(GetCursorScreenPos() + ImVec2(200,200)) + Dummy(ImVec2(0,0)) + End();
- Alternative:
Begin(...) + Dummy(ImVec2(200,200)) + End();
Content size is now only extended when submitting an item.
With '#define IMGUI_DISABLE_OBSOLETE_FUNCTIONS' this will now be detected and assert.
Without '#define IMGUI_DISABLE_OBSOLETE_FUNCTIONS' this will silently be fixed until we obsolete it.
(This incorrect pattern has been mentioned or suggested in: #4510, #3355, #1760, #1490, #4152, #150,
threads have been amended to refer to this issue).
- Renamed and merged keyboard modifiers key enums and flags into a same set: (#4921, #456)
- ImGuiKey_ModCtrl and ImGuiModFlags_Ctrl -> ImGuiMod_Ctrl
- ImGuiKey_ModShift and ImGuiModFlags_Shift -> ImGuiMod_Shift
- ImGuiKey_ModAlt and ImGuiModFlags_Alt -> ImGuiMod_Alt
- ImGuiKey_ModSuper and ImGuiModFlags_Super -> ImGuiMod_Super
Kept inline redirection enums (will obsolete).
This change simplifies a few things, reduces confusion, and will facilitate upcoming
shortcut/input ownership apis.
- The ImGuiKey_ModXXX were introduced in 1.87 and mostly used by backends.
- The ImGuiModFlags_XXX have been exposed in imgui.h but not really used by any public api,
only by third-party extensions. They were however subject to a recent rename
(ImGuiKeyModFlags_XXX -> ImGuiModFlags_XXX) and we are exceptionally commenting out
the older ImGuiKeyModFlags_XXX names ahead of obsolescence schedule to reduce confusion
and because they were not meant to be used anyway.
- Removed io.NavInputs[] and ImGuiNavInput enum that were used to feed gamepad inputs.
Basically 1.87 already obsoleted them from the backend's point of view, but internally
our navigation code still used this array and enum, so they were still present.
Not anymore! (#4921, #4858, #787, #1599, #323)
Transition guide:
- Official backends from 1.87+ -> no issue.
- Official backends from 1.60 to 1.86 -> will build and convert gamepad inputs, unless IMGUI_DISABLE_OBSOLETE_KEYIO is defined. Need updating!
- Custom backends not writing to io.NavInputs[] -> no issue.
- Custom backends writing to io.NavInputs[] -> will build and convert gamepad inputs, unless IMGUI_DISABLE_OBSOLETE_KEYIO is defined. Need fixing!
- TL;DR: Backends should call io.AddKeyEvent()/io.AddKeyAnalogEvent() with ImGuiKey_GamepadXXX values instead of filling io.NavInput[].
The ImGuiNavInput enum was essentially 1.60's attempt to combine keyboard and gamepad inputs with named
semantic, but the additional indirection and copy added complexity and got in the way of other
incoming work. User's code (other than backends) should not be affected, unless you have custom
widgets intercepting navigation events via the named enums (in which case you can upgrade your code).
- DragInt()/SliderInt(): Removed runtime patching of invalid "%f"/"%.0f" types of format strings.
This was obsoleted in 1.61 (May 2018). See 1.61 changelog for details.
- Changed signature of ImageButton() function: (#5533, #4471, #2464, #1390)
- Added 'const char* str_id' parameter + removed 'int frame_padding = -1' parameter.
- Old signature: bool ImageButton(ImTextureID tex_id, ImVec2 size, ImVec2 uv0 = ImVec2(0,0), ImVec2 uv1 = ImVec2(1,1), int frame_padding = -1, ImVec4 bg_col = ImVec4(0,0,0,0), ImVec4 tint_col = ImVec4(1,1,1,1));
- used the ImTextureID value to create an ID. This was inconsistent with other functions, led to ID conflicts, and caused problems with engines using transient ImTextureID values.
- had a FramePadding override which was inconsistent with other functions and made the already-long signature even longer.
- New signature: bool ImageButton(const char* str_id, ImTextureID tex_id, ImVec2 size, ImVec2 uv0 = ImVec2(0,0), ImVec2 uv1 = ImVec2(1,1), ImVec4 bg_col = ImVec4(0,0,0,0), ImVec4 tint_col = ImVec4(1,1,1,1));
- requires an explicit identifier. You may still use e.g. PushID() calls and then pass an empty identifier.
- always uses style.FramePadding for padding, to be consistent with other buttons. You may use PushStyleVar() to alter this.
- As always we are keeping a redirection function available (will obsolete later).
- Removed the bizarre legacy default argument for 'TreePush(const void* ptr = NULL)'. (#1057)
Must always pass a pointer value explicitly, NULL/nullptr is ok but require cast, e.g. TreePush((void*)nullptr);
If you used TreePush() replace with TreePush((void*)NULL);
- Removed support for 1.42-era IMGUI_DISABLE_INCLUDE_IMCONFIG_H / IMGUI_INCLUDE_IMCONFIG_H. (#255)
They only made sense before we could use IMGUI_USER_CONFIG.
- Layout: Obsoleted using SetCursorPos()/SetCursorScreenPos() to extend parent window/cell boundaries. (#5548)
This relates to when moving the cursor position beyond current boundaries WITHOUT submitting an item.
- Previously this would make the window content size ~200x200:
Begin(...) + SetCursorScreenPos(GetCursorScreenPos() + ImVec2(200,200)) + End();
- Instead, please submit an item:
Begin(...) + SetCursorScreenPos(GetCursorScreenPos() + ImVec2(200,200)) + Dummy(ImVec2(0,0)) + End();
- Alternative:
Begin(...) + Dummy(ImVec2(200,200)) + End();
Content size is now only extended when submitting an item.
With '#define IMGUI_DISABLE_OBSOLETE_FUNCTIONS' this will now be detected and assert.
Without '#define IMGUI_DISABLE_OBSOLETE_FUNCTIONS' this will silently be fixed until we obsolete it.
(This incorrect pattern has been mentioned or suggested in: #4510, #3355, #1760, #1490, #4152, #150,
threads have been amended to refer to this issue).
- Renamed and merged keyboard modifiers key enums and flags into a same set: (#4921, #456)
- ImGuiKey_ModCtrl and ImGuiModFlags_Ctrl -> ImGuiMod_Ctrl
- ImGuiKey_ModShift and ImGuiModFlags_Shift -> ImGuiMod_Shift
- ImGuiKey_ModAlt and ImGuiModFlags_Alt -> ImGuiMod_Alt
- ImGuiKey_ModSuper and ImGuiModFlags_Super -> ImGuiMod_Super
Kept inline redirection enums (will obsolete).
This change simplifies a few things, reduces confusion, and will facilitate upcoming
shortcut/input ownership apis.
- The ImGuiKey_ModXXX were introduced in 1.87 and mostly used by backends.
- The ImGuiModFlags_XXX have been exposed in imgui.h but not really used by any public api,
only by third-party extensions. They were however subject to a recent rename
(ImGuiKeyModFlags_XXX -> ImGuiModFlags_XXX) and we are exceptionally commenting out
the older ImGuiKeyModFlags_XXX names ahead of obsolescence schedule to reduce confusion
and because they were not meant to be used anyway.
- Removed io.NavInputs[] and ImGuiNavInput enum that were used to feed gamepad inputs.
Basically 1.87 already obsoleted them from the backend's point of view, but internally
our navigation code still used this array and enum, so they were still present.
Not anymore! (#4921, #4858, #787, #1599, #323)
Transition guide:
- Official backends from 1.87+ -> no issue.
- Official backends from 1.60 to 1.86 -> will build and convert gamepad inputs, unless IMGUI_DISABLE_OBSOLETE_KEYIO is defined. Need updating!
- Custom backends not writing to io.NavInputs[] -> no issue.
- Custom backends writing to io.NavInputs[] -> will build and convert gamepad inputs, unless IMGUI_DISABLE_OBSOLETE_KEYIO is defined. Need fixing!
- TL;DR: Backends should call io.AddKeyEvent()/io.AddKeyAnalogEvent() with ImGuiKey_GamepadXXX values instead of filling io.NavInput[].
The ImGuiNavInput enum was essentially 1.60's attempt to combine keyboard and gamepad inputs with named
semantic, but the additional indirection and copy added complexity and got in the way of other
incoming work. User's code (other than backends) should not be affected, unless you have custom
widgets intercepting navigation events via the named enums (in which case you can upgrade your code).
- DragInt()/SliderInt(): Removed runtime patching of invalid "%f"/"%.0f" types of format strings.
This was obsoleted in 1.61 (May 2018). See 1.61 changelog for details.
- Changed signature of ImageButton() function: (#5533, #4471, #2464, #1390)
- Added 'const char* str_id' parameter + removed 'int frame_padding = -1' parameter.
- Old signature: bool ImageButton(ImTextureID tex_id, ImVec2 size, ImVec2 uv0 = ImVec2(0,0), ImVec2 uv1 = ImVec2(1,1), int frame_padding = -1, ImVec4 bg_col = ImVec4(0,0,0,0), ImVec4 tint_col = ImVec4(1,1,1,1));
- used the ImTextureID value to create an ID. This was inconsistent with other functions, led to ID conflicts, and caused problems with engines using transient ImTextureID values.
- had a FramePadding override which was inconsistent with other functions and made the already-long signature even longer.
- New signature: bool ImageButton(const char* str_id, ImTextureID tex_id, ImVec2 size, ImVec2 uv0 = ImVec2(0,0), ImVec2 uv1 = ImVec2(1,1), ImVec4 bg_col = ImVec4(0,0,0,0), ImVec4 tint_col = ImVec4(1,1,1,1));
- requires an explicit identifier. You may still use e.g. PushID() calls and then pass an empty identifier.
- always uses style.FramePadding for padding, to be consistent with other buttons. You may use PushStyleVar() to alter this.
- As always we are keeping a redirection function available (will obsolete later).
- Removed the bizarre legacy default argument for 'TreePush(const void* ptr = NULL)'. (#1057)
Must always pass a pointer value explicitly, NULL/nullptr is ok but require cast, e.g. TreePush((void*)nullptr);
If you used TreePush() replace with TreePush((void*)NULL);
- Removed support for 1.42-era IMGUI_DISABLE_INCLUDE_IMCONFIG_H / IMGUI_INCLUDE_IMCONFIG_H. (#255)
They only made sense before we could use IMGUI_USER_CONFIG.
Other Changes:

View File

@ -1,4 +1,4 @@
// dear imgui, v1.89
// dear imgui, v1.89.1 WIP
// (headers)
// Help:
@ -22,7 +22,7 @@
// Library Version
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals, e.g. '#if IMGUI_VERSION_NUM > 12345')
#define IMGUI_VERSION "1.89.1"
#define IMGUI_VERSION "1.89.1 WIP"
#define IMGUI_VERSION_NUM 18902
#define IMGUI_HAS_TABLE

View File

@ -1,4 +1,4 @@
// dear imgui, v1.89
// dear imgui, v1.89.1 WIP
// (demo code)
// Help:

View File

@ -1,4 +1,4 @@
// dear imgui, v1.89
// dear imgui, v1.89.1 WIP
// (drawing and font code)
/*

View File

@ -1,4 +1,4 @@
// dear imgui, v1.89
// dear imgui, v1.89.1 WIP
// (internal structures/api)
// You may use this file to debug, understand or extend ImGui features but we don't provide any guarantee of forward compatibility!

View File

@ -1,4 +1,4 @@
// dear imgui, v1.89
// dear imgui, v1.89.1 WIP
// (tables and columns code)
/*

View File

@ -1,4 +1,4 @@
// dear imgui, v1.89
// dear imgui, v1.89.1 WIP
// (widgets code)
/*