ImGui.NET_OpenTK_Sample icon indicating copy to clipboard operation
ImGui.NET_OpenTK_Sample copied to clipboard

Possible optimization on UpdateInguiInput Method

Open valentimarco opened this issue 3 years ago • 1 comments

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 ;(

valentimarco avatar May 17 '22 23:05 valentimarco

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 avatar Jul 21 '22 15:07 NogginBops