ImguiIntegration: support for imgui IO event API - #93
Closed
pezcode wants to merge 5 commits into
Closed
Conversation
Beginning with imgui 1.87 ImGuiKey_* values start at 512, which means we can't use them directly to index io.KeysDown (which has size 512, not coincidentally). This is a quick fix to make the legacy code work. Long-term we need to add support for the new key system introduced in 1.87 which lets us queue a full range of backend-agnostic ImGuiKey with AddKeyEvent().
Codecov Report
@@ Coverage Diff @@
## master #93 +/- ##
==========================================
- Coverage 77.25% 77.06% -0.20%
==========================================
Files 21 21
Lines 941 933 -8
==========================================
- Hits 727 719 -8
Misses 214 214
Continue to review full report at Codecov.
|
pezcode
force-pushed
the
imgui-new-input-api
branch
from
January 29, 2022 00:28
08467b2 to
a2b02c7
Compare
mosra
reviewed
Feb 3, 2022
mosra
left a comment
Owner
There was a problem hiding this comment.
Thanks! I'll need a bit more time to wrap my head around all the changes, so this is just a partial review.
This was
linked to
issues
Feb 3, 2022
pezcode
marked this pull request as ready for review
February 7, 2022 20:18
Owner
|
Merged as c60149c (I squashed all changes together since it didn't seem to make sense to preserve the later-removed temporary hack), thanks a lot! |
This was referenced Feb 9, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds support for the new IO handling about to land in imgui 1.87. The main advantages:
Applicationclasses'KeyEvent::Key, meaning you can do key handling with imgui, independent of theApplicationclassA few notes:
Applicationclasses support the entire range ofImGuiKeyTodo: