r5sdk/r5dev/inputsystem/inputsystem.cpp
Kawe Mazidjatari 9d06a02614 General cleanup
* Use Cbuf functions for executing commands in ImGui panels.
* Use const qualifiers for all vftable indexes.
2022-08-09 02:35:00 +02:00

39 lines
1.3 KiB
C++

//===========================================================================//
//
// Purpose:
//
//===========================================================================//
#include "core/stdafx.h"
#include "vpc/IAppSystem.h"
#include "inputsystem/inputsystem.h"
//-----------------------------------------------------------------------------
// Enables/disables input
//-----------------------------------------------------------------------------
void CInputSystem::EnableInput(bool bEnabled)
{
const int index = 10;
CallVFunc<void>(index, this, bEnabled);
}
//-----------------------------------------------------------------------------
// Enables/disables the inputsystem windows message pump
//-----------------------------------------------------------------------------
void CInputSystem::EnableMessagePump(bool bEnabled)
{
const int index = 11;
CallVFunc<void>(index, this, bEnabled);
}
//-----------------------------------------------------------------------------
// Poll current state
//-----------------------------------------------------------------------------
bool CInputSystem::IsButtonDown(ButtonCode_t Button)
{
const int index = 13;
return CallVFunc<bool>(index, this, Button);
}
///////////////////////////////////////////////////////////////////////////////
CInputSystem* g_pInputSystem = nullptr;