mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-18 22:37:16 +02:00
Store the last mouse move input type for application overlay
This commit is contained in:
parent
b05aa3405c
commit
762751ef6a
2 changed files with 7 additions and 0 deletions
|
@ -150,6 +150,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) :
|
|||
_mouseX(0),
|
||||
_mouseY(0),
|
||||
_lastMouseMove(usecTimestampNow()),
|
||||
_lastMouseMoveType(QEvent::MouseMove),
|
||||
_mouseHidden(false),
|
||||
_seenMouseMove(false),
|
||||
_touchAvgX(0.0f),
|
||||
|
@ -1096,6 +1097,9 @@ void Application::mouseMoveEvent(QMouseEvent* event) {
|
|||
showMouse = false;
|
||||
}
|
||||
|
||||
// Used by application overlay to determine how to draw cursor(s)
|
||||
_lastMouseMoveType = event->type();
|
||||
|
||||
_controllerScriptingInterface.emitMouseMoveEvent(event); // send events to any registered scripts
|
||||
|
||||
// if one of our scripts have asked to capture this event, then stop processing it
|
||||
|
|
|
@ -206,6 +206,7 @@ public:
|
|||
const glm::vec3& getMouseRayDirection() const { return _mouseRayDirection; }
|
||||
int getMouseX() const { return _mouseX; }
|
||||
int getMouseY() const { return _mouseY; }
|
||||
unsigned int getLastMouseMoveType() const { return _lastMouseMoveType; }
|
||||
Faceplus* getFaceplus() { return &_faceplus; }
|
||||
Faceshift* getFaceshift() { return &_faceshift; }
|
||||
Visage* getVisage() { return &_visage; }
|
||||
|
@ -505,6 +506,7 @@ private:
|
|||
int _mouseDragStartedX;
|
||||
int _mouseDragStartedY;
|
||||
quint64 _lastMouseMove;
|
||||
unsigned int _lastMouseMoveType;
|
||||
bool _mouseHidden;
|
||||
bool _seenMouseMove;
|
||||
|
||||
|
@ -521,6 +523,7 @@ private:
|
|||
|
||||
QSet<int> _keysPressed;
|
||||
|
||||
|
||||
GeometryCache _geometryCache;
|
||||
AnimationCache _animationCache;
|
||||
TextureCache _textureCache;
|
||||
|
|
Loading…
Reference in a new issue