mirror of
https://github.com/vcmi/vcmi.git
synced 2025-02-03 13:01:33 +02:00
Mouse click that activates a window will also trigger mouse event
This commit is contained in:
parent
1dff721747
commit
07d9674828
@ -18,6 +18,12 @@
|
||||
#include "../gui/MouseButton.h"
|
||||
|
||||
#include <SDL_events.h>
|
||||
#include <SDL_hints.h>
|
||||
|
||||
InputSourceMouse::InputSourceMouse()
|
||||
{
|
||||
SDL_SetHint(SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH, "1");
|
||||
}
|
||||
|
||||
void InputSourceMouse::handleEventMouseMotion(const SDL_MouseMotionEvent & motion)
|
||||
{
|
||||
|
@ -24,6 +24,8 @@ class InputSourceMouse
|
||||
Point middleClickPosition;
|
||||
int mouseButtonsMask = 0;
|
||||
public:
|
||||
InputSourceMouse();
|
||||
|
||||
void handleEventMouseMotion(const SDL_MouseMotionEvent & current);
|
||||
void handleEventMouseButtonDown(const SDL_MouseButtonEvent & current);
|
||||
void handleEventMouseWheel(const SDL_MouseWheelEvent & current);
|
||||
|
Loading…
x
Reference in New Issue
Block a user