diff --git a/samples/basic/viewer/main.cc b/samples/basic/viewer/main.cc index b6b42984688f71af19f7cbe24917d2e4385d127c..d5aa6c38ae9c69c9263d95858643dffaff6ae165 100644 --- a/samples/basic/viewer/main.cc +++ b/samples/basic/viewer/main.cc @@ -198,11 +198,11 @@ void imguizmo(pm::vertex_attribute<tg::pos3> const& pos) // an interactive view is required gv::interactive([&](float) { // you can define keybindings to select an operation - if (ImGui::IsKeyPressed(GLFW_KEY_T)) + if (ImGui::IsKeyPressed(ImGuiKey(GLFW_KEY_T))) currentGizmoOperation = ImGuizmo::TRANSLATE; - if (ImGui::IsKeyPressed(GLFW_KEY_R)) + if (ImGui::IsKeyPressed(ImGuiKey(GLFW_KEY_R))) currentGizmoOperation = ImGuizmo::ROTATE; - if (ImGui::IsKeyPressed(GLFW_KEY_S)) + if (ImGui::IsKeyPressed(ImGuiKey(GLFW_KEY_S))) currentGizmoOperation = ImGuizmo::SCALE; // you can also choose the correct operation using gui elements @@ -239,7 +239,7 @@ void imguizmo(pm::vertex_attribute<tg::pos3> const& pos) } // toggle snap on p key - if (ImGui::IsKeyPressed(GLFW_KEY_P)) + if (ImGui::IsKeyPressed(ImGuiKey(GLFW_KEY_P))) useSnap = !useSnap; // ... or use gui elements