forked from jjiangweilan/WeilanEngine-GL
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInput.cpp
More file actions
24 lines (19 loc) · 839 Bytes
/
Input.cpp
File metadata and controls
24 lines (19 loc) · 839 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include "Input.hpp"
#include <iostream>
namespace wlEngine {
uint8_t Input::getKeyStatus(SDL_Scancode scancode) {
return InputSystem::get()->getKeyStatus(scancode);
}
const std::vector<SDL_Scancode>& Input::getKeypressSequence() {
return InputSystem::get()->getKeypressSequence();
}
void Input::getMouseWheel(int& x, int& y) {
return InputSystem::get()->getMouseWheel(x,y);
}
ControllerAxisType Input::getControllerAxis(const ControllerAxis& axis) {
return SDL_GameControllerGetAxis(InputSystem::get()->gameController, static_cast<SDL_GameControllerAxis>(axis));
}
ControllerButtonType Input::getControllerButton(const ControllerButton& button) {
return SDL_GameControllerGetButton(InputSystem::get()->gameController, static_cast<SDL_GameControllerButton>(button));
}
}