Exemple #1
0
/*
* CL_CancelTouches
*/
void CL_CancelTouches( void )
{
	switch( cls.key_dest )
	{
		case key_game:
			CL_GameModule_CancelTouches();
			break;
		case key_console:
		case key_message:
			Con_TouchEvent( qfalse, 0, 0 );
			break;
		default:
			break;
	}
}
Exemple #2
0
/*
* IN_ClearState
*/
void IN_ClearState( void )
{
	IN_ShowSoftKeyboard( false );

	Key_ClearStates();

	switch( cls.key_dest )
	{
		case key_game:
			CL_GameModule_ClearInputState();
			break;
		case key_console:
		case key_message:
			Con_TouchEvent( false, -1, -1 );
			break;
		case key_menu:
			CL_UIModule_CancelTouches();
		default:
			break;
	}
}
Exemple #3
0
/*
* CL_TouchEvent
*/
void CL_TouchEvent( int id, touchevent_t type, int x, int y, unsigned int time )
{
	switch( cls.key_dest )
	{
		case key_game:
			CL_GameModule_TouchEvent( id, type, x, y, time );
			break;

		case key_console:
		case key_message:
			if( id == 0 )
				Con_TouchEvent( ( type != TOUCH_UP ) ? true : false, x, y );
			break;
		
		case key_menu:
			CL_UIModule_TouchEvent( id, type, x, y );
			break;

		default:
			break;
	}
}
Exemple #4
0
/*
* CL_TouchEvent
*/
void CL_TouchEvent( int id, touchevent_t type, int x, int y, unsigned int time )
{
	switch( cls.key_dest )
	{
		case key_game:
			CL_GameModule_TouchEvent( id, type, x, y );
			break;

		case key_console:
		case key_message:
			if( id == 0 )
				Con_TouchEvent( ( type != TOUCH_UP ) ? qtrue : qfalse, x, y );
			break;
		
		case key_menu:
			if( id != 0 )
				break;

			CL_UIModule_MouseSet( x, y );

			switch( type )
			{
				case TOUCH_DOWN:
					Key_MouseEvent( K_MOUSE1, qtrue, time );
					break;
				case TOUCH_UP:
					Key_MouseEvent( K_MOUSE1, qfalse, time );
					CL_UIModule_MouseSet( 0, 0 );
					break;
				default:
					break;
			}
			break;
		default:
			break;
	}
}
Exemple #5
0
/*
* CL_TouchEvent
*/
void CL_TouchEvent( int id, touchevent_t type, int x, int y, unsigned int time )
{
	switch( cls.key_dest )
	{
		case key_game:
			{
				bool toQuickMenu = false;

				if( SCR_IsQuickMenuShown() && !CL_GameModule_IsTouchDown( id ) )
				{
					if( CL_UIModule_IsTouchDownQuick( id ) )
						toQuickMenu = true;

					// if the quick menu has consumed the touch event, don't send the event to the game
					toQuickMenu |= CL_UIModule_TouchEventQuick( id, type, x, y );
				}

				if( !toQuickMenu )
					CL_GameModule_TouchEvent( id, type, x, y, time );
			}
			break;

		case key_console:
		case key_message:
			if( id == 0 )
				Con_TouchEvent( ( type != TOUCH_UP ) ? true : false, x, y );
			break;
		
		case key_menu:
			CL_UIModule_TouchEvent( id, type, x, y );
			break;

		default:
			break;
	}
}