Exemple #1
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 #2
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 #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:
			{
				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;
	}
}