Handle key input in vgui (#198)

This commit is contained in:
Roman Chistokhodov 2021-10-27 21:20:03 +03:00 committed by GitHub
parent ba2cab60df
commit 504e8b19d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -380,7 +380,11 @@ Return 1 to allow engine to process the key, otherwise, act on it as needed
============
*/
int DLLEXPORT HUD_Key_Event( int down, int keynum, const char *pszCurrentBinding )
{
{
#if USE_VGUI
if (gViewPort)
return gViewPort->KeyInput(down, keynum, pszCurrentBinding);
#endif
return 1;
}