You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
748 B
37 lines
748 B
#ifndef INPUT_H |
|
#define INPUT_H |
|
|
|
#include <utility> // std::pair |
|
|
|
namespace Inferno { |
|
|
|
class MousePositionEvent; |
|
|
|
class Input { |
|
public: |
|
static void update(); |
|
|
|
static bool onMousePosition(MousePositionEvent &e); |
|
|
|
static bool isKeyPressed(int key); |
|
static bool isMouseButtonPressed(int button); |
|
static std::pair<float, float> getMousePosition(); |
|
static float getMouseX(); |
|
static float getMouseY(); |
|
|
|
// ----------------------------------------- |
|
|
|
static inline float getXOffset() { return m_xOffset; } |
|
static inline float getYOffset() { return m_yOffset; } |
|
|
|
private: |
|
static bool m_firstMousePos; |
|
static float m_xPosLast; |
|
static float m_yPosLast; |
|
static float m_xOffset; |
|
static float m_yOffset; |
|
}; |
|
|
|
} |
|
|
|
#endif // INPUT_H
|
|
|