Exemple #1
0
//----------------------------------------------------------------//
static void _onMultiButton( int touch_id, int x, int y, int button, int state ) {
	AKUEnqueueTouchEvent (
		GlutInputDeviceID::DEVICE,
		GlutInputDeviceSensorID::TOUCH,
		touch_id,
		state == GLUT_DOWN,
		( float )x,
		( float )y
	);
}
Exemple #2
0
//----------------------------------------------------------------//
static void _onMultiMotion( int touch_id, int x, int y ) {
	AKUEnqueueTouchEvent (
		GlutInputDeviceID::DEVICE,
		GlutInputDeviceSensorID::TOUCH,
		touch_id,
		true,
		( float )x,
		( float )y
	);
}
Exemple #3
0
	//----------------------------------------------------------------//
	extern "C" void Java_com_ziplinegames_moai_Moai_AKUUpdate ( JNIEnv* env, jclass obj ) {

		InputEvent ievent;
		while ( inputQueue->Pop ( ievent )) {
			
			switch ( ievent.m_type ) {
				
			case InputEvent::INPUTEVENT_TOUCH:
				AKUEnqueueTouchEvent ( ievent.m_deviceId, ievent.m_sensorId, ievent.m_touchId, ievent.m_down, ievent.m_x, ievent.m_y );
				break;
			case InputEvent::INPUTEVENT_LEVEL:
				AKUEnqueueLevelEvent ( ievent.m_deviceId, ievent.m_sensorId, ievent.m_x, ievent.m_y, ievent.m_z );
				break;
			case InputEvent::INPUTEVENT_COMPASS:
				AKUEnqueueCompassEvent ( ievent.m_deviceId, ievent.m_sensorId, ievent.m_heading );
				break;
			case InputEvent::INPUTEVENT_LOCATION:
				AKUEnqueueLocationEvent ( ievent.m_deviceId, ievent.m_sensorId, ievent.m_longitude, ievent.m_latitude, ievent.m_altitude, ievent.m_hAccuracy, ievent.m_vAccuracy, ievent.m_speed );
				break;
			}
		}

		AKUUpdate ();
	}