-
Notifications
You must be signed in to change notification settings - Fork 37
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
New ImGui IO event API #23
base: master
Are you sure you want to change the base?
Conversation
Is this properly tested? I gave it a try but keyboard & gamepad navigations both not working anymore after applying the diff. |
@@ -92,6 +92,7 @@ FImGuiContextProxy::FImGuiContextProxy(const FString& InName, int32 InContextInd | |||
|
|||
// Start initialization. | |||
ImGuiIO& IO = ImGui::GetIO(); | |||
InputState.IO = IO; |
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.
This is wrong, you're copying the global IO struct. Instead, I recommend storing IO in InputState as a pointer. Otherwise, this causes IO to not work at all.
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.
That doesn't seem to be correct. ImGui::GetIO()
returns a reference, we are just storing that reference. IO works.
This will be required to update imgui above v1.91.4. Help would be appreciated. |
This is functional for mouse and keyboard on a demo UI. Gamepad still to be tested. Mouse capture debug commit above also happens on current |
This pull request reworks the Unreal backend for ImGui to use the new IO event API introduced in ImGui 1.87.
Most of the intermediate storage has been removed in this project as core ImGui now handles it correctly even at low framerates. Certain missing keybinds have been added (such as Super/Command).
It is advisable for users of this project to thoroughly review and test this before it is merged.