Skip to content

Commit 8b8a61b

Browse files
committed
Removed io.NavInputs[] and ImGuiNavInput enum. Kept inline redirection code. (ocornut#4921, ocornut#4858, ocornut#787, ocornut#1599, ocornut#323)
1 parent a7a25ee commit 8b8a61b

File tree

6 files changed

+251
-243
lines changed

6 files changed

+251
-243
lines changed

docs/CHANGELOG.txt

+15
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,21 @@ HOW TO UPDATE?
3737

3838
Breaking changes:
3939

40+
- Removed io.NavInputs[] and ImGuiNavInput enum that were used to feed gamepad inputs.
41+
Basically 1.87 already obsoleted them from the backend's point of view, but internally
42+
our navigation code still used this array and enum, so they were still present.
43+
Not anymore! (#4921, #4858, #787, #1599, #323)
44+
Transition guide:
45+
- Official backends from 1.87+ -> no issue.
46+
- Official backends from 1.60 to 1.86 -> will build and convert gamepad inputs, unless IMGUI_DISABLE_OBSOLETE_KEYIO is defined. Need updating!
47+
- Custom backends not writing to io.NavInputs[] -> no issue.
48+
- Custom backends writing to io.NavInputs[] -> will build and convert gamepad inputs, unless IMGUI_DISABLE_OBSOLETE_KEYIO is defined. Need fixing!
49+
- TL;DR: Backends should call io.AddKeyEvent()/io.AddKeyAnalogEvent() with ImGuiKey_GamepadXXX values instead of filling io.NavInput[].
50+
That data was essentially 1.60's attempt to combine keyboard and gamepad inputs with named
51+
semantic, but the additional indirection and copy added complexity and got in the way of other
52+
incoming work. User's code (other than backends) should not be affected, unless you have custom
53+
widgets intercepting navigation events via the named enums (in which case you can upgrade your code).
54+
4055
Other Changes:
4156

4257
- InputText: added experimental io.ConfigInputTextEnterKeepActive feature to make pressing

0 commit comments

Comments
 (0)