39 lines
1.1 KiB
C++
39 lines
1.1 KiB
C++
#ifndef INPUT_HPP
|
|
#define INPUT_HPP
|
|
|
|
#include "open_engine/input/mouse_codes.hpp"
|
|
#include "open_engine/input/keycodes.hpp"
|
|
|
|
#include <string>
|
|
#include <map>
|
|
|
|
#define MAX_AXIS 10
|
|
|
|
namespace OpenEngine {
|
|
class Input
|
|
{
|
|
public:
|
|
static bool IsKeyPressed(KeyCode keycode);
|
|
|
|
static bool IsMouseButtonPressed(MouseCode button);
|
|
|
|
static std::pair<float, float> GetMousePosition();
|
|
static float GetMouseX();
|
|
static float GetMouseY();
|
|
|
|
static bool JoystickExists(unsigned int joystick);
|
|
static std::map<unsigned int, std::string> GetJoystickList();
|
|
|
|
static float GetJoystickAxis(unsigned int joystick, unsigned int axis);
|
|
static const float* GetJoystickAxes(unsigned int joystick);
|
|
static unsigned int GetJoystickAxesCount(unsigned int joystick);
|
|
|
|
static bool IsJoystickButtonPressed(unsigned int joystick, unsigned int button);
|
|
|
|
private:
|
|
static const std::string GetJoystickName(unsigned int joystick);
|
|
};
|
|
}
|
|
|
|
#endif // INPUT_HPP
|