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

Possible optimization on UpdateInguiInput Method #22

Open
valentimarco opened this issue May 17, 2022 · 1 comment
Open

Possible optimization on UpdateInguiInput Method #22

valentimarco opened this issue May 17, 2022 · 1 comment

Comments

@valentimarco
Copy link

Hi, i am using your library for a SteamVR overlay and had trouble syncing the left mouse click from VR to the ImGui controller.
After a very long troubleshooting i finded some methods from ImGuiIOPtr class that are Events:
AddMouseButtonEvent,AddMousePosEvent, etc.
So i think that instead of doing what you are doing, you can use this events and reduce the code! (I don't know if you are doing this only for optimization).

i apologize in advance for my bad english ;(

@NogginBops
Copy link
Owner

These events are parts of one of the newer versions of ImGui which wasn't released at the time I wrote this sample code.
I could add something for doing event based stuff, but handling interop of delegates with unmanaged code is often messy, so it won't be less code for me.

We'll see if I decide implementing event based input code is worth it in the future.

@NogginBops NogginBops changed the title Possible ottimization on UpdateInguiInput Method Possible optimization on UpdateInguiInput Method Jul 21, 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

No branches or pull requests

2 participants