From 64de32a54ac5934cf1a0522ceaa015579cde240e Mon Sep 17 00:00:00 2001 From: Legulysse Date: Sun, 27 Oct 2024 00:30:41 +0200 Subject: [PATCH] Fix for imgui 1.89 with IMGUI_DISABLE_OBSOLETE_FUNCTIONS --- imgui-SFML.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/imgui-SFML.cpp b/imgui-SFML.cpp index 0c3b9cb..e0fbe2c 100644 --- a/imgui-SFML.cpp +++ b/imgui-SFML.cpp @@ -342,10 +342,10 @@ void ProcessEvent(const sf::Event& event) { if (mod != ImGuiKey_None) { io.AddKeyEvent(mod, down); } else { - io.AddKeyEvent(ImGuiKey_ModCtrl, event.key.control); - io.AddKeyEvent(ImGuiKey_ModShift, event.key.shift); - io.AddKeyEvent(ImGuiKey_ModAlt, event.key.alt); - io.AddKeyEvent(ImGuiKey_ModSuper, event.key.system); + io.AddKeyEvent(ImGuiMod_Ctrl, event.key.control); + io.AddKeyEvent(ImGuiMod_Shift, event.key.shift); + io.AddKeyEvent(ImGuiMod_Alt, event.key.alt); + io.AddKeyEvent(ImGuiMod_Super, event.key.system); } const ImGuiKey key = keycodeToImGuiKey(event.key.code); @@ -1341,16 +1341,16 @@ ImGuiKey keycodeToImGuiMod(sf::Keyboard::Key code) { switch (code) { case sf::Keyboard::LControl: case sf::Keyboard::RControl: - return ImGuiKey_ModCtrl; + return ImGuiMod_Ctrl; case sf::Keyboard::LShift: case sf::Keyboard::RShift: - return ImGuiKey_ModShift; + return ImGuiMod_Shift; case sf::Keyboard::LAlt: case sf::Keyboard::RAlt: - return ImGuiKey_ModAlt; + return ImGuiMod_Alt; case sf::Keyboard::LSystem: case sf::Keyboard::RSystem: - return ImGuiKey_ModSuper; + return ImGuiMod_Super; default: break; }