Docs: retroactively update 1.89 changelog/docs to clarify that strong typing ImGuiKey was technically a breaking change for users of legacy indices. (#4921)

Amend 4b522e145
This commit is contained in:
ocornut
2022-11-29 21:36:59 +01:00
parent cc3a2200a9
commit bf4c2e00c0
2 changed files with 10 additions and 1 deletions

View File

@ -395,6 +395,11 @@ CODE
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.
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.
- 2022/09/20 (1.89) - ImGuiKey is now a typed enum, allowing ImGuiKey_XXX symbols to be named in debuggers.
this will require uses of legacy backend-dependent indices to be casted, e.g.
- with imgui_impl_glfw: IsKeyPressed(GLFW_KEY_A) -> IsKeyPressed((ImGuiKey)GLFW_KEY_A);
- with imgui_impl_win32: IsKeyPressed('A') -> IsKeyPressed((ImGuiKey)'A')
- etc. However if you are upgrading code you might well use the better, backend-agnostic IsKeyPressed(ImGuiKey_A) now!
- 2022/09/12 (1.89) - removed the bizarre legacy default argument for 'TreePush(const void* ptr = NULL)', always pass a pointer value explicitly. NULL/nullptr is ok but require cast, e.g. TreePush((void*)nullptr);
- 2022/09/05 (1.89) - commented out redirecting functions/enums names that were marked obsolete in 1.77 and 1.78 (June 2020):
- DragScalar(), DragScalarN(), DragFloat(), DragFloat2(), DragFloat3(), DragFloat4(): For old signatures ending with (..., const char* format, float power = 1.0f) -> use (..., format ImGuiSliderFlags_Logarithmic) if power != 1.0f.