DDraceNetwork Docs
CBinds Class Reference

#include <binds.h>

Inheritance diagram for CBinds:
[legend]
Collaboration diagram for CBinds:
[legend]

Classes

class  CBindSlot
 
class  CBindsSpecial
 

Public Types

enum  {
  MODIFIER_NONE = 0 , MODIFIER_CTRL , MODIFIER_ALT , MODIFIER_SHIFT ,
  MODIFIER_GUI , MODIFIER_COUNT , MODIFIER_COMBINATION_COUNT = 1 << MODIFIER_COUNT
}
 

Public Member Functions

 CBinds ()
 
 ~CBinds ()
 
virtual int Sizeof () const override
 
void Bind (int KeyId, const char *pStr, bool FreeOnly=false, int ModifierCombination=MODIFIER_NONE)
 
void SetDefaults ()
 
void UnbindAll ()
 
const char * Get (int KeyId, int ModifierCombination)
 
void GetKey (const char *pBindStr, char *pBuf, size_t BufSize)
 
virtual void OnConsoleInit () override
 
virtual bool OnInput (const IInput::CEvent &Event) override
 
void SetDDRaceBinds (bool FreeOnly)
 
- Public Member Functions inherited from CComponent
virtual ~CComponent ()
 
virtual int Sizeof () const =0
 
class CGameClientGameClient () const
 
class IClientClient () const
 
virtual void OnStateChange (int NewState, int OldState)
 
virtual void OnConsoleInit ()
 
virtual void OnInit ()
 
virtual void OnShutdown ()
 
virtual void OnReset ()
 
virtual void OnWindowResize ()
 
virtual void OnRefreshSkins ()
 
virtual void OnRender ()
 
virtual void OnNewSnapshot ()
 
virtual void OnRelease ()
 
virtual void OnMapLoad ()
 
virtual void OnMessage (int Msg, void *pRawMsg)
 
virtual bool OnCursorMove (float x, float y, IInput::ECursorType CursorType)
 
virtual bool OnInput (const IInput::CEvent &Event)
 

Static Public Member Functions

static int GetModifierMask (IInput *pInput)
 
static int GetModifierMaskOfKey (int Key)
 
static const char * GetModifierName (int Modifier)
 
static void GetKeyBindModifiersName (int ModifierCombination, char *pBuf, size_t BufSize)
 

Public Attributes

bool m_MouseOnAction
 
CBindsSpecial m_SpecialBinds
 

Private Member Functions

class IConsoleGetConsole () const
 
CBindSlot GetBindSlot (const char *pBindString) const
 

Static Private Member Functions

static void ConBind (IConsole::IResult *pResult, void *pUserData)
 
static void ConBinds (IConsole::IResult *pResult, void *pUserData)
 
static void ConUnbind (IConsole::IResult *pResult, void *pUserData)
 
static void ConUnbindAll (IConsole::IResult *pResult, void *pUserData)
 
static void ConfigSaveCallback (IConfigManager *pConfigManager, void *pUserData)
 

Private Attributes

char * m_aapKeyBindings [MODIFIER_COMBINATION_COUNT][KEY_LAST]
 
std::vector< CBindSlotm_vActiveBinds
 

Additional Inherited Members

- Protected Member Functions inherited from CComponent
class IKernelKernel () const
 
class IEngineEngine () const
 
class IGraphicsGraphics () const
 
class ITextRenderTextRender () const
 
class IInputInput () const
 
class IStorageStorage () const
 
class CUiUi () const
 
class ISoundSound () const
 
class CRenderToolsRenderTools () const
 
class IConfigManagerConfigManager () const
 
class CConfigConfig () const
 
class IConsoleConsole () const
 
class IDemoPlayerDemoPlayer () const
 
class IDemoRecorderDemoRecorder (int Recorder) const
 
class IFavoritesFavorites () const
 
class IServerBrowserServerBrowser () const
 
class CLayersLayers () const
 
class CCollisionCollision () const
 
int64_t time () const
 
float LocalTime () const
 
class IHttpHttp () const
 
- Protected Attributes inherited from CComponent
CGameClientm_pClient
 

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
MODIFIER_NONE 
MODIFIER_CTRL 
MODIFIER_ALT 
MODIFIER_SHIFT 
MODIFIER_GUI 
MODIFIER_COUNT 
MODIFIER_COMBINATION_COUNT 

Constructor & Destructor Documentation

◆ CBinds()

CBinds::CBinds ( )

◆ ~CBinds()

CBinds::~CBinds ( )

Member Function Documentation

◆ Bind()

void CBinds::Bind ( int  KeyId,
const char *  pStr,
bool  FreeOnly = false,
int  ModifierCombination = MODIFIER_NONE 
)

◆ ConBind()

void CBinds::ConBind ( IConsole::IResult pResult,
void *  pUserData 
)
staticprivate

◆ ConBinds()

void CBinds::ConBinds ( IConsole::IResult pResult,
void *  pUserData 
)
staticprivate

◆ ConfigSaveCallback()

void CBinds::ConfigSaveCallback ( IConfigManager pConfigManager,
void *  pUserData 
)
staticprivate

◆ ConUnbind()

void CBinds::ConUnbind ( IConsole::IResult pResult,
void *  pUserData 
)
staticprivate

◆ ConUnbindAll()

void CBinds::ConUnbindAll ( IConsole::IResult pResult,
void *  pUserData 
)
staticprivate

◆ Get()

const char * CBinds::Get ( int  KeyId,
int  ModifierCombination 
)

◆ GetBindSlot()

CBinds::CBindSlot CBinds::GetBindSlot ( const char *  pBindString) const
private

◆ GetConsole()

class IConsole * CBinds::GetConsole ( ) const
inlineprivate

◆ GetKey()

void CBinds::GetKey ( const char *  pBindStr,
char *  pBuf,
size_t  BufSize 
)

◆ GetKeyBindModifiersName()

void CBinds::GetKeyBindModifiersName ( int  ModifierCombination,
char *  pBuf,
size_t  BufSize 
)
static

◆ GetModifierMask()

int CBinds::GetModifierMask ( IInput pInput)
static

◆ GetModifierMaskOfKey()

int CBinds::GetModifierMaskOfKey ( int  Key)
static

◆ GetModifierName()

const char * CBinds::GetModifierName ( int  Modifier)
static

◆ OnConsoleInit()

void CBinds::OnConsoleInit ( )
overridevirtual

Called to let the components register their console commands.

Reimplemented from CComponent.

◆ OnInput()

bool CBinds::OnInput ( const IInput::CEvent Event)
overridevirtual

Called on a input event.

Parameters
EventThe input event.

Reimplemented from CComponent.

◆ SetDDRaceBinds()

void CBinds::SetDDRaceBinds ( bool  FreeOnly)

◆ SetDefaults()

void CBinds::SetDefaults ( )

◆ Sizeof()

virtual int CBinds::Sizeof ( ) const
inlineoverridevirtual

Gets the size of the non-abstract component.

Implements CComponent.

◆ UnbindAll()

void CBinds::UnbindAll ( )

Member Data Documentation

◆ m_aapKeyBindings

char* CBinds::m_aapKeyBindings[MODIFIER_COMBINATION_COUNT][KEY_LAST]
private

◆ m_MouseOnAction

bool CBinds::m_MouseOnAction

◆ m_SpecialBinds

CBindsSpecial CBinds::m_SpecialBinds

◆ m_vActiveBinds

std::vector<CBindSlot> CBinds::m_vActiveBinds
private

The documentation for this class was generated from the following files: