4
4
#include < imnodes.h>
5
5
#include < imgui.h>
6
6
7
- #include < SDL2/ SDL_keycode.h>
8
- #include < SDL2/ SDL_timer.h>
7
+ #include < SDL_keycode.h>
8
+ #include < SDL_timer.h>
9
9
#include < algorithm>
10
10
#include < cassert>
11
11
#include < chrono>
@@ -207,7 +207,7 @@ class ColorNodeEditor
207
207
{
208
208
const bool open_popup = ImGui::IsWindowFocused (ImGuiFocusedFlags_RootAndChildWindows) &&
209
209
ImNodes::IsEditorHovered () &&
210
- ImGui::IsKeyReleased (SDL_SCANCODE_A );
210
+ ImGui::IsKeyReleased (ImGuiKey_A );
211
211
212
212
ImGui::PushStyleVar (ImGuiStyleVar_WindowPadding, ImVec2 (8 .f , 8 .f ));
213
213
if (!ImGui::IsAnyItemHovered () && open_popup)
@@ -588,7 +588,7 @@ class ColorNodeEditor
588
588
589
589
{
590
590
const int num_selected = ImNodes::NumSelectedLinks ();
591
- if (num_selected > 0 && ImGui::IsKeyReleased (SDL_SCANCODE_X ))
591
+ if (num_selected > 0 && ImGui::IsKeyReleased (ImGuiKey_X ))
592
592
{
593
593
static std::vector<int > selected_links;
594
594
selected_links.resize (static_cast <size_t >(num_selected));
@@ -602,7 +602,7 @@ class ColorNodeEditor
602
602
603
603
{
604
604
const int num_selected = ImNodes::NumSelectedNodes ();
605
- if (num_selected > 0 && ImGui::IsKeyReleased (SDL_SCANCODE_X ))
605
+ if (num_selected > 0 && ImGui::IsKeyReleased (ImGuiKey_X ))
606
606
{
607
607
static std::vector<int > selected_nodes;
608
608
selected_nodes.resize (static_cast <size_t >(num_selected));
0 commit comments