From 7ec76e23d5dcf1bb95a5d9f4a72751768645c724 Mon Sep 17 00:00:00 2001 From: Atdunbg <979541498@qq.com> Date: Wed, 9 Jul 2025 17:46:50 +0800 Subject: [PATCH] change SDLkey to KeyCode --- Sandbox/src/Editor/EditorLayer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sandbox/src/Editor/EditorLayer.cpp b/Sandbox/src/Editor/EditorLayer.cpp index abed044..67b8729 100644 --- a/Sandbox/src/Editor/EditorLayer.cpp +++ b/Sandbox/src/Editor/EditorLayer.cpp @@ -404,7 +404,7 @@ namespace Hazel float snapValues[3] = {snapValue, snapValue, snapValue}; if (ImGuizmo::Manipulate(glm::value_ptr(cameraView), glm::value_ptr(cameraProjection), static_cast(m_GizmoType), ImGuizmo::WORLD, - glm::value_ptr(transform), nullptr, snap ? snapValues : nullptr) && !Input::IsKeyPressed(SDL_SCANCODE_LALT)) + glm::value_ptr(transform), nullptr, snap ? snapValues : nullptr) && !Input::IsKeyPressed(KeyCode::LALT)) { if (ImGuizmo::IsUsing()) { @@ -559,7 +559,7 @@ namespace Hazel m_CameraController.OnEvent(e); m_EditorCamera.OnEvent(e); } - if (e.button.clicks && m_ViewportHovered && !ImGuizmo::IsOver() && Input::IsMouseButtonPressed(BUTTON_LEFT) && !Input::IsKeyPressed(SDL_SCANCODE_LALT)) + if (e.button.clicks && m_ViewportHovered && !ImGuizmo::IsOver() && Input::IsMouseButtonPressed(MouseButton::BUTTON_LEFT) && !Input::IsKeyPressed(KeyCode::LALT)) m_SceneHierachyPanel.SetSelectedEntity(m_HoveredEntity); #define SHORTCUT_EXIT (SDL_KMOD_CTRL + SDLK_W)