Add more InputSystem methods

This commit is contained in:
Kawe Mazidjatari 2022-11-10 15:32:56 +01:00
parent 5c92fde569
commit 91052d8e9e
2 changed files with 16 additions and 0 deletions

View File

@ -35,5 +35,19 @@ bool CInputSystem::IsButtonDown(ButtonCode_t Button)
return CallVFunc<bool>(index, this, Button); return CallVFunc<bool>(index, this, Button);
} }
//-----------------------------------------------------------------------------
// Convert back + forth between ButtonCode/AnalogCode + strings
//-----------------------------------------------------------------------------
bool CInputSystem::ButtonCodeToString(ButtonCode_t Button)
{
const static int index = 25;
return CallVFunc<bool>(index, this, Button);
}
ButtonCode_t CInputSystem::StringToButtonCode(const char* pString)
{
const static int index = 26;
return CallVFunc<ButtonCode_t>(index, this, pString);
}
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
CInputSystem* g_pInputSystem = nullptr; CInputSystem* g_pInputSystem = nullptr;

View File

@ -8,6 +8,8 @@ public:
void EnableInput(bool bEnabled); // @0x14039F100 in R5pc_r5launch_N1094_CL456479_2019_10_30_05_20_PM void EnableInput(bool bEnabled); // @0x14039F100 in R5pc_r5launch_N1094_CL456479_2019_10_30_05_20_PM
void EnableMessagePump(bool bEnabled); // @0x14039F110 in R5pc_r5launch_N1094_CL456479_2019_10_30_05_20_PM void EnableMessagePump(bool bEnabled); // @0x14039F110 in R5pc_r5launch_N1094_CL456479_2019_10_30_05_20_PM
bool IsButtonDown(ButtonCode_t Button); // @0x1403A0140 in R5pc_r5launch_N1094_CL456479_2019_10_30_05_20_PM bool IsButtonDown(ButtonCode_t Button); // @0x1403A0140 in R5pc_r5launch_N1094_CL456479_2019_10_30_05_20_PM
bool ButtonCodeToString(ButtonCode_t Button);
ButtonCode_t StringToButtonCode(const char* pString);
private: private:
char pad_0000[16]; //0x0000 char pad_0000[16]; //0x0000