1
0
Fork 0

Platform/Win32/Win32Mouse: add getAbsPosition() and update the position variables in update()

This commit is contained in:
Henrik Hautakoski 2020-02-01 22:30:10 +01:00
parent 290c6643f5
commit fa0fc72eb0
No known key found for this signature in database
GPG key ID: 96765B12FEAC4745
2 changed files with 25 additions and 0 deletions

View file

@ -18,6 +18,8 @@ public :
// Get mouse position
virtual Vector2f getPosition() const;
virtual Vector2f getAbsPosition() const;
virtual bool isButtonDown(Mouse::Button button) const;
static bool handleMessage(MSG msg, Event& event);
@ -27,7 +29,11 @@ protected :
virtual void update(InputModule *input);
protected :
// position in relative (focused window) coordinates.
Vector2f m_position;
// position in absolute (screen) coordinates.
Vector2f m_abs_position;
};
} // namespace sp