diff options
Diffstat (limited to 'src/gui/Button.cpp')
-rw-r--r-- | src/gui/Button.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/Button.cpp b/src/gui/Button.cpp index b530004..eb5932b 100644 --- a/src/gui/Button.cpp +++ b/src/gui/Button.cpp @@ -14,7 +14,7 @@ namespace gsr { bool Button::on_event(mgl::Event &event, mgl::Window&, mgl::vec2f offset) { if(event.type == mgl::Event::MouseMoved) { mouse_inside = mgl::FloatRect(position + offset, size).contains({ (float)event.mouse_move.x, (float)event.mouse_move.y }); - } else if(event.type == mgl::Event::MouseButtonPressed) { + } else if(event.type == mgl::Event::MouseButtonPressed && event.mouse_button.button == mgl::Mouse::Left) { const bool clicked_inside = mouse_inside; if(clicked_inside && on_click) on_click(); |