Skip to content

Commit

Permalink
Don't handle mousewheel scrolling if mouse is not in game map area (b…
Browse files Browse the repository at this point in the history
…ug #24501)
  • Loading branch information
Vultraz committed Feb 28, 2017
1 parent b3830b9 commit 48d35a3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/mouse_handler_base.cpp
Expand Up @@ -263,6 +263,11 @@ void mouse_handler_base::mouse_wheel(int scrollx, int scrolly, bool browse)
movex = 0; movey = 0;
}

// Don't scroll map if cursor is not in gamemap area
if(!sdl::point_in_rect(x, y, gui().map_area())) {
return;
}

if (movex != 0 || movey != 0) {
CKey pressed;
// Alt + mousewheel do an 90° rotation on the scroll direction
Expand Down

1 comment on commit 48d35a3

@Wedge009
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, really? It was this simple after all? Well, thanks for resolving this!

Please sign in to comment.