pthom / hello_imgui

Hello, Dear ImGui: unleash your creativity in app development and prototyping
https://pthom.github.io/hello_imgui
MIT License
607 stars 91 forks source link

Docking Demo Keyboard Input Problems #4

Closed frink closed 3 years ago

frink commented 3 years ago

On Chrome it seams that the Classic and Docking Demos differ in their keyboard input...

Things that work in the Classic Demo and Not in Docking Demo:

Since both are built from the same docking branch I'm confused as to why one would work and the other not...

Thought it was worth a report.

To duplicate go to the Dear Imgui Demo > Configuration and enable ioConfigFlags: NavEnableKeyboard and press down / up / space. After turning this off you can go to Dear Imgui Demo > Widgets > Basic. Type "asdf, Ctrl+A, Ctrl+X, Ctrl+VV, Backspace, Ctrl+C, Ctrl+VV...

This all works fine on the Classic demo but not on the Docking demo... Weird!

frink commented 3 years ago

Ps - On Imgui Manual everything works fine. I wonder if there was just a problem with the build of the docking demo...

pthom commented 3 years ago

Nice catch 👍

This is solved by this commit : it was mainly an issue because this demo show how to handle keyboard events via SDL, and you need to return true in the SDL handler in order for them to be further processed.