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
Are you sure what you need isn't the existing io.WantCaptureKeyboard flag?
On 7 Jul 2017, at 21:29, Lugruf notifications@github.com wrote:
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
―
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
It was exactly that. Thank you very much
Most helpful comment
Are you sure what you need isn't the existing io.WantCaptureKeyboard flag?