From 2540c617a1c369dc22678f8db2afa3e20754c210 Mon Sep 17 00:00:00 2001
From: Julius Nehring-Wirxel <julius.nehring-wirxel@rwth-aachen.de>
Date: Mon, 29 Jul 2024 12:18:41 +0200
Subject: [PATCH] Fix ImGuiKey not converting from int automatically anymore

---
 samples/basic/viewer/main.cc | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/samples/basic/viewer/main.cc b/samples/basic/viewer/main.cc
index b6b4298..d5aa6c3 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
-- 
GitLab