Skip to content

Commit

Permalink
Removed io.NavInputs[] and ImGuiNavInput enum. Kept inline redirectio…
Browse files Browse the repository at this point in the history
…n code. (#4921, #4858, #787, #1599, #323)
  • Loading branch information
ocornut committed Jul 8, 2022
1 parent a7a25ee commit 8b8a61b
Show file tree
Hide file tree
Showing 6 changed files with 251 additions and 243 deletions.
15 changes: 15 additions & 0 deletions docs/CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,21 @@ HOW TO UPDATE?

Breaking changes:

- 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[].
That data 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).

Other Changes:

- InputText: added experimental io.ConfigInputTextEnterKeepActive feature to make pressing
Expand Down
Loading

0 comments on commit 8b8a61b

Please sign in to comment.