mirror of
https://github.com/glest/glest-source.git
synced 2025-08-11 19:04:00 +02:00
Added logic to NOT trigger camera mousemove if keyboard has a key pressed so you can scroll with keys and still move mouse simultaneously
This commit is contained in:
@@ -111,6 +111,7 @@ private:
|
||||
static unsigned int lastMouseEvent; /** for use in mouse hover calculations */
|
||||
static MouseState mouseState;
|
||||
static Vec2i mousePos;
|
||||
static bool isKeyPressedDown;
|
||||
|
||||
static void setLastMouseEvent(unsigned int lastMouseEvent) {Window::lastMouseEvent = lastMouseEvent;}
|
||||
static unsigned int getLastMouseEvent() {return Window::lastMouseEvent;}
|
||||
@@ -127,6 +128,7 @@ protected:
|
||||
public:
|
||||
static bool handleEvent();
|
||||
static void revertMousePos();
|
||||
static bool isKeyDown() { return isKeyPressedDown; }
|
||||
|
||||
|
||||
Window();
|
||||
|
@@ -110,7 +110,8 @@ private:
|
||||
|
||||
static unsigned int lastMouseEvent; /** for use in mouse hover calculations */
|
||||
static MouseState mouseState;
|
||||
static Vec2i mousePos;
|
||||
static Vec2i mousePos;
|
||||
static bool isKeyPressedDown;
|
||||
|
||||
static void setLastMouseEvent(unsigned int lastMouseEvent) {Window::lastMouseEvent = lastMouseEvent;}
|
||||
static unsigned int getLastMouseEvent() {return Window::lastMouseEvent;}
|
||||
@@ -119,7 +120,7 @@ private:
|
||||
static void setMouseState(MouseButton b, bool state) {Window::mouseState.set(b, state);}
|
||||
|
||||
static const Vec2i &getMousePos() {return Window::mousePos;}
|
||||
static void setMousePos(const Vec2i &mousePos) {Window::mousePos = mousePos;}
|
||||
static void setMousePos(const Vec2i &mousePos) {Window::mousePos = mousePos;}
|
||||
|
||||
protected:
|
||||
WindowHandle handle;
|
||||
@@ -137,6 +138,7 @@ protected:
|
||||
public:
|
||||
static bool handleEvent();
|
||||
static void revertMousePos();
|
||||
static bool isKeyDown() { return isKeyPressedDown; }
|
||||
|
||||
//contructor & destructor
|
||||
Window();
|
||||
|
Reference in New Issue
Block a user