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

Avoiding input collisions with game logic #1058

Closed
charliegillies opened this issue Mar 8, 2017 · 4 comments
Closed

Avoiding input collisions with game logic #1058

charliegillies opened this issue Mar 8, 2017 · 4 comments

Comments

@charliegillies
Copy link

I'm sure this is a question that's been answered before, but for some reason I couldn't find anything about it.

I'm currently building a 2d level editor with imgui and I'm having an issue where the game logic is responding to clicks as well as imgui (e.g. clicking on actors through imgui windows).

Is there a way to tell if ImGui has processed any input actions?

@ratchetfreak
Copy link

check WantCaptureKeyboard and WantCaptureMouse those will tell you when an imgui widget wants input focus and there are methods to turn it off the next frame for when you want to drag the mouse behind a window.

@ocornut
Copy link
Owner

ocornut commented Mar 8, 2017 via email

@charliegillies
Copy link
Author

@ocornut @ratchetfreak I'm stupid. Thanks guys.

@charliegillies
Copy link
Author

Fixed and working perfectly. ImGui is awesome, @ocornut - thank you for providing an amazing tool.

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

3 participants