1
0
Fork 0
spectre/source/Platform/Win32/Win32Mouse.h

38 lines
594 B
C++

#ifndef PLATFORM_WIN32_MOUSE_H
#define PLATFORM_WIN32_MOUSE_H
#include <Windows.h>
#include <Spectre/Input/Mouse.h>
namespace sp {
class Win32Mouse : public Mouse
{
public :
~Win32Mouse() {}
virtual void init();
// Get mouse position
virtual Vector2f getPosition() const;
virtual bool isButtonDown(Mouse::Button button) const;
static bool handleMessage(MSG message);
protected :
virtual void update(InputModule *input);
protected :
Vector2f m_position;
bool m_state[Mouse::Button::NUM_MBUTTONS];
bool m_tracked;
};
} // namespace sp
#endif /* PLATFORM_WIN32_MOUSE_H */