-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ImguiIntegration: support for imgui IO event API #93
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.
|
08467b2
to
a2b02c7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I'll need a bit more time to wrap my head around all the changes, so this is just a partial review.
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 adds support for the new IO handling about to land in imgui 1.87. The main advantages:
Application
classes'KeyEvent::Key
, meaning you can do key handling with imgui, independent of theApplication
classA few notes:
Application
classes support the entire range ofImGuiKey
Todo: