some stuff

This commit is contained in:
2026-03-05 21:25:59 +02:00
parent 2da75ebdd8
commit 99f68e655f
41 changed files with 706 additions and 324 deletions

44
public/ihumandevice.h Normal file
View File

@@ -0,0 +1,44 @@
#ifndef KEYBINDINGS_H
#define KEYBINDINGS_H
#include "tier0/platform.h"
#include "materialsystem/humandevice_enums.h"
abstract_class IHumanDeviceInput
{
public:
virtual EInputType GetInputType() = 0;
virtual void OnGameButton( EInputDeviceType eDevice, EInputButton eScancode, bool bIsPressed ) = 0;
virtual void OnGameAxis( EInputDeviceType eDevice, EInputAxis eAxis, float fValue) = 0;
virtual void OnGameAxisDiff( EInputDeviceType eDevice, EInputAxis eAxis, float fValue ) = 0;
virtual void OnButton( EInputDeviceType eDevice, EInputButton eScancode, bool bIsPressed ) = 0;
virtual void OnAxis( EInputDeviceType eDevice, EInputAxis eAxis, float fValue) = 0;
virtual void OnAxisDiff( EInputDeviceType eDevice, EInputAxis eAxis, float fValue ) = 0;
virtual void OnTextWriteUTF8( uint32_t uCode ) = 0;
};
abstract_class IHumanDeviceManager
{
public:
virtual void Frame() = 0;
virtual void SetDefaultInput( IHumanDeviceInput *pInput ) = 0;
virtual void PushInput( IHumanDeviceInput *pInput ) = 0;
virtual void PopInput() = 0;
virtual IHumanDeviceInput *GetCurrentInput() = 0;
virtual void SetButtonPressed( EInputButton eButton ) = 0;
virtual void SetButtonUnpressed( EInputButton eButton ) = 0;
virtual void WriteUTF8( uint32_t uCode ) = 0;
};
#define HUMAN_DEVICE_MANAGER_INTERFACE_VERSION "HumanDeviceMgr001"
extern IHumanDeviceManager *g_pHumanDeviceManager;
#endif