diff --git a/example/color_node_editor.cpp b/example/color_node_editor.cpp index 615245a..93a20ff 100644 --- a/example/color_node_editor.cpp +++ b/example/color_node_editor.cpp @@ -4,8 +4,8 @@ #include #include -#include -#include +#include +#include #include #include #include @@ -207,7 +207,7 @@ class ColorNodeEditor { const bool open_popup = ImGui::IsWindowFocused(ImGuiFocusedFlags_RootAndChildWindows) && ImNodes::IsEditorHovered() && - ImGui::IsKeyReleased(SDL_SCANCODE_A); + ImGui::IsKeyReleased(ImGuiKey_A); ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(8.f, 8.f)); if (!ImGui::IsAnyItemHovered() && open_popup) @@ -588,7 +588,7 @@ class ColorNodeEditor { const int num_selected = ImNodes::NumSelectedLinks(); - if (num_selected > 0 && ImGui::IsKeyReleased(SDL_SCANCODE_X)) + if (num_selected > 0 && ImGui::IsKeyReleased(ImGuiKey_X)) { static std::vector selected_links; selected_links.resize(static_cast(num_selected)); @@ -602,7 +602,7 @@ class ColorNodeEditor { const int num_selected = ImNodes::NumSelectedNodes(); - if (num_selected > 0 && ImGui::IsKeyReleased(SDL_SCANCODE_X)) + if (num_selected > 0 && ImGui::IsKeyReleased(ImGuiKey_X)) { static std::vector selected_nodes; selected_nodes.resize(static_cast(num_selected)); diff --git a/example/save_load.cpp b/example/save_load.cpp index 7a21376..01f3293 100644 --- a/example/save_load.cpp +++ b/example/save_load.cpp @@ -47,7 +47,7 @@ class SaveLoadEditor ImNodes::BeginNodeEditor(); if (ImGui::IsWindowFocused(ImGuiFocusedFlags_RootAndChildWindows) && - ImNodes::IsEditorHovered() && ImGui::IsKeyReleased(SDL_SCANCODE_A)) + ImNodes::IsEditorHovered() && ImGui::IsKeyReleased(ImGuiKey_A)) { const int node_id = ++current_id_; ImNodes::SetNodeScreenSpacePos(node_id, ImGui::GetMousePos());