#include <C4KeyboardInput.h>
Public Member Functions | |
C4KeyboardInput () | |
~C4KeyboardInput () | |
void | Clear () |
void | RegisterKey (C4CustomKey *pRegKey) |
void | UnregisterKey (const StdStrBuf &rsName) |
void | UnregisterKeyBinding (C4CustomKey *pKey) |
bool | DoInput (const C4KeyCodeEx &InKey, C4KeyEventType InEvent, DWORD InScope, int32_t iStrength) |
void | CompileFunc (StdCompiler *pComp) |
bool | LoadCustomConfig () |
C4CustomKey * | GetKeyByName (const char *szKeyName) |
StdStrBuf | GetKeyCodeNameByKeyName (const char *szKeyName, bool fShort=false, int32_t iIndex=0) |
const C4KeyEventData & | GetLastKeyExtraData () const |
void | SetLastKeyExtraData (const C4KeyEventData &data) |
Static Public Attributes | |
static bool | IsValid = false |
Definition at line 488 of file C4KeyboardInput.h.
|
inline |
|
inline |
Definition at line 508 of file C4KeyboardInput.h.
References Clear(), and IsValid.
void C4KeyboardInput::Clear | ( | ) |
Definition at line 759 of file C4KeyboardInput.cpp.
Referenced by C4Game::Clear(), C4Game::InitKeyboard(), and ~C4KeyboardInput().
void C4KeyboardInput::CompileFunc | ( | StdCompiler * | pComp | ) |
Definition at line 936 of file C4KeyboardInput.cpp.
References StdCompiler::isDeserializer(), StdCompiler::Name(), StdCompiler::NameEnd(), and StdCompiler::Value().
bool C4KeyboardInput::DoInput | ( | const C4KeyCodeEx & | InKey, |
C4KeyEventType | InEvent, | ||
DWORD | InScope, | ||
int32_t | iStrength | ||
) |
Definition at line 870 of file C4KeyboardInput.cpp.
References C4KeyCodeEx::dwShift, C4CustomKey::Execute(), C4KeyEventData::game_x, C4KeyEventData::game_y, C4CustomKey::GetPriority(), C4CustomKey::GetScope(), C4CustomKey::IsCodeMatched(), C4CustomKey::IsDown(), C4KeyEventData::iStrength, C4KeyCodeEx::Key, KEY_Any, KEY_CONTROLLER_AnyButton, KEY_Gamepad(), Key_IsGamepadAxis(), Key_IsGamepadButton(), KEYEV_Up, C4KeyEventData::KeyPos_None, C4CustomKey::PRIO_MoreThanMax, C4CustomKey::PRIO_None, C4KeyEventData::vp_x, and C4KeyEventData::vp_y.
Referenced by C4Game::DoKeyboardInput().
C4CustomKey * C4KeyboardInput::GetKeyByName | ( | const char * | szKeyName | ) |
Definition at line 978 of file C4KeyboardInput.cpp.
Referenced by GetKeyCodeNameByKeyName().
StdStrBuf C4KeyboardInput::GetKeyCodeNameByKeyName | ( | const char * | szKeyName, |
bool | fShort = false , |
||
int32_t | iIndex = 0 |
||
) |
Definition at line 984 of file C4KeyboardInput.cpp.
References C4CustomKey::GetCodes(), GetKeyByName(), and C4KeyCodeEx::ToString().
Referenced by GetKeyboardInputName(), and C4FullScreen::ViewportCheck().
|
inline |
Definition at line 528 of file C4KeyboardInput.h.
bool C4KeyboardInput::LoadCustomConfig | ( | ) |
Definition at line 964 of file C4KeyboardInput.cpp.
References C4CFN_Extra, C4CFN_KeyConfig, DirSep, StdBuf::getData(), C4Group::LoadEntry(), LoadResStr(), LogF(), and C4Group::Open().
Referenced by C4Game::InitKeyboard().
void C4KeyboardInput::RegisterKey | ( | C4CustomKey * | pRegKey | ) |
Definition at line 797 of file C4KeyboardInput.cpp.
References C4CustomKey::Deref(), C4CustomKey::GetCodes(), StdStrBuf::getData(), C4CustomKey::GetName(), C4CustomKey::Ref(), and C4CustomKey::Update().
Referenced by C4KeyBinding::C4KeyBinding(), C4Game::InitKeyboard(), and UnregisterKeyBinding().
|
inline |
Definition at line 529 of file C4KeyboardInput.h.
Referenced by C4PlayerControl::DoMouseInput().
void C4KeyboardInput::UnregisterKey | ( | const StdStrBuf & | rsName | ) |
Definition at line 826 of file C4KeyboardInput.cpp.
References C4CustomKey::Deref(), C4CustomKey::GetCodes(), and StdStrBuf::getData().
Referenced by UnregisterKeyBinding().
void C4KeyboardInput::UnregisterKeyBinding | ( | C4CustomKey * | pKey | ) |
Definition at line 848 of file C4KeyboardInput.cpp.
References StdStrBuf::getData(), C4CustomKey::GetName(), C4CustomKey::KillCallbacks(), RegisterKey(), and UnregisterKey().
Referenced by C4KeyBinding::~C4KeyBinding().
|
static |
Definition at line 505 of file C4KeyboardInput.h.
Referenced by C4KeyboardInput(), C4KeyBinding::~C4KeyBinding(), and ~C4KeyboardInput().