game/client: fix messagemode, add acceleration for touch, GameUI: add touch options

This commit is contained in:
nillerusr
2022-04-16 12:58:59 +03:00
parent 0feeab91dd
commit ab5c1c0b3a
12 changed files with 505 additions and 76 deletions

View File

@@ -52,6 +52,7 @@
#include "replay/vgui/replaymessagepanel.h"
#include "econ/econ_controls.h"
#include "econ/confirm_dialog.h"
extern IClientReplayContext *g_pClientReplayContext;
extern ConVar replay_rendersetting_renderglow;
#endif
@@ -144,6 +145,18 @@ CON_COMMAND( hud_reloadscheme, "Reloads hud layout and animation scripts." )
mode->ReloadScheme();
}
CON_COMMAND( messagemode, "Opens chat dialog" )
{
ClientModeShared *mode = ( ClientModeShared * )GetClientModeNormal();
mode->StartMessageMode( MM_SAY );
}
CON_COMMAND( messagemode2, "Opens chat dialog" )
{
ClientModeShared *mode = ( ClientModeShared * )GetClientModeNormal();
mode->StartMessageMode( MM_SAY_TEAM );
}
#ifdef _DEBUG
CON_COMMAND_F( crash, "Crash the client. Optional parameter -- type of crash:\n 0: read from NULL\n 1: write to NULL\n 2: DmCrashDump() (xbox360 only)", FCVAR_CHEAT )
{
@@ -632,28 +645,6 @@ int ClientModeShared::KeyInput( int down, ButtonCode_t keynum, const char *pszCu
if ( engine->Con_IsVisible() )
return 1;
// Should we start typing a message?
if ( pszCurrentBinding &&
( Q_strcmp( pszCurrentBinding, "messagemode" ) == 0 ||
Q_strcmp( pszCurrentBinding, "say" ) == 0 ) )
{
if ( down )
{
StartMessageMode( MM_SAY );
}
return 0;
}
else if ( pszCurrentBinding &&
( Q_strcmp( pszCurrentBinding, "messagemode2" ) == 0 ||
Q_strcmp( pszCurrentBinding, "say_team" ) == 0 ) )
{
if ( down )
{
StartMessageMode( MM_SAY_TEAM );
}
return 0;
}
// If we're voting...
#ifdef VOTING_ENABLED
CHudVote *pHudVote = GET_HUDELEMENT( CHudVote );