mirror of
https://github.com/nillerusr/source-engine.git
synced 2026-08-13 12:19:13 +00:00
1
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
//========= Copyright Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
//=============================================================================
|
||||
|
||||
#ifndef KEYREPEAT_H
|
||||
#define KEYREPEAT_H
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
enum KEYREPEAT_ALIASES
|
||||
{
|
||||
KR_ALIAS_UP,
|
||||
KR_ALIAS_DOWN,
|
||||
KR_ALIAS_LEFT,
|
||||
KR_ALIAS_RIGHT,
|
||||
|
||||
FM_NUM_KEYREPEAT_ALIASES,
|
||||
};
|
||||
|
||||
class CKeyRepeatHandler
|
||||
{
|
||||
public:
|
||||
CKeyRepeatHandler();
|
||||
|
||||
void Reset();
|
||||
void KeyDown( vgui::KeyCode code );
|
||||
void KeyUp( vgui::KeyCode code );
|
||||
vgui::KeyCode KeyRepeated();
|
||||
void SetKeyRepeatTime( vgui::KeyCode code, float flRepeat );
|
||||
|
||||
private:
|
||||
bool m_bAliasDown[MAX_JOYSTICKS][FM_NUM_KEYREPEAT_ALIASES];
|
||||
float m_flRepeatTimes[FM_NUM_KEYREPEAT_ALIASES];
|
||||
float m_flNextKeyRepeat[MAX_JOYSTICKS];
|
||||
bool m_bHaveKeyDown;
|
||||
};
|
||||
|
||||
|
||||
} // namespace vgui
|
||||
|
||||
#endif // KEYREPEAT_H
|
||||
Reference in New Issue
Block a user