mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-14 03:58:18 +00:00
38 lines
694 B
C
38 lines
694 B
C
|
#ifndef ENGINE_CLIENT_INPUT_H
|
||
|
#define ENGINE_CLIENT_INPUT_H
|
||
|
|
||
|
class CInput : public IEngineInput
|
||
|
{
|
||
|
IEngineGraphics *m_pGraphics;
|
||
|
|
||
|
int m_InputGrabbed;
|
||
|
|
||
|
unsigned int m_LastRelease;
|
||
|
unsigned int m_ReleaseDelta;
|
||
|
|
||
|
int m_Keys[1024];
|
||
|
|
||
|
void AddEvent(int Unicode, int Key, int Flags);
|
||
|
|
||
|
IEngineGraphics *Graphics() { return m_pGraphics; }
|
||
|
|
||
|
public:
|
||
|
CInput();
|
||
|
|
||
|
virtual void Init();
|
||
|
|
||
|
virtual void MouseRelative(int *x, int *y);
|
||
|
virtual void MouseModeAbsolute();
|
||
|
virtual void MouseModeRelative();
|
||
|
virtual int MouseDoubleClick();
|
||
|
|
||
|
void ClearKeyStates();
|
||
|
int KeyState(int Key);
|
||
|
|
||
|
int ButtonPressed(int Button) { return m_aInputState[m_InputCurrent][Button]; }
|
||
|
|
||
|
virtual void Update();
|
||
|
};
|
||
|
|
||
|
#endif
|