|
@@ -462,19 +462,26 @@ void ImGui::ShowDemoWindow(bool* p_open)
|
|
ImGui::CheckboxFlags("io.ConfigFlags: NavEnableSetMousePos", &io.ConfigFlags, ImGuiConfigFlags_NavEnableSetMousePos);
|
|
ImGui::CheckboxFlags("io.ConfigFlags: NavEnableSetMousePos", &io.ConfigFlags, ImGuiConfigFlags_NavEnableSetMousePos);
|
|
ImGui::SameLine(); HelpMarker("Instruct navigation to move the mouse cursor. See comment for ImGuiConfigFlags_NavEnableSetMousePos.");
|
|
ImGui::SameLine(); HelpMarker("Instruct navigation to move the mouse cursor. See comment for ImGuiConfigFlags_NavEnableSetMousePos.");
|
|
ImGui::CheckboxFlags("io.ConfigFlags: NoMouse", &io.ConfigFlags, ImGuiConfigFlags_NoMouse);
|
|
ImGui::CheckboxFlags("io.ConfigFlags: NoMouse", &io.ConfigFlags, ImGuiConfigFlags_NoMouse);
|
|
|
|
+ ImGui::SameLine(); HelpMarker("Instruct dear imgui to disable mouse inputs and interactions.");
|
|
|
|
+
|
|
|
|
+ // The "NoMouse" option can get us stuck with a disabled mouse! Let's provide an alternative way to fix it:
|
|
if (io.ConfigFlags & ImGuiConfigFlags_NoMouse)
|
|
if (io.ConfigFlags & ImGuiConfigFlags_NoMouse)
|
|
{
|
|
{
|
|
- // The "NoMouse" option can get us stuck with a disabled mouse! Let's provide an alternative way to fix it:
|
|
|
|
if (fmodf((float)ImGui::GetTime(), 0.40f) < 0.20f)
|
|
if (fmodf((float)ImGui::GetTime(), 0.40f) < 0.20f)
|
|
{
|
|
{
|
|
ImGui::SameLine();
|
|
ImGui::SameLine();
|
|
ImGui::Text("<<PRESS SPACE TO DISABLE>>");
|
|
ImGui::Text("<<PRESS SPACE TO DISABLE>>");
|
|
}
|
|
}
|
|
- if (ImGui::IsKeyPressed(ImGuiKey_Space))
|
|
|
|
|
|
+ // Prevent both being checked
|
|
|
|
+ if (ImGui::IsKeyPressed(ImGuiKey_Space) || (io.ConfigFlags & ImGuiConfigFlags_NoKeyboard))
|
|
io.ConfigFlags &= ~ImGuiConfigFlags_NoMouse;
|
|
io.ConfigFlags &= ~ImGuiConfigFlags_NoMouse;
|
|
}
|
|
}
|
|
- ImGui::CheckboxFlags("io.ConfigFlags: NoMouseCursorChange", &io.ConfigFlags, ImGuiConfigFlags_NoMouseCursorChange);
|
|
|
|
|
|
+
|
|
|
|
+ ImGui::CheckboxFlags("io.ConfigFlags: NoMouseCursorChange", &io.ConfigFlags, ImGuiConfigFlags_NoMouseCursorChange);
|
|
ImGui::SameLine(); HelpMarker("Instruct backend to not alter mouse cursor shape and visibility.");
|
|
ImGui::SameLine(); HelpMarker("Instruct backend to not alter mouse cursor shape and visibility.");
|
|
|
|
+ ImGui::CheckboxFlags("io.ConfigFlags: NoKeyboard", &io.ConfigFlags, ImGuiConfigFlags_NoKeyboard);
|
|
|
|
+ ImGui::SameLine(); HelpMarker("Instruct dear imgui to disable keyboard inputs and interactions.");
|
|
|
|
+
|
|
ImGui::Checkbox("io.ConfigInputTrickleEventQueue", &io.ConfigInputTrickleEventQueue);
|
|
ImGui::Checkbox("io.ConfigInputTrickleEventQueue", &io.ConfigInputTrickleEventQueue);
|
|
ImGui::SameLine(); HelpMarker("Enable input queue trickling: some types of events submitted during the same frame (e.g. button down + up) will be spread over multiple frames, improving interactions with low framerates.");
|
|
ImGui::SameLine(); HelpMarker("Enable input queue trickling: some types of events submitted during the same frame (e.g. button down + up) will be spread over multiple frames, improving interactions with low framerates.");
|
|
ImGui::Checkbox("io.MouseDrawCursor", &io.MouseDrawCursor);
|
|
ImGui::Checkbox("io.MouseDrawCursor", &io.MouseDrawCursor);
|