Improve virtual keyboard behaviour when using hand tracking

This commit is contained in:
Guillaume Meunier
2024-11-01 14:13:58 +01:00
parent 60d4a2b5a6
commit 8126bb0541
2 changed files with 4 additions and 9 deletions
+1 -6
View File
@@ -292,12 +292,7 @@ virtual_keyboard::key_status virtual_keyboard::button_behavior(const ImRect & bb
ImGuiContext & g = *GImGui;
if ((flags & ImGuiButtonFlags_PressedOnMask_) == 0)
{
if (g.IO.MouseSource == ImGuiMouseSource_VRHandTracking)
flags |= ImGuiButtonFlags_PressedOnClick;
else
flags |= ImGuiButtonFlags_PressedOnClickRelease;
}
flags |= ImGuiButtonFlags_PressedOnClickRelease;
bool pressed = false;
bool hovered = window_hovered and ImGui::IsMouseHoveringRect(bb.Min, bb.Max);