mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-06 13:08:47 +02:00
Merge branch 'master' into docking
# Conflicts: # backends/imgui_impl_glfw.cpp # backends/imgui_impl_glfw.h # backends/imgui_impl_osx.h # backends/imgui_impl_osx.mm # backends/imgui_impl_sdl.cpp # backends/imgui_impl_sdl.h # backends/imgui_impl_win32.cpp # backends/imgui_impl_win32.h # imgui.cpp
This commit is contained in:
@ -104,6 +104,35 @@ Other changes:
|
||||
|
||||
Breaking Changes:
|
||||
|
||||
- Reworked IO keyboard input system. (#2625, #3724) [@thedmd, @ocornut]
|
||||
- Added io.AddKeyEvent() function, obsoleting writing directly to io.KeyMap[], io.KeysDown[] arrays.
|
||||
- Added io.AddKeyModEvent() function, obsoleting writing directly to io.KeyCtrl, io.KeyShift etc.
|
||||
- Added io.SetKeyEventNativeData() function (optional) to pass native and old legacy indices.
|
||||
- Added full range of key enums in ImGuiKey (e.g. ImGuiKey_F1).
|
||||
- Added GetKeyName() helper function.
|
||||
- Obsoleted GetKeyIndex(): it is now unnecessary and will now return the same value.
|
||||
- All keyboard related functions taking 'int user_key_index' now take 'ImGuiKey key':
|
||||
- IsKeyDown(), IsKeyPressed(), IsKeyReleased(), GetKeyPressedAmount().
|
||||
- All backends were updated to use io.AddKeyEvent().
|
||||
- Backward compatibility:
|
||||
- Old backends populating those arrays will still work! (for a while)
|
||||
- Calling e.g. IsKeyPressed(MY_NATIVE_KEY_XXX) will still work! (for a while)
|
||||
- Those legacy arrays will only be disabled if '#define IMGUI_DISABLE_OBSOLETE_KEYIO' is set in your imconfig.
|
||||
In a few versions, IMGUI_DISABLE_OBSOLETE_FUNCTIONS will automatically enable IMGUI_DISABLE_OBSOLETE_KEYIO,
|
||||
so this will be moved into the regular obsolescence path.
|
||||
- Transition guide:
|
||||
- IsKeyPressed(MY_NATIVE_KEY_XXX) -> use IsKeyPressed(ImGuiKey_XXX)
|
||||
- IsKeyPressed(GetKeyIndex(ImGuiKey_XXX)) -> use IsKeyPressed(ImGuiKey_XXX)
|
||||
- Backend writing to io.KeyMap[],KeysDown[] -> backend should call io.AddKeyEvent(), if legacy indexing is desired, call io.SetKeyEventNativeData()
|
||||
- Basically the trick we took advantage of is that we previously only supported native keycode from 0 to 511,
|
||||
so ImGuiKey values can still express a legacy native keycode, and new named keys are all >= 512.
|
||||
- This will enable a few things in the future:
|
||||
- Access to portable keys allows for backed-agnostic keyboard input code. Until now it was difficult to
|
||||
share code using keyboard accross project because of this gap. (#2625, #3724)
|
||||
- Access to full key ranges will allow us to develop a proper keyboard shortcut system. (#456)
|
||||
- io.AddKeyEvent() will later be turned into a trickling IO queue (for all inputs) to handle very low framerate better. (#2525, #2787, #3383)
|
||||
- io.SetKeyEventNativeData() include native keycode/scancode which will later be exposed. (#3141, #2959)
|
||||
- Renamed ImGuiKey_KeyPadEnter to ImGuiKey_KeypadEnter to align with new symbols. Kept redirection enum. (#2625)
|
||||
- Commented out redirecting functions/enums names that were marked obsolete in 1.69, 1.70, 1.71, 1.72 (March-July 2019)
|
||||
- ImGui::SetNextTreeNodeOpen() -> use ImGui::SetNextItemOpen()
|
||||
- ImGui::GetContentRegionAvailWidth() -> use ImGui::GetContentRegionAvail().x
|
||||
@ -130,6 +159,11 @@ Other Changes:
|
||||
- Platform IME: add ImGuiPlatformImeData::WantVisible, hide IME composition window when not used. (#2589) [@actboy168]
|
||||
- Platform IME: add ImGuiPlatformImeData::InputLineHeight. (#3113) [@liuliu]
|
||||
- Platform IME: [windows] call ImmSetCandidateWindow() to position candidate window.
|
||||
- Backends: GLFW: Pass localized keys (matching keyboard layout). Fix e.g. CTRL+A, CTRL+Z, CTRL+Y shortcuts.
|
||||
We are now converting GLFW untranslated keycodes back to translated keycodes in order to match the behavior of every
|
||||
other backend, and facilitate the use of GLFW with lettered-shortcuts API. (#456, #2625)
|
||||
- Backends: SDL: Pass localized keys (matching keyboard layout). Fix e.g. CTRL+A, CTRL+Z, CTRL+Y shortcuts.
|
||||
- Backends: Allegro5, GLFW, GLUT, SDL, OSX, Win32, Android: Updated to use io.AddKeyEvent() with full key range. (#2625) [@thedmd]
|
||||
- Backends: OpenGL3: Fixed a buffer overflow in imgui_impl_opengl3_loader.h init (added in 1.86). (#4468, #4830) [@dymk]
|
||||
It would generally not have noticeable side-effect at runtime but would be detected by runtime checkers.
|
||||
- Backends: Metal: Added Apple Metal C++ API support. (#4824, #4746) [@luigifcruz]
|
||||
|
Reference in New Issue
Block a user