1
0
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:
Ivan Savenko 2023-07-04 20:11:16 +03:00
parent 1dff721747
commit 07d9674828
2 changed files with 8 additions and 0 deletions

View File

@ -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)
{

View File

@ -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);