Skip to content

Commit

Permalink
rename mousebuttons
Browse files Browse the repository at this point in the history
  • Loading branch information
HJfod committed Jul 15, 2024
1 parent a9ff7ea commit a5ee874
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions include/Keybinds.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ namespace keybinds {
};

enum class MouseButton {
PageBack,
PageNext,
Button3,
Button4,
};

class CUSTOM_KEYBINDS_DLL MouseBind final : public Bind {
Expand Down
4 changes: 2 additions & 2 deletions src/Keybinds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)";
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ class $modify(CCEGLView){
void onGLFWMouseCallBack(GLFWwindow* window, int button, int action, int mods) {
std::optional<MouseButton> 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) {
Expand Down

0 comments on commit a5ee874

Please sign in to comment.