Closed sphaero closed 2 years ago
This seems a trivial problem to fix but I have not found the right code yet to skip the delete if the window is not active/hovered/nav???/selected
if (node->Selected && ImGui::IsKeyPressedMap(ImGuiKey_Delete) && ImGui::IsWindowFocused())
Seems a solution but it feels like this should be done differently? Anyone?
Looks good to me.
I'll create a PR. However it feels like this should be handled automatically somehow. I've not experienced this with builtin widgets and windows.
Widgets do not handle key presses, user application does. This is why its in sample.cpp.
Just try the sample.cpp application: