2010-11-20 10:37:14 +00:00
|
|
|
/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */
|
|
|
|
/* If you are missing that file, acquire a complete release at teeworlds.com. */
|
2010-05-29 07:25:38 +00:00
|
|
|
#ifndef ENGINE_CLIENT_INPUT_H
|
|
|
|
#define ENGINE_CLIENT_INPUT_H
|
|
|
|
|
|
|
|
class CInput : public IEngineInput
|
|
|
|
{
|
|
|
|
IEngineGraphics *m_pGraphics;
|
|
|
|
|
|
|
|
int m_InputGrabbed;
|
|
|
|
|
2010-09-05 12:04:50 +00:00
|
|
|
int64 m_LastRelease;
|
|
|
|
int64 m_ReleaseDelta;
|
2010-05-29 07:25:38 +00:00
|
|
|
|
|
|
|
void AddEvent(int Unicode, int Key, int Flags);
|
|
|
|
|
|
|
|
IEngineGraphics *Graphics() { return m_pGraphics; }
|
|
|
|
|
|
|
|
public:
|
|
|
|
CInput();
|
|
|
|
|
|
|
|
virtual void Init();
|
|
|
|
|
2010-10-13 10:47:42 +00:00
|
|
|
virtual void MouseRelative(float *x, float *y);
|
2010-05-29 07:25:38 +00:00
|
|
|
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]; }
|
|
|
|
|
2010-12-11 21:04:50 +00:00
|
|
|
virtual int Update();
|
2010-05-29 07:25:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|