コード例 #1
0
ファイル: cl_input.c プロジェクト: ewirch/qfusion
/*
* 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;
	}
}
コード例 #2
0
ファイル: cl_input.c プロジェクト: tenght/qfusion
/*
* CL_MouseSet
*
* Mouse input for systems with basic mouse support (without centering
* and possibly without toggleable cursor).
*/
void CL_MouseSet( int mx, int my, bool showCursor )
{
	if( cls.key_dest == key_menu )
		CL_UIModule_MouseSet( mx, my, showCursor );
}