-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInputHandler.cpp
51 lines (39 loc) · 864 Bytes
/
InputHandler.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#include "InputHandler.h"
InputHandler::InputHandler()
{
this->keystate = SDL_GetKeyboardState(NULL);
}
InputHandler::~InputHandler(){}
void InputHandler::OnEvent(SDL_Event* event)
{
CEvent::OnEvent(event);
}
void InputHandler::OnMouseFocus(){}
void InputHandler::OnMouseMove(int mX, int mY, int relX, int relY, bool Left,bool Right,bool Middle)
{
this->mX = mX;
this->mY = mY;
this->relX = relX;
this->relY = relY;
this->mL = Left;
this->mR = Right;
this->mM = Middle;
}
void InputHandler::OnLButtonDown(int mX, int mY)
{
this->mX = mX;
this->mY = mY;
this->mL = true;
}
void InputHandler::OnLButtonUp(int mX, int mY)
{
this->mX = mX;
this->mY = mY;
this->mL = false;
}
void InputHandler::OnKeyDown(SDL_Keycode sym, Uint16 mod)
{
}
void InputHandler::OnKeyUp(SDL_Keycode sym, Uint16 mod)
{
}