When writing the X11 (linux) implementation there was a problem with X11 defining a "Display" type and we also have a Display class in the engine. So to fix that problem and minimize the risk for running into other name conflicts. We move everything from global namespace.
38 lines
596 B
C++
38 lines
596 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(MouseButton::Type button) const;
|
|
|
|
static bool handleMessage(MSG message);
|
|
|
|
protected :
|
|
|
|
virtual void update(InputModule *input);
|
|
|
|
protected :
|
|
Vector2f m_position;
|
|
|
|
bool m_state[MouseButton::NUM_MBUTTONS];
|
|
|
|
bool m_tracked;
|
|
};
|
|
|
|
} // namespace sp
|
|
|
|
#endif /* PLATFORM_WIN32_MOUSE_H */
|