mirror of
https://github.com/FWGS/xash3d-fwgs
synced 2024-12-23 17:25:24 +01:00
Add text input mode calls where they should be. Disable text input mode at initialization
This commit is contained in:
parent
cec7bf8488
commit
d3990e03e6
@ -597,6 +597,17 @@ void Key_Event( int key, qboolean down )
|
||||
if( cls.key_dest == key_menu )
|
||||
{
|
||||
// only non printable keys passed
|
||||
if( !gameui.use_text_api )
|
||||
Key_EnableTextInput( true, false );
|
||||
//pass printable chars for old menus
|
||||
if( !gameui.use_text_api && !host.textmode && down && ( key >= 32 ) && ( key <= 'z' ) )
|
||||
{
|
||||
if( Key_IsDown( K_SHIFT ) )
|
||||
{
|
||||
key += 'A' - 'a';
|
||||
}
|
||||
UI_CharEvent( key );
|
||||
}
|
||||
UI_KeyEvent( key, down );
|
||||
return;
|
||||
}
|
||||
@ -708,15 +719,19 @@ void Key_SetKeyDest( int key_dest )
|
||||
switch( key_dest )
|
||||
{
|
||||
case key_game:
|
||||
Key_EnableTextInput( false, false );
|
||||
cls.key_dest = key_game;
|
||||
break;
|
||||
case key_menu:
|
||||
Key_EnableTextInput( false, false );
|
||||
cls.key_dest = key_menu;
|
||||
break;
|
||||
case key_console:
|
||||
Key_EnableTextInput( true, false );
|
||||
cls.key_dest = key_console;
|
||||
break;
|
||||
case key_message:
|
||||
Key_EnableTextInput( true, false );
|
||||
cls.key_dest = key_message;
|
||||
break;
|
||||
default:
|
||||
|
@ -760,6 +760,8 @@ void Host_InitCommon( int argc, char **argv, const char *progname, qboolean bCha
|
||||
#if defined XASH_GLES && !defined __EMSCRIPTEN__ && !TARGET_OS_IOS
|
||||
SDL_SetHint( SDL_HINT_OPENGL_ES_DRIVER, "1" );
|
||||
#endif
|
||||
|
||||
SDL_StopTextInput();
|
||||
#endif
|
||||
|
||||
if ( !host.rootdir[0] || SetCurrentDirectory( host.rootdir ) != 0)
|
||||
|
Loading…
Reference in New Issue
Block a user