From a5ee8741336f29f0b9737573fa717f0be2686db6 Mon Sep 17 00:00:00 2001 From: HJfod <60038575+HJfod@users.noreply.github.com> Date: Mon, 15 Jul 2024 21:28:28 +0300 Subject: [PATCH] rename mousebuttons --- include/Keybinds.hpp | 4 ++-- src/Keybinds.cpp | 4 ++-- src/main.cpp | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/Keybinds.hpp b/include/Keybinds.hpp index 3c329a3..1d4fbf3 100644 --- a/include/Keybinds.hpp +++ b/include/Keybinds.hpp @@ -96,8 +96,8 @@ namespace keybinds { }; enum class MouseButton { - PageBack, - PageNext, + Button3, + Button4, }; class CUSTOM_KEYBINDS_DLL MouseBind final : public Bind { diff --git a/src/Keybinds.cpp b/src/Keybinds.cpp index d7ba872..9914162 100644 --- a/src/Keybinds.cpp +++ b/src/Keybinds.cpp @@ -188,8 +188,8 @@ bool MouseBind::isEqual(Bind* other) const { } std::string MouseBind::toString() const { switch (m_button) { - case MouseButton::PageBack: return "Page Back"; - case MouseButton::PageNext: return "Page Next"; + case MouseButton::Button3: return "Page Back"; + case MouseButton::Button4: return "Page Next"; default: return "Unknown (Mouse)"; } } diff --git a/src/main.cpp b/src/main.cpp index 2a0ee2e..a10167c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -47,8 +47,8 @@ class $modify(CCEGLView){ void onGLFWMouseCallBack(GLFWwindow* window, int button, int action, int mods) { std::optional mb; switch (button) { - case 3: mb = MouseButton::PageBack; break; - case 4: mb = MouseButton::PageNext; break; + case 3: mb = MouseButton::Button3; break; + case 4: mb = MouseButton::Button4; break; default: break; } if (mb) {