Skip to content
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

Adapting to ImGui's new IO event API (1.87) #38

Merged
merged 1 commit into from
Feb 5, 2022

Conversation

johannesugb
Copy link
Contributor

There is a new IO keyboard/mouse/gamepad event API (1.87) recap in ImGui: ocornut/imgui#4921
The transition guide describes, among others, that GetIO().KeyMap shall no longer be used. It is now deprecated functionality.

If deprecated functionality is removed from ImGui through

#define IMGUI_DISABLE_OBSOLETE_KEYIO

code that uses ``GetIO().KeyMap` not even compiles anymore, which affects imgui-filebrowser.

This PR proposes to use IsKeyPressed(ImGuiKey_Escape) instead of GetIO().KeyMap[ImGuiKey_Escape] and IsKeyPressed(escapeKey).

@AirGuanZ
Copy link
Owner

AirGuanZ commented Feb 5, 2022

Hi,
Thanks a lot for your education and this pr!

@AirGuanZ AirGuanZ merged commit 557baf0 into AirGuanZ:master Feb 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants