imgui
imgui copied to clipboard
Update viewport flags from window flags every frame
This fixes WindowFlags_NoInputs
(for mouse passthrough) only being taken in consideration when the viewport is intially created.
I'm not 100% sure this is free of side-effects (why wasn't AddUpdateViewport
done every frame before?). Another possibility could be to update ViewportFlags_NoInputs
in WindowSyncOwnedViewport
.
static int flags, reset;
if(reset && reset < ImGui::GetTime())
flags = reset = 0;
ImGui::Begin("Hello, world!", nullptr, flags);
if(ImGui::CheckboxFlags("WindowFlags_NoInputs", &flags, ImGuiWindowFlags_NoInputs))
reset = ImGui::GetTime() + 4;
if(reset)
ImGui::Text("reset in %d\n", static_cast<int>(reset - ImGui::GetTime()) + 1);
ImGui::End();