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

Know if active widget is an InputText #1219

Closed
asielorz opened this issue Jul 7, 2017 · 2 comments
Closed

Know if active widget is an InputText #1219

asielorz opened this issue Jul 7, 2017 · 2 comments

Comments

@asielorz
Copy link

asielorz commented Jul 7, 2017

I'm working on an editor for a game where, when I press delete, the selected objects should be destroyed unless an InputText widget is active. I don't want to be editing some string property of an object, press delete to remove a character and destroy the object instead. I can use ImGui::IsAnyItemActive to know if there's an active widget, but I don't have any clue about what the item is, so that would cause false positives. Is there a way of knowing if a widget of type InputText is active?

Thanks in advance

@ocornut
Copy link
Owner

ocornut commented Jul 7, 2017 via email

@asielorz
Copy link
Author

asielorz commented Jul 7, 2017

It was exactly that. Thank you very much

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