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

Absorb mouse/keyboard action #912

Closed
PlutoniumHeart opened this issue Nov 13, 2016 · 2 comments
Closed

Absorb mouse/keyboard action #912

PlutoniumHeart opened this issue Nov 13, 2016 · 2 comments

Comments

@PlutoniumHeart
Copy link

Hi,

I am using imgui to add some control to my scene, however, I am also using some keyboard short cuts and mouse actions to control/rotate the scene.

I noticed that even when I am dragging my GUI, the scene behind it is also rotating, is there a way to for the imgui to absorb mouse/keyboard action, or do I have to implement this by myself?

Thanks!

@ratchetfreak
Copy link

ratchetfreak commented Nov 13, 2016

There is a flag you can check WantCaptureMouse in the ImGuiIO struct that tells the application that it is capturing the mouse.

You can use this to conditionally null out the input for the underlying scene.

@PlutoniumHeart
Copy link
Author

That works nicely, thank you!

ocornut added a commit that referenced this issue Nov 1, 2017
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